Pre-requisite: To pay using a linked Maya Wallet, you must implement the Link a Maya Wallet .
Overview
Use the Pay with Maya to allow customers to use their linked Maya wallet to pay for their purchases.
Leverage Pay with Maya to perform:
- Passwordless payments. Once linked, customers can use their Maya account for payment seamlessly.
API Sequence
Learn the API sequence and transaction flow of Pay using a Linked Maya Wallet.
- The customer initiates payment using the linked Maya Wallet in the API Consumer’s application.
- API Consumer triggers Execute Wallet Link Payment endpoint of Pay with Maya API.
- Pay with Maya API processes the payment.
- Pay with Maya API responds with the payment result to the API Consumer.
- API consumer notifies the customer of the status of the payment.
- If webhook is implemented for Pay using Linked Maya Wallet :
- After processing payment, Pay with Maya API sends a webhook notification to the API Consumer regarding the updates on the payment status.
- API Consumer acknowledges the receipt by returning the
200 OK
. - API Consumer parses and processes the webhook payload received.
Build your Integration
This solution uses Basic Authentication, which requires API keys to authenticate incoming requests. To obtain your API key, please refer to the Generate API Keys for Online Payments guide.
Execute Payment
Create payment using the Maya Wallet Link.
To make a payment using the linked Maya wallet, use the linkId
and call Execute Wallet Link Payment providing the necessary payment details. This endpoint will return the transaction result.
Monitor Real-time Transaction Events
Monitor and receive transaction updates.
Maya uses webhooks to inform your application about specific events related to payment requests. These notifications include the payment status and response codes.
Refer to the following resources to understand Webhooks and how to handle errors and declined payments:
If your application doesn't receive webhook notifications, use the following retrieve endpoints as an alternative:
Endpoints
The following are the Pay with Maya endpoints for the Pay using a Linked Maya Wallet.
Name | HTTP Method | Key Type | Endpoint | Description |
---|---|---|---|---|
Execute Wallet Link Payment | POST | SECRET | /payby/v2/paymaya/link/{linkId}/execute | Used to execute a payment transaction using an established wallet link. |
Managing Payment Transactions
Name | HTTP Method | Key Type | Endpoint | Description |
---|---|---|---|---|
Retrieve Payment via ID | GET | SECRET | /payments/v1/payments/{paymentId} | Retrieve the transaction information by providing the paymentId . The resulting response will be an array of the payment information.`. |
Retrieve Payment via RRN | GET | SECRET | /payments/v1/payment-rrns/{rrn} | Retrieve the transaction information by providing the merchant’s request reference number. Functionality is similar to Retrieve Payment via ID, but instead of the paymentID , rrn is used. |
Retrieve Payment Status | GET | PUBLIC | /payments/v1/payments/{paymentId}/status | By providing the paymentId , use this API to get the payment status. |
Cancel Payment via ID | POST | SECRET | /payments/v1/payments/{paymentId}/cancel | This API is used to cancel a payment transaction by providing the paymentId ; before it can be authenticated and card payment is made. |
Business Rules to Code
To supplement your knowledge of the integration, it is essential to familiarize the Business Rules to Code for Online Payments . This ensures that technology requirements and other development considerations are met.
At this point, you have understood the following:
- The necessary APIs and their endpoints
- The sequence and purpose of each API
- The prerequisites for building your integration