Order Create API
This is a Server-to-Server API that takes order parameters as an input and creates an order in the Juspay system.
Consists of two parts.
Username: API Key obtained from Juspay dashboard
Password: Empty string
Example:-
MUQ2QUZEQzhFQTY0OUU5QTIxQzNFNTQwNkFDMEZCOg==
Merchant ID obtained provided by Juspay
Example:-
merchant-id
Pass the date in YYYY-MM-DD format
Example:- 2023-01-01
Unique Identifier for the order. Should be Alphanumeric with character length less than 21.
Example:-
order-id-9876580
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
String that uniquely identifies the customer. It is the ID with which merchant refers to a customer object.
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
A fully qualified URL which the customer will be redirected after payment completion. 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
First Name of customer. This value will be used for customer identification.
Example:-
John
Last name of customer. This value will be used for customer identification.
Example:-
Wick
Use this parameter only when you have Multiple Line of Businesses.
To use multiple MID setup, please pass reference Id as per the following format:
Assume you have two lines of businesses BUS and TRAIN; and using RAZORPAY and PAYU gateways.
For BUS LOB pass the following in order create request. metadata.PAYU:gateway_reference_id : BUS metadata.RAZORPAY:gateway_reference_id : BUS
For TRAIN LOB pass the following in order create request. metadata.PAYU:gateway_reference_id : TRAIN metadata.RAZORPAY:gateway_reference_id : TRAIN
Example:-
BUS
Enum: 'REQUIRED' , "OPTIONAL'.
Defines what kind mandate support is available during a session. Required to create a Mandate.
Chose between the follow values based upon requirements :-
REQUIRED : Mandate is must for completing transaction. Only instruments which support Mandate will be shown
OPTIONAL : Mandate is a user choice for completing transaction.
Example:-
OPTIONAL
mount that can be set as maximum mandate Mandatory only if mandate.amount_rule = VARIABLE </p
Example:-
1000.0
mount that can be set as maximum mandate Mandatory only if mandate.amount_rule = VARIABLE </p
Example:-
1633087969
Mandate start date in UNIX EPOCH timestamp (UTC timezone), from when a mandate will move to EXPIRED state and recurring mandate will not be allowed </p
Example:-
1633088989
Defines the frequency of mandate execution, how often a customer should be charged
Enum :- ONETIME DAILY WEEKLY FORTNIGHTLY MONTHLY BIMONTHLY QUARTERLY HALFYEARLY YEARLY ASPRESENTED
Example:-
1633088989
1-7 when frequency is WEEKLY. In weekly, serial numbers start from Monday. Monday represents 1 and Sunday represents 7.
1-16 when frequency is FORTNIGHTLY. This mandate is executed twice a month. First day of the month is represented by value '1' and ends with '15' on 15th day of the month. Then again starts with '1' for 16th of the month and ends with the last day of the month.
1-31 when frequency is MONTHLY, BIMONTHLY, QUARTERLY, HALFYEARLY, or YEARLY.
Not required when frequency is ONETIME, DAILY, ASPRESENTED. For Razorpay, rule_value will be considered as the last date of the week/month/year. For Paytm, rule_value will be considered as today's date/day
Example:-
1
Enum: FIXED, VARIABLE
In case of FIXED amount_rule, amount will be equal to max amount
Example:-
FIXED
If false, the mandate cannot be revoked by the customer once set. It should be true for Recurring and true/false for ONETIME
Example:-
false
Should be true for ONETIME and false for Recurring.
Example:-
false
Order Id passed during order creation
Status of order
Example:-
NEW
Bad Request
Details of keys missing
Example:-
Mandatory fields are missing
Further Details of keys missing
error
access_denied
error
Internal server Error
Have questions?
- Need help? Contact support
- LLM? Read llms.txt

