Subscription Drop-in Flow for website
- Merchant injects TBdropin SDK and initializes it with Publish key and mode(environemnt).
- Merchant can now use the SDK on their checkout page.
- Once the user clicks on buy now/Proceed to pay button at merchants website, now the merchant renders checkout page hosted by them. Where Transact Bridge components are mounted.
- Merchant calls the Create Subscription API to generate a session. Which in return gives a unique subscription ID and a session token which is used to complete the payment.
Merchant can generate a session at the time of opening their checkout page or at the time when user clicks on pay button of merchant hosted checkout page.
- Merchant collects the payment details from the customer on their checkout page.
- Once the user clicks on Pay button. Merchant needs to calls the pay() method(Triggering a Payment) at the checkout with the payment details entered by the user and the session token.
- Payment is completed, TB shares the status of the txn which merchant can show that on their own customized page.
- TB triggers a Webhook on the configured server URL provided by the merchant. And also the transaction status is also provided in the pay method response.
- Subsequently, an invoice based on the subscription (prepaid/postpaid) is generated and sent to the customer.
- In case the user does not completes the txn on the page. Merchant can rely on the pendingExpire param passed in the create subs api bases on which the status of the subscription can be traced in case of merchant inactivity.
pendingExpire: Number of minutes after which, if the status of the subscription is PENDING (Customer did not pay), it becomes PENDING_EXPIRED, which is a terminal state, and now customers cannot pay on the same subscription.By default that subs will be marked as expired by the system after 24 hrs. However, with the help of the pendingExpire param, this time can be reduced to a minimum: 10 mins to a max of 7 days.
Payment Flow
Workflow for Android SDK
- Merchant adds the AAR file in their project and the required dependencies in app/build.gradle .
- Now initialize the TransactBridge PaymentSDK at onCreate() method in the main activity file.
- Merchant can now use the SDK on their checkout screen.
- Once the user clicks on buy now/Proceed to pay button at checkout screen , where Transact Bridge components are mounted.
- Merchant calls the Create Subscription API to generate a session. Which in return gives a unique subscription ID and a session token which is used to complete the payment.
Merchant can generate a session at the time of opening their checkout screen or at the time when user clicks on pay button of merchant checkout screen.
- Merchant collects the payment details from the customer on their checkout screen.
- Once the user clicks on Pay button. Merchant needs to calls the payUpi() method.
- Payment is completed, TB shares the status of the txn which merchant can show that on their own customized screen.
- TB triggers a Webhook on the configured server URL provided by the merchant. And also the transaction status is also provided in the PaymentResultListener
- Subsequently, an invoice based on the subscription (prepaid/postpaid) is generated and sent to the customer.
- In case the user does not completes the txn on the page. Merchant can rely on the pendingExpire param passed in the create subs api bases on which the status of the subscription can be traced in case of merchant inactivity.