Payments API
This is a Server-to-Server API that takes order and payment instrument parameters as an input and creates an order in the Juspay system.
Amount and order id are the mandatory fields, the contact details like email, phone number, customer id's are conditional and depends on the underlying payment gateway/ aggregator used.
'UDF' is used to pass any additional information that is required to be stored at Juspay for any analysis or other operations. In some cases, these UDFs are passed to the downstream gateways as well.
Juspay supports 10 UDFs (UDF1 to UDF10). The values passed in UDFs are reflected back in the order status response and in webhooks back to the merchant. If there are any special characters that need to be passed in UDF values, please use UDF 6 to 10 for passing the same. UDF 1 to 5 can be used to pass values which do not have any special characters.
‘Metadata’ is used to send custom params to the payment aggregators, irrespective of default parameters, The supported parameters
Note: Auth api key should be Base64 encoded.
Consists of two parts.
Username: API Key obtained from Juspay dashboard
Password: Empty string
Example:-
Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==
Merchant ID provided by Juspay
Example:-
merchant-id
Pass the date in YYYY-MM-DD format
Example:-
2023-01-01
application/x-www-form-urlencoded
Order object pertaining to the order you are creating.
ID of the merchant_account that you hold with us.
The actual payment_method_type that was selecetd by the user. You can refer each payment_method_type documentation to get the possible values.
Payment_method_type can be WALLET, CARD, NB
The actual payment method that was selected by the user. You can refer each payment_method_type documentation to get the possible values.
This is a boolean variable and accepts true/false. We recommend that you set this to true. If set to true, then the user is redirected to the return\_url configured for the order. If set to false, then the user will be stopped at the response page from the gateway. Your client should be able to read the page/title to infer that the user has completed the transaction.
If it is set to json, then the response will be HTTP 200 with a JSON formatted text. Otherwise, the response is HTTP 302 with the Location attribute having the destination URL.
ISO string of the currency. Default value: INR
Allowed values = WEB, MWEB , ANDROID , IOS
:order_id
:txn_id
PENDING_VBV
Only when you have POST as the authentication method
error
Order timed out
invalid_request
Have questions?
- Need help? Contact support
- LLM? Read llms.txt

