Skip to main content
The relevant meta fields in the order object are: If you have the breakdown per order line, you can send it in each object on the order.lines list:

Example

Let’s say you have:
  • Item 1, which costs 10,buthasadiscountof10, but has a discount of 1
  • Item 2, which costs $3 per unit, and you order 2 units
  • The cost of shipping for the order is $4
  • A discount of $2 on the shipping (e.g. after a certain amount, your shipping cost is reduced)
  • A “Voucher 1” of $3 that applies a discount on the entire order
  • The total tax of $1 that applies to the entire order
  • The total amount of your order (after including taxes, shipping, and applying discounts) is $15
So what you send as the order meta field to Payrails looks like:
  • If you don’t need to specify different taxes or discounts as lines, you can use the totalTax or totalDiscount fields on the order level.
  • If you have the breakdown of items, you don’t need to specify the order.total and lines[*].total, we will calculate it for you.
Last modified on September 30, 2026