---
page_source: https://docs.juspay.io/agoda-integration/docs/order/order-object
page_title: Order object
---


# 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** 




### Payload
- **Order_id**:
  - Description: Unique Identifier for the order. Should be Alphanumeric with character length less than 21.
  - Value: <p>Example:- <br> order-id-9876580 </p>
  - Tags: string, required
- **Amount**:
  - Description: 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.
  - Value: <p>Example:- <br> 1.00 </p>
  - Tags: Double, required
- **Currency**:
  - Description: ISO string of the currency. Default value: INR
  - Tags: string, Required
- **Options.get_client_auth_token**:
  - Description: Client side authenticaion token required for Hyper SDK calls
  - Value: Value : true
  - Tags: string
- **Customer_id**:
  - Description: 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.
  - Value: <p>Example:- <br> customer-id-007 </p>
  - Tags: string
- **Customer_email**:
  - Description: Email address of the customer. If the backend gateway requires it, then you must send this value.
  - Value: <p>Example:- <br> test@gmail.com</p>
  - Tags: string
- **Customer_phone**:
  - Description: Mobile number or fixed line number of the customer. If the backend gateway requires it, then you must send this value.
  - Value: <p>Example:- <br> 9999999912</p>
  - Tags: string
- **Description**:
  - Description: Short description for the order. We send this information to the backend gateways whenever there is a provision for this.
  - Tags: string
- **Return_url**:
  - Description: 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.
  - Value: <p>Example:- <br> https://shop.merchant.com </p>
  - Tags: string
- **Product_id**:
  - Description: An identifier for the product. Fits well for impulse purchase usecases.
  - Value: <p>Example:- <br> John </p>
  - Tags: string
- **Gateway_id**:
  - Description: Specify your preferred gateway for this order.
  - Value: <p>Example:- <br> Wick </p>
  - Tags: string
- **Billing_address_first_name**:
  - Description: First name in the billing address
  - Tags: string
- **Billing_address_last_name**:
  - Description: Last name in the billing address
  - Tags: string
- **Billing_address_line1
**:
  - Description: Line1 in the billing address
  - Tags: string
- **Billing_address_line2**:
  - Description: Line2 in the billing address
  - Tags: string
- **Billing_address_line3
**:
  - Description: Line3 in the billing address
  - Tags: string
- **Billing_address_city**:
  - Description: Billing address city
  - Tags: string
- **Billing_address_state**:
  - Description: Billing address state
  - Tags: string
- **Billing_address_country**:
  - Description: Billing address country
  - Tags: string
- **Billing_address_postal_code**:
  - Description: Billing address postal code or zip code
  - Tags: string
- **Billing_address_phone**:
  - Description: Mobile or phone number in the billing address
  - Tags: string
- **Billing_address_country_code_iso**:
  - Description: ISO Country code Default value: IND
  - Tags: string
- **Shipping_address_first_name**:
  - Description: First name in the shipping address
  - Tags: string
- **Shipping_address_last_name**:
  - Description: Last name in the shipping address
  - Tags: string
- **Shipping_address_line1**:
  - Description: Line1 in the shipping address
  - Tags: string
- **Shipping_address_line2**:
  - Description: Line2 in the shipping address
  - Tags: string
- **Shipping_address_line3**:
  - Description: Line3 in the shipping address
  - Tags: string
- **Shipping_address_city**:
  - Description: Shipping address city
  - Tags: string
- **Shipping_address_state**:
  - Description: Shipping address state
  - Tags: string
- **Shipping_address_country**:
  - Description: Shipping address country
  - Tags: string
- **Shipping_address_postal_code**:
  - Description: Shipping address postal code or zip code
  - Tags: string
- **Shipping_address_phone**:
  - Description: Mobile or phone number in the shipping address
  - Tags: string
- **Shipping_address_country_code_iso**:
  - Description: ISO Country code Default value: IND
  - Tags: string



### **Metadata Object** 




### Payload
- **Metadata.JUSPAY:gateway_reference_id**:
  - Description: **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**
  - Tags: String
- **Webhook_url**:
  - Description: 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](https://merchant.juspay/response)
  - Tags: String



### **User Defined Parameters (UDF)** 




### Payload
- **Udf1 , udf2 , udf3 , udf4, udf5**:
  - Description: 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
  - Tags: String (Upto 255 Characters), No Special Characters Supported
- **Udf6 , udf7 , udf8 , udf9 , udf10**:
  - Description: 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
  - Tags: String (Upto 255 Characters), Special Characters Supported
