Understanding the Flow
Below is a step-by-step explanation of each operation pertaining to the Integration Architecture
Step | Operation | Type | Explanation |
---|---|---|---|
Step 1 | Prefetch |
SDK call (Merchant App -> Payments SDK) |
Prefetch all the latest SDK updates. It is recommended to call prefetch from your App’s homescreen. |
Step 2 | Fetch Signed Payload Token |
API call (Merchant App -> Merchant Server) |
Merchant App shall fetch a signed payload from Merchant Server. This signed session token is required to perform Step 3 (Initiate). |
Step 3 | Initiate |
SDK call (Merchant App -> Payments SDK) |
Merchant App shall initiate the SDK with signed payload of customer details. This operation
will
start Juspay Payments
SDK in the background.
It is highly recommended to call initiate SDK from the order summary page (atleast 5 seconds before starting the payment page) for a seamless user experience. This is to optimize background API calls to find / create customer, refresh wallet balances and fetch enabled payment methods. |
Step 4 | Fetch Signed Order details |
API call (Merchant App -> Merchant Server) |
Merchant App shall fetch signed order details from Merchant Server. This signed session token is required to perform Step 5 (Process). |
Step 5 | Process |
SDK call (Merchant App -> Payments SDK) |
This operation shall open the Payment page for the user. |
Step 6 | Handle SDK events | SDK response handling | The SDK shall pass all events back to the Merchant’s App using callbacks. |
Step 7 | Terminate |
SDK call (Merchant App -> Payments SDK) |
Merchant App shall terminate the Payments SDK. It is an optional call which may be done by a merchant to free up memory once Payments SDK is no longer used. |
Step 9 | Webhooks |
Webhook (Juspay Server -> Merchant Server) |
After the completion of every payment/refund call, Juspay will provide direct notification
to
your server regarding the
event. These are called Webhooks. You must configure a valid HTTP endpoint that is reachable
from our servers to consume
these notifications. Our servers will push data using HTTP POST call to your endpoint.
Reference: https://developer.juspay.in/docs/integration#section-webhooks |
Step 10 | Check Order Status / Refund Statu |
S2S API call (Merchant Server -> Juspay Server) |
Fetch the order status/ refund status from Juspay Server, post completion of user
transaction.
Reference: https://developer.juspay.in/reference#get-order-status |
Step 11 | Initiate Refund |
S2S API call (Merchant Server -> Juspay Server) |
Initiate refund against any successful order via Juspay Server. Reference: https://developer.juspay.in/reference#refund-order |
Updated over 1 year ago