Simplify the payment experience by allowing your customers to use their Maya account to pay for the products and services.
Step 1: Setup your Maya Business Manager Account
Before you could implement the Pay with Maya to your websites, you must register and setup your Maya Business Manager Account.
Step 2: Build your pages
Create a Pay with Maya button on your website that will allow customers to trigger the payment.
<html> <head> <title>Wear Vamos</title> </head> <body> <form action="/pay-with-maya" method="POST"> <button type="submit">Pay with Maya</button> </form> </body> </html>
Host pages on your website that will reflect the payment status to customers.
<html> <head><title>Payment is successful</title></head> <body> <h1>Thank your for your order!</h1> <p> <a link="/track-order">Tracker your order here</a>. </p> </body> </html>
Step 3: Complete the payment
Handle the ‘Pay with Maya’ button event by calling the
POST /payby/v2/paymaya/payments endpoint to get a redirect URL for user to get their authorization.
When calling this endpoint, your system must define the
redirectUrl – URL of the page where your customer will be redirected based on the payment status.
URL of the page where your customers will be redirected after a successful payment.
URL of the page where your customers will be redirected to when the payment fails.
URL of the page where your customer will be redirected when they cancel a payment.
At this point you should be able to redirect session to Maya’s login page by clicking the button.
- Click "Pay with Maya" button
- You get redirected to Maya’s Login page.
- You will have to use a test Maya account Sandbox Credentials and Cards.
- On successful payment, Pay with Maya will redirect to your success page.
Step 4: Handle post-payment events
The redirection after a successful payment does not guarantee that the payment information will be updated. Your application should manage payment information updates by implementing webhooks.
Updated 2 months ago