Payment Flow
Step by Step Guide for Payment Flow
- User selects the item and creates a cart on the merchant site. User presses on proceed to pay cta in merchant m-site.
- Merchant Server calls Initiate Transaction API to Synapse Server. The request contains
- cart metadata for the cart created on the m-site.
- the total payable amount, merchant payment reference Id and merchant order id.
- callback URL of Merchant Server, to receive a callback from Synapse Server after payment completion.
- Synapse Server stores cart metadata passed by Merchant Server. In response, Synapse Server sends a payload that contains the synapse payment reference id.
- Merchant Server passes payload to the Merchant App.
- Merchant App calls Initiate Synapse Payment JS API to transfer control to Synapse App. The request contains the payload received from Merchant Server.
- Synapse App sends the payload to Synapse Server.
- Synapse Server uses the synapse payment reference id received in payload from Synapse App to map cart metadata received in InitiatePayment Request (Step 2) with the user.
- Synapse App transfers the control to Partner App to display various payment modes.
- User completes payment on the Partner App.
- Synapse Server gets the final payment status from Partner Server in an S2S API call.
- Synapse Server initiates S2S callback to the merchant once payment reaches any terminal state. A callback URL must be sent in the Initiate Transaction Request API (Step 2) for merchants to receive this callback.
- If the callback URL is shared, Merchant Server receives final payment status as a callback. Merchant can then proceed with order fulfilment.
- Partner App transfers control to Synapse App after payment completion.
- Synapse App calls Synapse Server for merchant payment payload.
- The merchant payment payload consists of the merchant payment reference id received in Initiate Payment Request(Step 2) in an encrypted format. Synapse server passes the merchant payment payload to Synapse App.
- Synapse app calls the Complete Synapse Payment callback JS API with merchant payment payload in request to transfer control to the merchant app.
- Merchant app opens the order detail screen and checks the transaction status.
- Merchant Server calls Payment Status API to get the final transaction status from Synapse Server.
- Synapse Server sends the status to the Merchant server.
- Merchant Server passes the status to the merchant app and proceeds with order fulfilment
- Displays the status to the user and proceeds with the flow.