Txns API
Once the order creation is completed and the user is redirected to the payment page and selects CRED Pay for the payment, the /txns api is to be called. The curl is given below for the reference.
Collect Request will be triggered to
sdk_pg_params.phoneNumberKindly pass phoneNumber encrypted using RSA PKCS1 method with public key
of juspay and append “enc-” as prefix.
When the credAppPresent is true then the merchant needs to fire the intent_url provided in the response, Merchant can write a custom logic like when checkout_mode is intent then fire intent url else load juspay’s authentication.url.
Please refer to the set up page for more details.
application/x-www-form-urlencoded
We recommend passing the customer_id as the x-routing-id. If the customer is checking out as a guest, you can pass an alternative ID that helps track the payment session lifecycle. For example, this could be an Order ID or Cart ID.
This ID is associated with the customer. It plays a key role in ensuring consistency and maintaining connections across different systems. If you fail to pass the same x-routing-id for the same customer in all related API calls, it could lead to issues with API functionality. Therefore, it’s crucial that you use the same x-routing-id for all requests tied to the same customer.
Example:- customer_1122
Merchant should pass the order_id
Merchant should pass the merchant_id
Should be passed as “WALLET”
Should be passed as “CRED”
Should be passed as true(boolean)
Should be passed as json
Should be passed as true(boolean)
Possible values: android, web
Possible values: android, iOS, windows, linux, macOS, unknown
Please contact juspay team if you are facing any concern around it
Possible values: mobile, iPAD, desktop, tablet, unknown
Please contact juspay team if you are facing any concern around it
Exact country code to be passed, For indian number, please pass “+91”
Must be encrypted using juspay public key with RSA PKCS1 Encryption
Required to trigger a collect request when the flow is collect and auto-fill the number in CRED redirect page when the flow is REDIRECT
Merchant need to pass it as true/false(boolean) basis on cred app present
It is a json object, Merchant can use it to send extra data to CRED
Have questions?
- Need help? Contact support
- LLM? Read llms.txt

