Create Order API
The Create Order API 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, which is required for further operations.
The API key used for authentication must be Base64 encoded
Key Parameters
Mandatory
amount– The payment amount for the order.order_id– A unique identifier for the order, generated by you (the merchant).
Conditional
Customer details such as
email,phone_number, andcustomer_idare optional. However, their usage depends on the payment gateway or aggregator configured.
UDF (User Defined Fields)
UDFs let you send additional information that is required to be stored at Juspay for any analytics, reporting, or operational purposes. In some cases, these UDFs are passed to the downstream gateways as well.
Juspay supports 10 UDFs: udf1 through udf10.
Behavior:
The values passed in UDFs are returned back in the order status response and also included in webhooks sent to the merchant.
Special Characters:
Use
udf1toudf5for values without special characters.Use
udf6toudf10if the values contain special characters.
Metadata
metadatais used to send custom parameters to the payment aggregators. aggregators.These parameters are sent in addition to Juspay’s default parameters.
Use this field if you need to pass aggregator-specific values that are not covered by standard fields.
|
Payment Gateways
|
Fields
|
|---|---|
CCAVENUE_V2
| metadata.CCAVENUE_V2:promo_code
|
BILLDESK
| metadata.BILLDESK:AdditionalInfo3
|
BILLDESK
| metadata.BILLDESK:AdditionalInfo4
|
FREECHARGE
| metadata.FREECHARGE:campaignCode
|
GOCASHFREE
| metadata.CASHFREE:metadata1
|
HSBC_UPI
| metadata.HSBC_UPI:addInfo
|
MIGS
| metadata.MIGS:vpc_AddendumData
|
MIGS
| metadata.MIGS:vpc_OrderInfo
|
OLAMONEY
| metadata.OLAMONEY:couponCode
|
PAYTM
| metadata.PAYTM:PROMO_CAMP_ID
|
PAYTM
| metadata.PAYTM:CUST_ID
|
PAYTM
| metadata.PAYTM:MERC_UNQ_REF
|
PAYTM_V2
| metadata.PAYTM_V2:MERC_UNQ_REF
|
PAYTM_V2
| metadata.PAYTM_V2:CUST_ID
|
TATAPAY
| metadata.TATAPAY: merchantTxnMetadata
|
PAYU
| metadata.PAYU:offer_key
|
PAYU
| metadata.PAYU:offer_auto_apply
|
PAYU
| metadata.PAYU:udf1
|
PAYU
| metadata.PAYU:udf2
|
PAYU
| metadata.PAYU:udf3
|
PAYU
| metadata.PAYU:udf4
|
PAYU
| metadata.PAYU:udf5
|
PHONEPE
| metadata.PHONEPE:merchantContext
|
RAZORPAY
| metadata.RAZORPAY:notes[cust_id]
|
RAZORPAY
| metadata.RAZORPAY:notes[cust_name]
|
RAZORPAY
| metadata.RAZORPAY:offer_id
|
RAZORPAY
| metadata.razorpay:PNR
|
RAZORPAY
| metadata.razorpay:PaymentID
|
RAZORPAY
| metadata.razorpay:lob
|
RAZORPAY
| metadata.RAZORPAY:notes
Ex: metadata.RAZORPAY:notes={"key1":"value1","key2":"value2","key3":"value3"} |
Subvention Amount
| metadata.subvention_amount
|
TPSL
| metadata.TPSL:shoppingCartDetails
|
TPSL
| metadata.TPSL:accountNo
|
ZAAKPAY
| metadata.ZAAKPAY:productDescription
|
ZAAKPAY
| metadata.ZAAKPAY:product1Description
|
PAYPAL
| metadata.PAYPAL:landing_page
|
PAYPAL
| metadata.PAYPAL:phone_number
|
PAYPAL
| metadata.PAYPAL:country_code
|
PAYPAL
| metadata.PAYPAL:first_name
|
PAYPAL
| metadata.PAYPAL:last_name
|
PAYPAL
| metadata.PAYPAL:experience_id
|
PAYPAL
| metadata.PAYPAL:brand_name
|
PAYPAL
| metadata.PAYPAL:additional_data
|
PAYPAL - For Link and Pay
| metadata.PAYPAL:lnp_product_name
|
PAYPAL - For Link and Pay
| metadata.PAYPAL:lnp_product_code
|
PAYPAL - For Link and Pay
| metadata.PAYPAL:lnp_charge_pattern
|
PAYPAL - For Link and Pay
| metadata.PAYPAL:direct_wallet_version
|
PAYPAL - For Link and Pay
| metadata.PAYPAL:purchase_category
|
AMAZONPAY
| metadata.AMAZONPAY:sellerNote
|
Subvention Amount
It is the interest component of a "No-Cost EMI" offer that is covered by a merchant or manufacturer. Therefore this amount is not considered for EMI calculation.
For example : If the Order amount is 100 and the subvention amount is 10, interest will be calculated on 100-10 that comes to 90. subvention_amount can be any value between 0 and the total order amount.
If
subvention_amount=order_amount, the EMI is a no-cost EMI (the customer pays only the principal).This mechanism of running offers or subvention amount is the responsibility of merchants in collaboration with PG/Banks.
Payment Links
When you create an order, the API response includes payment links for web, mobile, and iFrame.
Web and mobile links can be shared directly with customers, for example through email or SMS.
The iFrame link can be embedded in your own site or app if you want to maintain your brand’s checkout experience.
Payment links are valid only until the order expires. You can configure the order expiry in the [Juspay Dashboard]. After expiry, all associated links stop working.
API Latency Guidelines
What is API Latency?
Time taken by the server to respond to the API request.
Average API Percentile Metrics and Recommended Timeout
TP50 (ms): This represents the median latency, meaning 50% of all requests are completed in this time or less. It indicates the typical performance experienced by the majority of users.
TP90 (ms): This value shows that 90% of requests are completed within this time, leaving 10% of requests that take longer. It gives insight into the performance for a broader set of users, beyond the median.
TP99 (ms): This value indicates that 99% of requests finish within this time, with only 1% of requests taking longer. It helps identify outlier cases where latency may become an issue for a small group of users.
TP99.9 (ms): This metric captures extreme latency outliers, where only 0.1% of requests take longer than this value. It’s useful for understanding edge cases where performance degrades for very few users.
TP99.99 (ms): This measures the most rare and severe performance outliers, where just 0.01% of requests exceed this time. Monitoring this helps in addressing the rarest and most critical latency issues that may impact user experience in exceptional scenarios.
|
Transaction Percentile
|
Latency (ms)
|
|---|---|
TP50 (ms)
| 46.14
|
TP90 (ms)
| 68.42
|
TP99 (ms)
| 583
|
TP99.9 (ms)
| 1511.28
|
Recommended Timeout(ms)
| 2000
|
The recommended timeouts are based on TP99.9 data, though edge cases (0.01% of requests) may still exceed these limits and are captured in the TP99.99 data as shown below.
|
Transaction Percentile
|
Latency (ms)
|
|---|---|
TP99.99 (ms)
| 2398.42
|
Recommended Timeout(ms)
| 3000
|

