order.paid
The order is paid, once per order in this browser: on the checkout after order.created when it was paid at once, else after order.loaded on the first page that loads it paid.
CODE
next.on('order.paid', (data, event) => {});Data
Present: always; optional when it may be missing; campaign once the campaign is loaded; priced once the server priced the cart.
| Field | Type | Present | |
|---|---|---|---|
ref_id | string | always | The order's reference: ref_id in post-purchase page URLs. |
number | string | optional | The order number customers see. |
currency | string | optional | ISO 4217, such as USD. |
test | boolean | always | true for a test order. |
paid | boolean | always | true once the order is paid; false while the shopper pays at a gateway. |
lines | OrderItem[] | always | |
coupons | string[] | always | The codes the shopper applied at checkout in this tab, uppercase. |
total_discount | number | always | The discounts on the order. |
shipping_method | Pick<ShippingMethod, "name" | "price"> & { tax?: number } | optional | The shipping method's name, its price, and the tax in that price. |
tax | number | always | The tax in the order: its lines' and shipping's. |
total | number | always | What the shopper paid. |
user | Pick<User, "first_name" | "last_name" | "email" | "phone"> | optional | |
shipping_address | Address | optional | |
billing_address | Address | optional | |
payment_method | string | optional | The API's code for the payment method, such as card_token or paypal. |
supports_upsells | boolean | always | true when upsells can be added to the order. |
status_url | string | optional | The order's status page on the store. |
OrderItem
One line of an order. Prices are numbers in the order's currency, as the shopper paid them.
| Field | Type | Present | |
|---|---|---|---|
id | string | always | The order line's id. |
product_id | number | optional | The product in the store. |
product_title | string | always | The product's name as customers see it. |
variant_id | number | optional | The product variant. |
variant_title | string | optional | The variant's name, such as Black / M. |
sku | string | optional | The product's Stock Keeping Unit. |
image | string | optional | |
quantity | number | always | |
price | number | always | What one unit cost after discounts. |
original_price | number | always | What one unit cost before discounts. |
total | number | always | What the line cost; price is total / quantity, rounded to the cent. |
tax | number | always | The tax in total; the line before tax is total − tax. |
upsell | boolean | always | true for a line an upsell added. |
User
The shopper, as the store's user on the Open Cart and the order.
| Field | Type | Present | |
|---|---|---|---|
email | string | optional | As typed, trimmed; none when data-trigger-on created the user without one. |
first_name | string | always | |
last_name | string | always | |
phone | string | optional | In E.164 once the address service read it, else the digits typed. |
accepts_marketing | boolean | always | The marketing checkbox, as sent with the Open Cart and the order. |
language | string | always | The language the store keeps for the shopper, such as en. |
ip | string | optional | The shopper's IP address, as the store recorded it with the Open Cart, else as the address service saw it; none when neither knows it. |
user_agent | string | always | As the store recorded it with the Open Cart, else the browser's. |
Address
A postal address as the shopper entered it, once every field its country requires is valid.
| Field | Type | Present | |
|---|---|---|---|
first_name | string | always | |
last_name | string | always | |
line1 | string | always | |
line2 | string | optional | |
city | string | optional | None in a country whose addresses have no city, such as Singapore. |
state | string | optional | The state or province code, in a country that has them. |
postcode | string | optional | |
country | string | always | ISO 3166-1 alpha-2. |
phone | string | optional | In E.164 once the address service read it, else the digits typed. |
Example
The second argument, with data inside. See Events for the envelope's fields.
CODE
{
"event_id": "3f2b8c1d9e7a4b6c8d5e2f1a0b9c8d7e",
"event_type": "order.paid",
"object": "order",
"data": {
"ref_id": "R1",
"number": "1001",
"currency": "USD",
"test": false,
"paid": true,
"lines": [
{
"id": "11",
"product_title": "Earbuds",
"sku": "EB-2",
"image": "https://img.test/eb.png",
"quantity": 2,
"price": 48.06,
"original_price": 99,
"total": 96.12,
"tax": 7.12,
"upsell": false
}
],
"coupons": [],
"total_discount": 0,
"shipping_method": {
"name": "Express",
"price": 9.99,
"tax": 0
},
"tax": 7.12,
"total": 106.11,
"user": {
"email": "jane@example.com",
"first_name": "Jane",
"last_name": "Doe"
},
"shipping_address": {
"first_name": "Jane",
"last_name": "Doe",
"line1": "1 Main St",
"city": "Austin",
"state": "TX",
"postcode": "73301",
"country": "US"
},
"billing_address": {
"first_name": "Ann",
"last_name": "Lee",
"line1": "2 Side St",
"city": "Reno",
"state": "NV",
"country": "US"
},
"payment_method": "card_token",
"supports_upsells": true
},
"created_at": "2026-11-04T08:30:00.000Z",
"session_id": "0b8f3c2d1e4a4f6b9c7d5e3f2a1b0c9d",
"sdk_version": "0.5.0"
}