Transaction Status
We have an API and Webhook support for getting transaction status.
#
API- Request
- Response
GET web.bharatx.tech/api/transaction/status?id=txnId01
Headers:Content-Type: application/jsonX-Partner-Id: partnerId
Headers:-
Status = 200: Successfully created the transaction
Body:{ "status": "PENDING|SUCCESS|FAILURE|CANCELLED", // you can use this signature to check if the status // update has indeed come from BharatX "signature": "string"}
Status = 400: Bad RequestStatus = 401: Failed to authorize youStatus = 404: Transaction ID is not foundStatus = 5xx: Unknown failure
Body:{ "message": "<error message desc>"}
#
WebhookWe also send a Webhook to let you know when a Transaction Succeeds or Fails. Your server should
respond with a successful status code 200 - 299
, and if it doesn't, our server will retry a
few more times and stop sending webhooks for that transaction.
POST <Your Server Webhook URL>
Headers:Content-Type: application/json
Body:{ transactionId: "txnId01", status: "SUCCESS|FAILURE|CANCELLED", // you can use this signature to check if the status // update has indeed come from BharatX signature: "string",}