This method explains how merchants can receive payments on the Mini App using the BI-SNAP Core API Redirection Deeplink.
Integration Needed | Details |
---|---|
Mini App Frontend | Opens the redirection url provided by backend. SDK integration will be available in upcoming version. |
Mini App Backend | Calls GoPay backend to obtain redirection url. |
Sequence Diagram:
Mini app payments Flow diagram
1. User Initiate Order
- The user decides to place an order in the mini app front end process for order.
2. [Merchant owned]
- Merchant mini app frontend to call their own backend to initiate the payment
Step 3: [BI-SNAP Core API] Fetch Merchant Access Token
- In order to initiate order with Super App Backend Merchant access token is needed for verification purposes. This access token can be fetched by v1.0/access-token/b2b [BI-SNAP Core API]
- The Api returns the access token which can be used for all other payment oriented APIs.
- The contract of the API can be found here
Step 4: [Merchant owned]
- Merchant mini app frontend to call their backend to initiate the payment
Step 5: [BI-SNAP Core API] Payment Host to Host
- Using Merchant Access token from step 3, Payment Creation with Super App backend can be initiated by V1.0/debit/payment-host-to-host [BI-SNAP Core API]
- The contract of the API can be found here
- The merchant payment can be Guest Checkout Payment with Payer information unknown at the point.
- The merchant guest payment should have additionalInfo.pointOfPurchaseId which is shared by GoPay upfront.
Step 6: Super App Payment creation response
- Super App Backend returns response to the merchant backend with necessary info for payments
- webRedirectUrl -> Payment deeplink
- ReferenceNo -> GoPay Order Id
Step 7: Merchant payment creation response
- Merchant Backend returns response to Merchant Frontend with contract owned by Merchant team.
Step 8: FE Pay
- The Mini App front end can open the Super App Payment page using the launchPayment from step 5.
- Once the payment is completed, the Super App front end automatically redirects to the merchant page with payment status.
Step 9: [BI-SNAP Core API] Notify
- Once the payment is complete. Super App backend will notify the Mini App Backend by v1.0/debit/notify [BI-SNAP Core API]
- The contract for the api can be found here.
New GoPay Merchants:
If you have not integrated with GoPay or have integrated without following the BI-SNAP Core API convention, the following points apply :
- You must first onboard BI-SNAP Core API convention first using this section Onboard to BI-SNAP Core API.
- Once the BI-SNAP Core API onboarding is complete, you can follow Existing GoPay Merchant.
Existing GoPay Merchants:
If you have already integrated with GoPay and follow the BI-SNAP Core API convention, the following points apply :
- There is no change in the already integrated v1.0/access-token/b2b BI-SNAP Core API.
- For v1.0/debit/payment-host-to-host api, the new field in the existing contract needs to be added under additionalInfo.pointOfPurchaseId. The value for this is shared by the GoPay Team.
- There is no change in the already integrated v1.0/debit/notify BI-SNAP Core API.