How do I implement payment retries if the customer gets redirected

How do I implement payment retries if the customer gets redirected

To implement payment retries if the customer gets redirected, follow these steps:

  1. Before retrying the payment, call the ‘Get Transaction by merchantRefNo’ endpoint to verify the latest status of the transaction.
  2. Ensure that the Merchant ECR Plugin is designed to respect the terminal’s 6-minute processing window.
  3. Handle timeouts correctly by sending an ‘ACK’ within 3 seconds and using the ‘CHECK’ command to re-establish the connection if necessary.
  4. Re-query the transaction status before retrying to prevent duplicate charges or missing records.

For Sandbox concerns and other technical implementation inquiries, please get in touch with us via:

  • Sandbox Health Page: Check real-time service status updates.
  • Maya Developer Hub Service Desk: File
    a ticket in Sandbox.

To Know More:

We value your input and would love to hear your insights. Please submit you feedback here.

Hi @shelby! Thanks for reaching out.

The AI had difficulty interpreting your inquiry, which led it to assume you were referring to an ECR integration with Maya Terminals. To clarify and add to the AI-generated response:

For online payments (Maya Checkout, Maya Vault, Pay with Maya):

  • Always verify the payment status before retrying.
    You can check the latest webhook events from Maya or call the GET /payments/v1/payment-rrns/{rrn} endpoint.
  • Ensure the payment is in a final state (e.g., success, failed, cancelled, expired) before initiating a retry.
    Avoid creating a new payment while the previous one is still in process or in any transient status.
  • Create a new payment request for each retry.
    Do not reuse the same reference number when initiating a new attempt.

If these assumptions don’t match your actual scenario, please share more context, such as the solution you’re integrating (Checkout, PWM, Vault), the workflow you’re trying to achieve, or the specific endpoint involved. This will help us provide a more accurate and helpful response.

Thanks!

Thank you @genson.cerezo, I was also considering this for my implementation. In my case I’m implementing Checkout, based on your explanation, at the backend, my platform should be ready to handle the transaction based on the payment state?