Order and Line Item Data
Order and line item data includes information about the order and the line items that are contained in the order.
Supported for following methods:
Integration methods | Payment methods | Transactions |
---|---|---|
|
|
|
To view the example of an API request with order and line item data, download the Postman collection.
The order amount (order.amount
) and currency (order.currency
) are mandatory fields that you must define for each order you create.
In addition, you can provide various supplementary details about the order and its individual line items in your request to allow the system to display the data to the payer before they confirm the payment.
- If you are using Hosted Checkout, the data is displayed on the hosted payment page.
- If you are using a browser payment, the payment provider displays the data on their own site where the payer defines their payment details.
General order details
You can provide the following general order-related details in the order object in the request:
order.id
Unique ID for this order.
order.description
Brief description of the order content.
order.shippingAndHandlingAmount
Total shipping and handling amount for the order, including taxes on shipping and handling.
order.taxAmount
Total tax amount for the order. If you do not provide this field but provide any line item data, this amount is computed as the sum of the total tax amount (
order.item[n].unitTaxAmount x order.item[n].quantity
) for all the line items.If you provide both, this field and any line item data, the value in this field must equal the computed value.
order.discount.amount
Total amount of the discount you have applied to the order. If you do not provide this field but provide any line item data, this amount is computed as the sum of the total discount amount (
order.item[n].unitDiscountAmount x order.item[n].quantity
) for all the line items.If you provide both, this field and any line item data, the value in this field must equal the computed value.
order.gratuityAmount
Amount the payer has chosen to provide as a gratuity or tip in addition to the amount they are paying for the goods or services they are purchasing from you. The gratuity amount is included in the total amount of the order you provide in
order.amount
.Theorder.gratuityAmount
field is only applicable to the AUTHORIZE and PAY requests.order.cashbackAmount
Amount the payer has chosen to receive as cash in addition to the amount they are paying for the goods or services they are purchasing from you. The cash back amount is included in the total amount of the order you provide in
order.amount
.Theorder.cashbackAmount
field is only applicable to the AUTHORIZE and PAY requests.
Line item details
order.item[n].name
, order.item[n].quantity
, and order.item[n].unitPrice
fields for that item.You can provide the following line item data in the order.item[]
objects in the request.
order.item[n].brand
Brand of the item.
order.item[n].category
Your category for the item.
order.item[n].description
Description for the item with information such as size and color.
order.item[n].name
Short name describing the item.
order.item[n].quantity
Number of items.
When a decimal quantity is multiplied by amounts (order.item[n].unitPrice
,order.item[n].unitTaxAmount
, ororder.item[n].unitDiscountAmount
), and if the decimal places in the computed value exceed the minor units of the payer's currency, the gateway rounds the total using the round half to even algorithm.
For example, if the payer's currency (USD) has 2 minor units, and 2.555 (quantity) times 3 (unit price) totals 7.665, the rounded item amount equals 7.66. Ensure that you apply this rounding when you provide these amount fields in the request.order.item[n].sku
Stock Keeping Unit (SKU) or the item identifier for this item.
order.item[n].unitPrice
This amount is multiplied by
order.item[n].quantity
to compute the total item amount for the line item. Iforder.itemAmount
is provided, the sum of the total item amount for all the line items must equal the value inorder.itemAmount
.order.item[n].unitTaxAmount
This amount is multiplied by
order.item[n].quantity
to compute the total tax amount for the line item. Iforder.taxAmount
is provided, the sum of the total tax amount for all the line items must equal the value inorder.taxAmount
.order.item[n].unitDiscountAmount
This amount is multiplied by the
order.item[n].quantity
to compute the total discount amount for the line item. Iforder.discount.amount
is provided, the sum of the total discount amount for all the line items must equal the value inorder.discount.amount
.order.itemAmount
If you do not provide this field but provide any line item data, this amount is computed as the sum of the total item amount (
order.item[n].unitPrice x order.item[n].quantity
) for all the line items. If you provide both this field and any line item data, the value in this field must equal the computed value.
The submitted data is returned in the transaction response.
Example of order and line item data fields
"order": { "id": "123", "amount": "100.00", "currency": "USD", "shippingAndHandlingAmount": "55.00", "item": { "brand": "Testco", "category": "H1", "description": "Ergonomic handle and new, compact size", "name": "One-inch spanner", "quantity": "1", "sku": "TCO-1INCH-SPN", "unitTaxAmount": "2", "unitPrice": "50.00" } }