Create Order API
This is a Server-to-Server API that takes order parameters as an input and creates an order in the Juspay system and fetches the corresponding client_auth_token.
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.
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
application/x-www-form-urlencoded
Unique Identifier for the order. Should be Alphanumeric with character length less than 21.
Example:-
orderid9876580
Amount that the customer has to pay. Will accept stringified double or integer values with upto two decimal places. For example, "100.15" and "100" are valid input but "100.1532" is not valid.
Example:-
1.00
Client side authenticaion token required for Hyper SDK calls
Example:- Value : true
It is the ID with which merchant refers to a customer object. This id is used to access the stored payment methods, allow instalment transactions and setup subscriptions.
In case of guest login it should be an empty string.
Example:-
customer-id-007
Email address of the customer. If the backend gateway requires it, then you must send this value.
Example:-
test@gmail.com
Mobile number or fixed line number of the customer. If the backend gateway requires it, then you must send this value.
Example:-
9999999912
ISO string of the currency. Accepted values are BRL, HKD,EUR, USD, GBP,INR.
Default value: INR
Short description for the order. We send this information to the backend gateways whenever there is a provision for this.
A fully qualified URL which the customer will be redirected after payment completion. It is also required to provide the control back to SDK after the completion of transaction. This URL shouldn't contain any query parameters or Ip address. This URL takes higher precedence over the common return URL configured in your account settings.
Example:-
https://shop.merchant.com
An identifier for the product. Fits well for impulse purchase usecases.
Example:-
John
Specify your preferred gateway for this order. Refer to mapping here.
Example:-
15
First name in the billing address
Last name in the billing address
Line1 in the billing address
Line2 in the billing address
Line3 in the billing address
Billing address city
Billing address state
Billing address country
Billing address postal code or zip code
Mobile or phone number in the billing address
ISO Country code Default value: IND
First name in the shipping address
Last name in the shipping address
Line1 in the shipping address
Line2 in the shipping address
Line3 in the shipping address
Shipping address city
Shipping address state
Shipping address country
Shipping address postal code or zip code
Mobile or phone number in the shipping address
ISO Country code Default value: IND
Will be set to true for pre-auth txns.
This field should be used to pass cpf or cnpj values in the json format.
This field should be used to pass cpf or cnpj values in the json format.
Brazilian identity number for companies without punctuation
Nickname that identifies a user's transactional account in Brazil
Use this parameter only when you have use case of gateway reference ID. For detailed information check here.
Merchant can pass dynamic webhook URL in this field. The webhook authentication would be same as the one configured on the dashboard. Ex: metadata.webhook_url=https://merchant.juspay/response
Merchant can pass this field to skip sending shipping address for Paypal wallet flow.
Merchant can pass this field to enable NO_THREE_DS transactions in Card Payments Flow
The default is set to true. Pass false to for pre-auth orders.
Set it to true if you need to mandate the 3DS challenge for a new card.
User Defined Parameter (UDF)
This field can be used to send any user defined parameters
The UDF parameters for orders can be seen in the JUSPAY dashboard under each order
Example:-
user5349
User Defined Parameter (UDF)
This field can be used to send any user defined parameters
The UDF parameters for orders can be seen in the JUSPAY dashboard under each order
Example:-
user_5349
Status of order
Example:- NEW
Status ID is a numeric id corresponding to the status value.
Unique ID generated by Juspay for the given order
Order Id passed during order creation
Https link using which user can open payment page and perform transaction against the order created
Bad Request
Details of keys missing
Example:-
Mandatory fields are missing
Further Details of keys missing
Have questions?
- Need help? Contact support
- LLM? Read llms.txt

