Integration steps

The page descripes the steps required to intetrate iin Jio Payment Solutions Limited hosted checkout for a merchant.

Following steps are required to integrate Jio Payment Solutions Limited hosted checkout:

Step 1: Generate Payment Request

Environment:-

Sample Initiate Sale Request

curl --request POST \
     --url https://uat.jiopay.co.in/pg/api/v2/initiateSale \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
    "amount": "100.00",
    "currencyCode": "356",
    "customerEmailID": "[email protected]",
    "merchantId": "T_70002",
    "aggregatorId":"",
    "merchantTxnNo": "TEST4124504515",
    "payType": "0",
    "returnURL": "https://test123890.com",
    "secureHash": "",
    "transactionType": "SALE",
    "txnDate": "20240115185856"
}

You can check the Request Parameter Request Parameter

👍

Good to Know

Jiopay hosted checkout allows you to to customize your checkout page by modifying the payment modes. For more information contact us.

The sample response received is similar to the following:

{"responseCode":"R1000","merchantId":"T_70002","aggregatorID":null,"merchantTxnNo":"TEST8203808038","redirectURI":"https://qa.phicommerce.com/pg/api/v2/authRedirect","showOTPCapturePage":"N","generateOTPURI":null,"verifyOTPURI":null,"authorizeURI":null,"tranCtx":"R6f25b783-24f0-42b8-bc2d-ff97669cf871","secureHash":"52f2a2c024a0393462e19f98cb7aa7518cd4a6d4312d0be65007c8f3f1cdb1d8"}

The customer is securely redirected to the Jio Payment Solutions Limited Hosted Checkout page using a redirect URL and Transaction context. There, they can choose their preferred payment method and complete the transaction. Once the payment is processed, the status is shared with your system via a webhook for real-time updates.

The parsed response code looks something like following:

{
  "responseCode": "R1000",                          // Success or response status code	                                                                      R1000- Response initiated successfully  
  "merchantId": "T_70002",                          // Unique ID of the merchant
  "aggregatorID": null,                             // Aggregator ID (if any) – null in this case
  "merchantTxnNo": "TEST8203808038",                // Merchant’s transaction/reference number
  "redirectURI": "https://qa.phicommerce.com/pg/api/v2/authRedirect",  
                                                    // URL to redirect the customer for payment
  "showOTPCapturePage": "N",                        // Whether OTP capture page should be shown (Y/N)
  "generateOTPURI": null,                           // Endpoint to generate OTP – not applicable here
  "verifyOTPURI": null,                             // Endpoint to verify OTP – NA here
  "authorizeURI": null,                             // Endpoint to authorize payment – NA here
  "tranCtx": "R6f25b783-24f0-42b8-bc2d-ff97669cf871", // Unique transaction context ID
  "secureHash": "52f2a2c024a0393462e19f98cb7aa7518cd4a6d4312d0be65007c8f3f1cdb1d8"
                                                    // Hash used to verify response authenticity
}

Step 2: Payment Status

This is an webhook triggered to the URL configured in the Merchant Dashboard. Response of the payment is posted on this URL to notify the merchant on status of payment. This is done asynchronously via Webhook, so merchant is expected to create an endpoint on their system to consume and process this response.

Refer to the sample response:

{
  "secureHash": "a6ffa0b551283cf21d234d71402e71a781b3edc401dbb4942d255571b5c447ad",
  "respDescription": "Awaiting user action",
  "merchantId": "JP2001100060800",
  "merchantTxnNo": "TEST5339001259",
  "aggregatorID": "AJP2100000070001",
  "responseCode": "P0030"
}

We recommend to verify payment status to reconcile with Jio Payment Solutions Limited's database after you receive the response. Verify the transaction details using the Verification APIs. For API reference, refer to Status Check API under API Reference.


❗️

Important

After receiving a response from Jio Payment Solutions Limited, you must recalculate the secure hash using the transaction data and verify it against the hash returned in the response. This ensures the integrity and security of the transaction.
Jio Payment Solutions Limited also recommends implementing transaction status APIs and webhooks/callbacks for additional security and reliability.Make sure that no sensitive information is included in the payment request or exposed in any merchant-level URL. This helps prevent data leaks and maintains the overall security of the integration.