Track payment status

Helps merchant send better transaction status for JuspaySafeBrowser product

As soon as the payment is over, please share the status of the payment. These responses are crucial in order to track transaction success/failure metrics.

To minimise chances of missing payment status, we would recommend you to POST this information to our servers directly using the following api call.

curl -X POST https://logs.juspay.in/payment/status
-H "Content-Type: application/json"
-d "@data.json" {
      "merchant_id": "<Merchant Id>",
      "client_id": "<Merchant Id>_ios/<Merchant Id>_android/<Merchant Id>_web",
      "order_id": "<Order Id>",
      "transaction_id": "<Transaction Id>",
      "payment_status": "SUCCESS",
      "amount_details": {
        "amount": "123.45",
        "purchase_amount":12345,
        "exponent":2,
        "currency":356
      },
      "signature": "<signature>"
    }

In the above, we recommend that you send both order_id and transaction_id , however, one of them would suffice as long as uniqueness is achieved.
We rely greatly on the payment status metrics to fine tune our system (both current and future versions). Failure to send status metrics might result in us disabling the enhancements for your customers.

Param Details:

KeyTypeRequiredDescription
merchant_idStringYesMerchant Id shared by Juspay team.
client_idStringYesVaries based os platforms.
For iOS - < Merchant Id >_ios
For Android - < Merchant Id >_android
For Web - < Merchant Id >_web
order_idStringYesUnique order identifier for an order
transaction_idStringNoRequired if multiple orders can be attempted on the same order.
payment_statusStringYesStatus of transaction.
SUCCESS - For successful transactions.
FAILURE - For transactions which have failed.
PENDING - For transactions which have not reached terminal state.
amountDecimalYesAmount merchant uses to display and should not be confused with purchase_amount .
purchase_amountNumberYesNormalised amount which will be used with exponent to calculate final amount.
exponentNumberYesshould be passed based on currency. Please pass 2 for INR. Considering upto 2 decimal places
currencyNumberYes356 for INR transactions
Refer iban for more details.
signatureStringYesJuspay server's uses public-key signature verification for verifying the source of data. Merchants will need to generate/use a private key for signing the payload.
(Merchants can decide the key generation and algo. Please share the public key to juspay over a secure channel.)

Steps to generate payload signature:
1. Stringify the complete payload.
2. Sign the stringified data with merchant private key.
3. Base64 encode the generated signature.

Please refer above example for payload structure.