Line Items, Tax & Order Details
When you create a checkout session, you can pass full itemized details. Genius Checkout uses them in four places:
- The checkout page (so the customer sees what they're paying for)
- The success page and downloadable receipt
- The payment gateway (PowerTranz
TaxAmountfield, etc.) - Webhook payloads (so your backend can match on
metadata.order_id, etc.)
Example
{
"line_items": [
{ "name": "Island Rum Cake", "quantity": 2, "unit_amount": 2500, "description": "750g" },
{ "name": "Shipping", "quantity": 1, "unit_amount": 1500 }
],
"subtotal": 6500,
"tax_name": "GCT",
"tax_rate": 0.15,
"tax_amount": 975,
"amount": 7475
}Field reference
| Field | Type | Description |
|---|---|---|
line_items[].name | string | Item name shown on checkout and receipt |
line_items[].quantity | integer | How many |
line_items[].unit_amount | integer | Per-unit price in the smallest currency unit (cents) |
line_items[].description | string | Optional detail line under the item name |
subtotal | integer | Sum of line items before tax (cents) |
tax_name | string | Label like GCT, VAT, Sales Tax |
tax_rate | number | Decimal (0.15 = 15%) — used for display |
tax_amount | integer | Pre-computed tax in cents — what's actually charged |
amount | integer | Total charged (cents). Should equal subtotal + tax_amount. |
Validation
amount is the source of truth for the charge. subtotal + tax_amount is shown to the customer. If they don't match exactly, the customer sees the breakdown but is charged amount — keep them consistent unless you have a reason not to.
Common patterns
No tax
Omit tax_name, tax_rate, tax_amount. amount should equal subtotal.
Tax included in price
Some Caribbean jurisdictions include VAT in the displayed price. Set tax_name and tax_amount to communicate the embedded tax to the gateway, but compute amount to match the price the customer expects.
Subscription with one-off setup fee
Pass two line items — Setup fee and First month subscription. The token created from the charge can be used for renewals at just the recurring amount. See Tokenization.
