Order Object

Order Object is used to specify the order parameters in the payment APIs. It is referenced in Payment APIs as order.parameter (Ex. order.amount,order.order_id)

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

Order Object

Basic Parameters

order_id
string
required

Unique Identifier for the order. Should be Alphanumeric with character length less than 21.

Example:-
order-id-9876580

amount
Double
required

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

currency
string
Required

ISO string of the currency. Default value: INR

options.get_client_auth_token
string

Client side authenticaion token required for Hyper SDK calls

Example:- Value : true

customer_id
string

It is the ID with which merchant refers to a customer object. This id is used to access the stored payment methods, allow EMI transactions and setup subscriptions.
In case of guest login it should be an empty string.

Example:-
customer-id-007

customer_email
string

Email address of the customer. If the backend gateway requires it, then you must send this value.

Example:-
test@gmail.com

customer_phone
string

Mobile number or fixed line number of the customer. If the backend gateway requires it, then you must send this value.

Example:-
9999999912

description
string

Short description for the order. We send this information to the backend gateways whenever there is a provision for this.

return_url
string

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

product_id
string

An identifier for the product. Fits well for impulse purchase usecases.

Example:-
John

gateway_id
string

Specify your preferred gateway for this order.

Example:-
Wick

billing_address_first_name
string

First name in the billing address

billing_address_last_name
string

Last name in the billing address

billing_address_line1
string

Line1 in the billing address

billing_address_line2
string

Line2 in the billing address

billing_address_line3
string

Line3 in the billing address

billing_address_city
string

Billing address city

billing_address_state
string

Billing address state

billing_address_country
string

Billing address country

billing_address_postal_code
string

Billing address postal code or zip code

billing_address_phone
string

Mobile or phone number in the billing address

billing_address_country_code_iso
string

ISO Country code Default value: IND

shipping_address_first_name
string

First name in the shipping address

shipping_address_last_name
string

Last name in the shipping address

shipping_address_line1
string

Line1 in the shipping address

shipping_address_line2
string

Line2 in the shipping address

shipping_address_line3
string

Line3 in the shipping address

shipping_address_city
string

Shipping address city

shipping_address_state
string

Shipping address state

shipping_address_country
string

Shipping address country

shipping_address_postal_code
string

Shipping address postal code or zip code

shipping_address_phone
string

Mobile or phone number in the shipping address

shipping_address_country_code_iso
string

ISO Country code Default value: IND

Metadata Object

metadata.JUSPAY:gateway_reference_id
String

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 BUS transactions should be processed via BOKU and TRAIN transactions via MIDTRANS.

Configure BOKU with Gateway Reference ID as BUS and MIDTRANS with Gateway Reference ID as TRAIN in the dashboard.

For BUS transactions, pass the following parameter in Session API - metadata.JUSPAY:gateway_reference_id : BUS

For TRAIN transactions, pass the following parameter in Session API - metadata.JUSPAY:gateway_reference_id : TRAIN

webhook_url
String

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/responselink icon

User Defined Parameters (UDF)

udf1 , udf2 , udf3 , udf4, udf5
String (Upto 255 Characters)
No Special Characters Supported

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:-
newcustomer

udf6 , udf7 , udf8 , udf9 , udf10
String (Upto 255 Characters)
Special Characters Supported

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:-
repeat_customer

Last updated 2 years ago