Maya Integration
E-WALLETIntegrate Maya (formerly PayMaya), a leading digital wallet in the Philippines, into your payment flow. Maya offers a seamless mobile experience for millions of users.
Integration Highlights
Maya integration follows a redirect-based authorization flow. You create a Payment Intent, redirect the user to Maya's secure portal, and receive the result via Webhooks.
- Supports dynamic QR and Mobile App deep-linking
- Fully asynchronous status updates
Step 1: Create a Payment Intent
Initiate the transaction by setting the payment_method to maya.
POST /v1/payment-intents
curl -X POST https://api.paynplus.com/v1/payment-intents \
-H "Authorization: Bearer sk_live_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 500.00,
"currency": "PHP",
"payment_method": "maya",
"return_url": "https://yourstore.com/verify"
}'
-H "Authorization: Bearer sk_live_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 500.00,
"currency": "PHP",
"payment_method": "maya",
"return_url": "https://yourstore.com/verify"
}'
Step 2: Redirect the User
Maya requires user authorization. Redirect the browser to the URL provided in the next_action.url field.
{
"id": "pi_maya_0987654321",
"status": "REQUIRES_ACTION",
"next_action": {
"type": "redirect",
"url": "https://pay.maya.ph/checkout/session_id_123"
}
}
"id": "pi_maya_0987654321",
"status": "REQUIRES_ACTION",
"next_action": {
"type": "redirect",
"url": "https://pay.maya.ph/checkout/session_id_123"
}
}
Testing in Sandbox
To test Maya payments in our sandbox environment, use the following credentials on the Maya authorization page.
| Phone Number | Password | OTP | Result |
|---|---|---|---|
| 0999 123 4567 | PayMaya123! | 123456 | SUCCESS |
| 0999 000 0000 | PayMaya123! | 123456 | FAILED |
Finalize the Payment
Don't forget to set up your Webhook to receive the final payment confirmation.