SDK Transaction Flow

The general transaction flow of the SDK are shown as diagram below.


  1. Checkout: The customer clicks the Checkout button on the host application, and the app sends a request to the merchant server.

  2. Token request: The merchant server sends a request to the Midtrans server with order information.

  3. Token response: Midtrans responds with a valid transaction token to the merchant server.

  4. Token response: The merchant server forwards the token to the mobile SDK.

  5. Get transaction options: The mobile SDK requests payment/merchant information based on the token.

  6. Transaction options response: The mobile SDK renders the payment options and payment information for the customer to make the payment.

  7. Pay: The customer selects the payment method and payment details and clicks "Pay".

  8. Charge: The mobile SDK sends the charge request to the Midtrans backend for payment processing.

  9. Charge response: The mobile SDK receives the response from the Midtrans backend and triggers a handler on the mobile app with success/failure/pending status.

  10. Charge notification: The Midtrans backend sends a notification to the merchant backend confirming the completion of the transaction.