Understanding Payment Statuses in Maya Checkout

Overview

When integrating Maya Checkout, it’s crucial to understand the payment lifecycle. Each transaction passes through a series of statuses that represent its current state: from creation to completion, expiration, or failure.

Instead of polling the API for updates or relying solely on the synchronous API responses, your system should listen for server-to-server webhook events. This ensures you always receive the final payment status.

This guide covers:

  • What each payment status means
  • How statuses transition from one to another
  • Which webhooks are emitted
  • Best practices for handling statuses

Key rule for developers when integrating with Maya Checkout

Always wait for webhook events before updating your order system. Do not rely solely on synchronous responses.


Payment Statuses in Maya Checkout

Some statuses are final (irreversible, no further transitions possible) or semi-final (safe for merchants to treat as “paid,” but may still be reversed, voided, or refunded), while other statuses are transient (impermanent or temporary).

Initial & Pending States

These statuses indicate that the payment request/session has been created but not yet completed.
No merchant-side actions are required yet.

StateDescriptionEmitted Webhook
PENDING_TOKENThe checkout session was created, not yet paidno webhook event
PENDING_PAYMENTThe customer is in the process of payingno webhook event

Authentication States

At this stage, the payment goes through authentication. No actions from your system are needed at this stage.

StateDescriptionEmitted Webhook
FOR_AUTHENTICATIONThe customer must complete 3DS/authenticationno webhook event
AUTHENTICATINGThe authentication is in progressno webhook event
AUTH_SUCCESSThe customer passed 3DSno webhook event

Processing State

The transaction is under review by Maya and the issuing bank or e-wallet provider.

StateDescriptionEmitted Webhook
PAYMENT_PROCESSINGThe account and funds are being confirmedno webhook event

Decision and Semi-Final States

These represent the key decision points in the lifecycle.

StateDescriptionEmitted Webhook
PAYMENT_SUCCESSPayment confirmed. Safe to fulfill orders, but still reversible (void/refund)PAYMENT_SUCCESS
AUTHORIZEDFor card payments only. Funds held but not yet captured (manual capture required)AUTHORIZED
CAPTUREDFor card payments only. Capture request acceptedPAYMENT_SUCCESS

Final States

These represent irreversible or closed statuses.

StateDescriptionEmitted Webhook
AUTH_FAILEDThe authentication failedno webhook event
DONEFor card payments only. Funds held but not yet captured (manual capture required)no webhook event
PAYMENT_FAILEDPayment attempt unsuccessful. Verify the reason through the error message. Refer to the Maya Checkout Errors and Decline Codes for proper handling.PAYMENT_FAILED
PAYMENT_EXPIREDCheckout session expired, customers must recreate the requestPAYMENT_EXPIRED
PAYMENT_CANCELLEDCancelled by customer/merchantPAYMENT_CANCELLED
VOIDEDThe authorization or payment voidedno webhook event
REFUNDEDMerchant reversed fundsno webhook event
CAPTURE_HOLD_EXPIREDThe authorization expired without captureno webhook event

Payment Lifecycle in Maya Checkout

For One-time Payment Flow

For Authorize (Hold) and Capture Flow

Authorize (Hold) Intent:

Capture Intent:


Best Practices for Developers

1. Always Listen to Webhooks

  • Do not rely on redirect URLs or synchronous API responses. These may only indicate that the checkout flow was initiated, not the final result.
  • Use webhook events as the single source of truth for updating your order system.

2. Handle Semi-Final States with Caution

Some statuses are safe to act on, but can still change later:

  • PAYMENT_SUCCESS – funds confirmed but can still be voided or refunded.
  • AUTHORIZED – funds held; can still be voided, otherwise capture required.
  • CAPTURED – capture request accepted; still reversible by refund.

Your system must be able to process voids or refunds even after you’ve fulfilled the order.

3. Manage Timeouts & Expirations

  • PAYMENT_EXPIRED – treat as final; the customer must start a new checkout session.
  • CAPTURE_HOLD_EXPIRED – funds were authorized but expired without capture; funds are released from being held

Do not attempt to retry automatically. Instead, prompt the customer to re-initiate payment.

4. Handle Failures Gracefully

  • PAYMENT_FAILED – this status always includes an error code or reason.
  • Check the errorMessage field in the webhook payload to determine next steps.
  • Do not retry automatically unless advised by Maya API documentation.

5. Build for Reliability

  • Idempotency: Ensure webhook processing is idempotent; your system should handle duplicate webhook events safely.
  • Status Sync: Update your internal status only after receiving and validating the webhook event.
  • Logging: Log webhook payloads for debugging and reconciliation.

FAQs

Q: Where can I get the payment status?

A: You can get the payment status from multiple sources:

  • Webhook notifications, which provide the most reliable and real-time updates
  • GET Payment endpoint

Q: Can a payment status change after it is marked as PAYMENT_SUCCESS?

A: Yes. Once a payment is marked PAYMENT_SUCCESS, it is considered semi-final. You can still perform related actions, such as refunds or voids, depending on the payment type and capture flow.

Q: How do statuses differ between one-time payments and authorize/capture?

Answer:

  • One-time payment: The status moves directly to PAYMENT_SUCCESS (or PAYMENT_FAILED) once payment is complete.
  • Authorize and Capture: The payment may first move to AUTHORIZED before being CAPTURED or VOIDED.

Q: How should I handle unknown or unexpected statuses?

A: If you encounter an unknown status:

  1. Log the event for debugging and auditing
  2. Retry by checking the payment via the GET Payment endpoint
  3. Contact Maya support if the status persists and is not documented

Next Steps

You now have a better understanding of the different payment statuses in Maya Checkout and how they move from one state to another. To move forward:

  1. Implement Webhook Handling
  2. Incorporate Status Handling into Your System
    • Update your flow to account for pending, semi-final, and final states.
  3. Test with Sandbox Transactions