This document describes integration of a channel (like payment gateways) with BharatX using the standard approach where the payment gateway can take advantage of the BharatX's white-labelled user journey by redirecting the customer to our platform if they opt to use Pay In 3 option offered.
The Payment Gateway needs to onboard a merchant to BharatX before creating transactions for the merchant. Payment gateways can follow these steps to get a merchant onboarded:
- Create a new merchant using Create a Merchant API.
- Upload KYC documents for a merchant using Upload KYC for merchant API.
Once a merchant is created, the payment gateway can fetch authentication information for transactional APIs using Get a merchant API.
Before showing the BharatX powered Pay-in-3 option to the user, the payment gateway needs to:
- Call the Create new transaction API and push all the relevant data for the preapproval check to be performed.
- Fetch the preapproval check result using the Get transaction with preapproval check API.
- If the transaction is pre-approved then the payment gateway can display the Pay In 3 option to the user.
If the user opts to use the Pay in 3 option, then:
- The payment gateway can redirect the customer to the uri (
transaction.uri) obtained either in the response of Create new transaction API or Get Transaction API.
- Once the user completes the transaction, the user is redirected to the
createConfiguration.successRedirectUrlsupplied by the payment gateway while creating the transaction.
- Payment gateway can further verify the status of the transaction by either polling the Get Transaction API or using the webhook event received to
the url configured in the dashboard or while creating the transaction using the
In case a transaction needs to be refunded:
- The payment gateway can call the Create a refund API. Partial refunds are supported as well.
- The payment gateway can get the status of the refund either via Get a refund API or by subscribing to webhook events.
We support configuration of a webhook uri for subscribing to various status change events. A default webhook can be configured
while onboarding (both PG onboarding and merchant onboarding). Apart from this, entity level webhooks can be configured using the
createConfiguration.webhookUrl parameter in the subsequent Create APIs.
The payloads for various events are described under Webhooks section.