Checkout
The Checkout API opens a checkout session from storefront JavaScript and returns the URL to send the customer to. Themes use it for two flows: a Buy now button that takes one product straight to checkout without going through the cart, and a Pay now button that reopens payment for an order the customer left unpaid.
The examples below send an X-CSRF-Token header. See Authentication for how to read the token from the cookie. The bodies on this page are JSON, so set Content-Type to application/json.
All Ajax API requests should use locale-aware URLs to give visitors a consistent experience.
Create a checkout session
POST /{locale}/api/checkout/order
Create a checkout session for a set of variants. The response returns the order_token that the other endpoints on this page take, and the checkout_url the buyer is sent to.
Example request
const data = {
line_items: [
{
product_id: '14a309ec-b966-4cf9-a9bb-33baa821fdbc',
variant_id: 'fff360dd-6457-466a-98b3-16878bacef5b',
quantity: 1
}
],
refer_info: {
source: 'buy_now'
}
};
fetch(window.SHOPLAZZA.routes.root + '/api/checkout/order', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-Token': getCsrfToken()
},
body: JSON.stringify(data)
})
.then((response) => response.json())
.then((data) => {
// do something...
});
Request parameters
- Schema
- Example
- Array [
- ]
line_items object[]
The variants to check out.
The product id of the variant.
The variant id.
The quantity of the variant.
refer_info object
The source of the request. It has a source property whose values are add_to_cart, buy_now, or cart.
{
"line_items": [
{
"product_id": "14a309ec-b966-4cf9-a9bb-33baa821fdbc",
"variant_id": "fff360dd-6457-466a-98b3-16878bacef5b",
"quantity": 1
}
],
"refer_info": {
"source": "buy_now"
}
}
Response
- Schema
- Example
- Array [
- Array [
- ]
- Array [
- ]
- ]
- Array [
- Array [
- ]
- Array [
- ]
- ]
Request result flag; success or 0 means the request succeeded.
Result message returned with the response.
List of errors returned when the request fails.
data object
The response payload.
Token that identifies the order.
Relative URL of the checkout page for the order.
prices object
Amount breakdown of the order.
Total price of the cart after discounts.
Sum of the line item prices before discounts.
Shipping fee of the order.
Tax of the order.
Total discount applied to the order.
Discounted total for the applied discounts.
Discount that comes from the discount code.
Currency code of the order, for example USD.
Discounts applied to this object.
items object[]
List of line items in the cart.
Barcode of the variant.
Compare-at price of the item.
Cost price of the variant.
Whether the line item is a custom item.
Discounts applied to this object.
Total discount applied.
Combined price of all units in this line item, after line-level discounts.
ID of the line item.
image object
Image of the line item's variant.
Alt text of the image.
Height of the image, in pixels.
Path of the image file on the image server.
URL of the image.
Width of the image, in pixels.
Combined price of all units in this line item, before discounts.
Whether mixed wholesale is supported.
Note attached to the line item.
options object[]
Option values of the line item's variant.
Name of the product option, for example Color.
Value selected for this product option.
Price of a single unit of the line item.
Handle of the product.
ID of the product.
Tags of the product.
Title of the product.
Relative URL of the product page.
Custom properties captured on the line item.
Quantity of the item.
Whether shipping is required.
SKU of the variant, used for inventory tracking.
SPU of the product.
Tax of the line item.
Tax rate applied.
Whether tax is charged.
Trunk price of the line item.
ID of the variant.
Title of the variant, for example Blue, Size M.
Vendor of the product.
URL of the product vendor.
Weight of the variant.
Unit of the weight, for example kg.
wholesale_price object[]
Wholesale price tiers.
Minimum quantity required for this wholesale tier.
Unit price of this wholesale tier.
Total price of the line item.
Tax breakdown of the order.
Price of a single unit of this line item, after line-level discounts.
Whether the item is a free gift.
Package length of the line item.
Package width of the line item.
Package height of the line item.
Unit of the package dimensions.
HS code used for the customs declaration.
Country code where the product was produced.
Customs duty of the line item.
Product type.
Key required, together with the order ID, to open the checkout page.
line_items object[]
List of line items.
Barcode of the variant.
Compare-at price of the item.
Cost price of the variant.
Whether the line item is a custom item.
Discounts applied to this object.
Total discount applied.
Combined price of all units in this line item, after line-level discounts.
ID of the line item.
image object
Image of the line item's variant.
Alt text of the image.
Height of the image, in pixels.
Path of the image file on the image server.
URL of the image.
Width of the image, in pixels.
Combined price of all units in this line item, before discounts.
Whether mixed wholesale is supported.
Note attached to the line item.
options object[]
Option values of the line item's variant.
Name of the product option, for example Color.
Value selected for this product option.
Price of a single unit of the line item.
Handle of the product.
ID of the product.
Tags of the product.
Title of the product.
Relative URL of the product page.
Custom properties captured on the line item.
Quantity of the item.
Whether shipping is required.
SKU of the variant, used for inventory tracking.
SPU of the product.
Tax of the line item.
Tax rate applied.
Whether tax is charged.
Trunk price of the line item.
ID of the variant.
Title of the variant, for example Blue, Size M.
Vendor of the product.
URL of the product vendor.
Weight of the variant.
Unit of the weight, for example kg.
wholesale_price object[]
Wholesale price tiers.
Minimum quantity required for this wholesale tier.
Unit price of this wholesale tier.
Total price of the line item.
Tax breakdown of the order.
Price of a single unit of this line item, after line-level discounts.
Whether the item is a free gift.
Package length of the line item.
Package width of the line item.
Package height of the line item.
Unit of the package dimensions.
HS code used for the customs declaration.
Country code where the product was produced.
Customs duty of the line item.
Product type.
Line items that could not be placed into the order.
URL the customer should be redirected to.
{
"state": "success",
"message": "success",
"errors": [],
"data": {
"order_token": "2446407200000000000000",
"checkout_url": "/checkout/2446407200000000000000",
"prices": {
"total_price": "1.00",
"subtotal_price": "1.00",
"shipping_price": "0.00",
"tax_price": "0.00",
"discount_price": "0.00",
"discount_line_item_price": "0.00",
"discount_code_price": "0.00",
"currency_code": "USD"
},
"discount_applications": [],
"items": [
{
"barcode": "",
"compare_at_price": "1.00",
"cost_price": "1.00",
"custom": false,
"discount_applications": [],
"discount_total": "0.00",
"final_line_price": "1.00",
"id": "ec41e0a6-39ee-44ba-b832-d5e10c07a81d",
"image": {
"alt": "",
"height": 1500,
"path": "free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
"src": "//img.staticdj.com/free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
"width": 3000
},
"line_price": "1.00",
"mixed_wholesale": false,
"note": "",
"options": [
{
"name": "Size",
"value": "01"
}
],
"price": "1.00",
"product_handle": "sample-product",
"product_id": "14a309ec-b966-4cf9-a9bb-33baa821fdbc",
"product_tags": [],
"product_title": "sample-product",
"product_url": "/products/sample-product",
"properties": "{}",
"quantity": 1,
"requires_shipping": true,
"sku": "",
"spu": "",
"tax_code": "",
"tax_price": "0.00",
"tax_rate": "0.0000",
"taxable": false,
"trunk_price": "1.00",
"variant_id": "fff360dd-6457-466a-98b3-16878bacef5b",
"variant_title": "01",
"vendor": "",
"vendor_url": "",
"weight": "0.00",
"weight_unit": "kg",
"wholesale_price": [
{
"min_quantity": 1,
"price": "1.00"
}
],
"total": "",
"tax_lines": [],
"final_price": "",
"is_free_gift": false,
"excluded_tax_sub_total": "",
"length": 0,
"width": 0,
"height": 0,
"dimension_unit": "",
"hs_code": "",
"origin_country_code": "",
"origin_price": "",
"duty_price": "",
"product_type": "default"
}
],
"key": "155acc5b301bf2c259ebeeb6f6b6ba",
"line_items": [
{
"barcode": "",
"compare_at_price": "1.00",
"cost_price": "1.00",
"custom": false,
"discount_applications": [],
"discount_total": "0.00",
"final_line_price": "1.00",
"id": "ec41e0a6-39ee-44ba-b832-d5e10c07a81d",
"image": {
"alt": "",
"height": 1500,
"path": "free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
"src": "//img.staticdj.com/free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
"width": 3000
},
"line_price": "1.00",
"mixed_wholesale": false,
"note": "",
"options": [
{
"name": "Size",
"value": "01"
}
],
"price": "1.00",
"product_handle": "sample-product",
"product_id": "14a309ec-b966-4cf9-a9bb-33baa821fdbc",
"product_tags": [],
"product_title": "sample-product",
"product_url": "/products/sample-product",
"properties": "{}",
"quantity": 1,
"requires_shipping": true,
"sku": "",
"spu": "",
"tax_code": "",
"tax_price": "0.00",
"tax_rate": "0.0000",
"taxable": false,
"trunk_price": "1.00",
"variant_id": "fff360dd-6457-466a-98b3-16878bacef5b",
"variant_title": "01",
"vendor": "",
"vendor_url": "",
"weight": "0.00",
"weight_unit": "kg",
"wholesale_price": [
{
"min_quantity": 1,
"price": "1.00"
}
],
"total": "",
"tax_lines": [],
"final_price": "",
"is_free_gift": false,
"excluded_tax_sub_total": "",
"length": 0,
"width": 0,
"height": 0,
"dimension_unit": "",
"hs_code": "",
"origin_country_code": "",
"origin_price": "",
"duty_price": "",
"product_type": "default"
}
],
"invalid_line_items": [],
"redirect_url": ""
}
}
Get a checkout session
GET /{locale}/api/checkout/order/{order_id}
Get the current state of a checkout session, where order_id is the order token from the checkout URL.
Example request
fetch(window.SHOPLAZZA.routes.root + '/api/checkout/order/2446407200000000000000')
.then((response) => response.json())
.then((data) => {
// do something...
});
Request parameters
The order token returned when the checkout session was created.
Response
- Schema
- Example
- Array [
- Array [
- ]
- Array [
- ]
- ]
- Array [
- Array [
- ]
- ]
- Array [
- ]
data object
The response payload.
ID of the order.
refer_info object
Information about how the customer reached the store.
The visitor's IP address.
Order number.
Time when the order was created; same as create_at.
Time when the order was paid.
Status of the order, for example opened, placed, finished.
Payment status of the order, for example waiting, paid.
Fulfillment status, for example waiting, shipped, finished.
After-sales status of the order.
Status of the order recall email; waiting pending, send sent.
Note the merchant added to the order.
Reason the order was cancelled.
Discount code applied to the order.
Note the customer left during checkout.
Currency code of the order, for example USD.
Whether the shipping address can still be edited.
config object
Configuration of the order.
Layout of the checkout page, for example three_step.
Whether shipping is required.
Whether product prices include tax.
market_setting object
Market settings that apply to the order.
Language code of the store's primary market.
Language code of the market.
ID of the market the order belongs to.
Currency code of the market.
market_currency_symbol object
Currency symbol of the market.
Currency code, for example USD.
Currency symbol, for example $.
Content shown to the left of the amount.
Content shown to the right of the amount.
Base currency code of the market.
market_base_currency_symbol object
Symbol of the base currency of the market.
Currency code, for example USD.
Currency symbol, for example $.
Content shown to the left of the amount.
Content shown to the right of the amount.
ID of the store's primary market.
Currency code of the store's primary market.
primary_market_currency_symbol object
Currency symbol of the store's primary market.
Currency code, for example USD.
Currency symbol, for example $.
Content shown to the left of the amount.
Content shown to the right of the amount.
market_price_setting object
Country code of the market.
Discounts applied to this object.
Time when the order was cancelled.
Shipping plan selected for the order.
customer object
The customer details.
ID of the customer.
Email address of the customer.
First name of the customer or recipient.
Last name of the customer or recipient.
Phone number of the customer.
Tags attached to the object.
Whether the customer is subscribed to marketing messages.
Full name of the customer.
Note attached to the object.
Contact of the customer, either an email address or a phone number.
Contact type, either email or phone.
Creation time, in ISO-8601 format.
Whether the customer has registered an account.
Time when the customer completed registration.
Where the customer record came from.
Whether the customer is exempt from taxes.
customer_extra_info object
Additional statistics about the customer.
Number of completed orders placed by the customer.
Total amount of the completed orders placed by the customer.
Province or state of the address.
Province or state code.
Currency code of the order, for example USD.
Number of products the customer has purchased.
Time when the customer placed the first order.
Time when the customer placed the last order.
shipping_address object
Shipping address of the order.
ID of the address.
First name of the customer or recipient.
Last name of the customer or recipient.
Email address associated with the address.
Phone number associated with the address.
ISO country code of the address.
Country name of the address.
Province or state code.
Province or state of the address.
Area or district of the address.
City of the address.
Street address of the recipient.
Primary street address.
Postal or ZIP code.
Company name of the address.
Area code of the phone number.
Latitude of the address.
Longitude of the address.
Tags attached to the object.
Billing address of the order.
line_items object[]
List of line items.
ID of the line item.
Title of the product.
ID of the product.
Handle of the product.
ID of the variant.
Title of the variant, for example Blue, Size M.
Quantity of the item.
Fulfillment status, for example waiting, shipped, finished.
Note attached to the line item.
image object
Image of the line item's variant.
Alt text of the image.
Height of the image, in pixels.
Path of the image file on the image server.
URL of the image.
Width of the image, in pixels.
Compare-at price of the item.
Price of a single unit of the line item.
Total price of the line item.
SKU of the variant, used for inventory tracking.
Weight of the variant.
Unit of the weight, for example kg.
Whether tax is charged.
Whether shipping is required.
options object[]
Option values of the line item's variant.
Name of the product option, for example Color.
Value selected for this product option.
Vendor of the product.
Relative URL of the product page.
Custom properties captured on the line item.
Barcode of the variant.
SPU of the product.
URL of the product vendor.
Tags of the product.
Discounts applied to this object.
Tax rate applied.
Tax of the line item.
wholesale_price object[]
Wholesale price tiers.
Unit price of this wholesale tier.
Minimum quantity required for this wholesale tier.
Whether mixed wholesale is supported.
Cost price of the variant.
Whether the line item is a custom item.
Trunk price of the line item.
main_currency_prices object
Order amounts converted into the store's main currency.
Compare-at price of the item.
Unit price converted into the store's main currency.
Total converted into the store's main currency.
Tax of the line item.
Cost price of the variant.
Trunk price of the line item.
Exchange rate used for the conversion.
Tax breakdown of the order.
Package length of the line item.
Package width of the line item.
Package height of the line item.
Unit of the package dimensions.
Country code where the product was produced.
HS code used for the customs declaration.
Customs duty of the line item.
Combined price of all units in this line item, before discounts.
Total discount applied.
Combined price of all units in this line item, after line-level discounts.
Price of a single unit of this line item, after line-level discounts.
Payment details of the order.
Whether this is a test order.
Relative URL of the order status page.
Key used together with the order ID to access the order.
Amount of the order that is still unpaid.
Refunded amount of the order.
Installment fee charged on the order.
Total amount already paid for the order.
Time when the order was last updated.
Gift cards applied to the order.
List of the order payment records.
Relative URL of the checkout page for the order.
Time when the order was completed.
List of shipments for the order.
main_currency_prices object
Order amounts converted into the store's main currency.
Sum of the line item prices before order-level discounts.
Total shipping fee of the order.
Total tax applied to the order.
Total discount applied.
Total converted into the store's main currency.
Total tip received for the order.
Total refunded amount of the order.
Exchange rate used for the conversion.
Order type; 0 is a regular order, 1 is a gift card order.
Whether product prices include tax.
location_line object
Address of the merchant's warehouse.
ID of the address.
ID of the warehouse.
Name of the warehouse.
First name of the customer or recipient.
Last name of the customer or recipient.
Phone number associated with the address.
Email address associated with the address.
Country name of the address.
ISO country code of the address.
Province or state of the address.
Province or state code.
Area or district of the address.
City of the address.
Street address of the recipient.
Primary street address.
Company name of the address.
Latitude of the address.
Longitude of the address.
Postal or ZIP code.
Area code of the phone number.
Total additional charges of the order.
Breakdown of the additional charges.
tax_lines object
Tax breakdown of the order.
Tags attached to the object.
order_customer object
Customer information recorded on the order.
First name of the customer or recipient.
Last name of the customer or recipient.
Email address of the customer.
Phone number of the customer.
Total customs duty and tax of the order.
additional_rules object[]
show_rules object[]
checkout_settings object
Checkout settings of the store.
Layout of the checkout page, for example three_step.
reduction_show object
zip_check_config object
zip_check_config_v2 object
shipping_cpf object
config_info object
config_default object
config_br object
is_show_countries object
cpf_cnpj object
rut object
other object
address_setting object
How the name fields are laid out in the address form.
Display setting of the email field in the address form.
Display setting of the phone field in the address form.
Display setting of the company field in the address form, for example hidden.
Display setting of the street address field in the address form.
Display setting of the street address field in the address form.
Which name field is required, for example last_name.
How contact fields are collected in the address form.
identification_info object
default object
rules object[]
address_settings object
How the address form is configured.
How the name fields are laid out in the address form.
Display setting of the email field in the address form.
Display setting of the phone field in the address form.
Display setting of the company field in the address form, for example hidden.
Display setting of the street address field in the address form.
Display setting of the street address field in the address form.
Which name field is required, for example last_name.
How contact fields are collected in the address form.
customer_info object
Contact information filled in at checkout.
Email address of the customer.
First name of the customer or recipient.
Last name of the customer or recipient.
Phone number of the customer.
payment_settings object
Payment settings available at checkout.
settings object
dynamic_config object
express_checkout_config object
express_checkout_config object
Token that identifies the order.
Currency symbol of the order.
Where the currency symbol is placed, left or right.
Amount of the order that is still unpaid.
Total of all taxes on the order.
prices object
Amount breakdown of the order.
Sum of the line item prices before discounts.
Shipping fee of the order.
Tax of the order.
Discount that comes from the discount code.
Total discount applied to the order.
Total price of the cart after discounts.
Total shipping tax of the order.
Discounted total for the applied discounts.
Total tip received for the order.
Discount applied to the shipping fee.
Subtotal after discounts.
Amount paid with gift cards.
Total amount already paid for the order.
Amount of the order that is still unpaid.
Total of all taxes on the order.
Discount that comes from the payment method.
Total additional charges of the order.
Total customs duty and tax of the order.
except_notification object
Information about an exception raised while completing the order.
Exception code, for example total_price_changed.
ip_address object
Location resolved from the customer's IP address.
Country code resolved from the customer's IP address.
Province name resolved from the customer's IP address.
Country name resolved from the customer's IP address.
City of the address.
The visitor's IP address.
Titles of the store policies shown at checkout.
Layout of the checkout page, for example three_step.
Current step of the checkout flow.
Request result flag; success or 0 means the request succeeded.
Result message returned with the response.
List of errors returned when the request fails.
{
"data": {
"id": "2446407200000000000000",
"refer_info": {
"address_check": false,
"client_id": "1788247080462259",
"country": "US",
"customer_session": "879f8b8f-c3a0-483c-baf6-f5a55a7ff5b4",
"domain": "your-store.myshoplaza.com",
"fbc": "",
"fbp": "",
"inventory_deduction": "order_created",
"ip": "203.0.113.10",
"seg": "A",
"session_id": "1788402790610476",
"source": "buy_now",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36"
},
"order_no": "ZYJ33469",
"create_time": "2026-09-03T02:37:43Z",
"placed_at": null,
"status": "opened",
"financial_status": "waiting",
"fulfillment_status": "initialled",
"post_sale_status": null,
"email_status": "send",
"note": null,
"cancel_reason": null,
"discount_code": "",
"customer_note": "",
"currency_code": "USD",
"shipping_address_editable": true,
"config": {
"page_type": "three_step",
"requires_shipping": true,
"checkout_business_type": 0,
"product_tax_included": false,
"checkout_template_type": 0,
"market_setting": {
"primary_market_lang": "en-US",
"market_lang": "en-US",
"market_id": "653506617437848647",
"market_currency": "USD",
"market_currency_symbol": {
"code": "USD",
"val": "$",
"left": "$",
"right": ""
},
"market_base_currency": "USD",
"market_base_currency_symbol": {
"code": "USD",
"val": "$",
"left": "$",
"right": ""
},
"primary_market_id": "653506617437848647",
"primary_market_currency": "USD",
"primary_market_currency_symbol": {
"code": "USD",
"val": "$",
"left": "$",
"right": ""
},
"market_price_setting": {
"local_currency_enabled": false,
"custom_rate_enabled": false,
"custom_rate": 0,
"rate": 1,
"back_rate": 1,
"actual_rate": 1,
"base_to_local": 0,
"local_to_base": 0,
"adjust": 0,
"price_round_enabled": true
},
"market_country": "US"
}
},
"discount_applications": [],
"canceled_at": null,
"fail_code": null,
"shipping_line": [],
"customer": {
"id": "9fe44049-abab-4fed-ab3d-1bf4ffee8ef5",
"first_name": "Jane",
"last_name": "Doe",
"phone": "+1 555-0100",
"tags": [],
"subscribed": true,
"name": "Jane Doe",
"note": null,
"contact_type": "email",
"created_at": "2026-09-02T14:13:31Z",
"registered": true,
"registered_at": "2026-09-03T01:03:32Z",
"source": "order_create_c",
"free_tax": null,
"location_id": "",
"customer_extra_info": {
"finished_order_count": 2,
"finished_order_total": "33.0",
"country": "United States",
"country_code": "US",
"province": "California",
"province_code": "US-CA",
"currency_code": "USD",
"purchase_product_count": 4,
"store_customer_id": "",
"customer_role": null,
"ext": null,
"first_order_at": "2026-09-03T02:19:44Z",
"last_order_at": "2026-09-03T02:32:31Z"
}
},
"shipping_address": {
"id": "",
"first_name": "Jane",
"last_name": "Doe",
"phone": null,
"country_code": "US",
"country": "United States",
"province_code": "US-CA",
"province": "California",
"area": null,
"city": "Los Angeles",
"address": "123 Main St",
"address1": null,
"zip": "90001",
"extra_info": null,
"company": null,
"phone_area_code": "00",
"latitude": null,
"longitude": null,
"source": null,
"tags": null
},
"billing_address": null,
"line_items": [
{
"id": "ec41e0a6-39ee-44ba-b832-d5e10c07a81d",
"product_title": "sample-product",
"product_id": "14a309ec-b966-4cf9-a9bb-33baa821fdbc",
"product_handle": "sample-product",
"variant_id": "fff360dd-6457-466a-98b3-16878bacef5b",
"variant_title": "01",
"quantity": 1,
"fulfillment_status": "waiting",
"note": "",
"image": {
"alt": "",
"height": 1500,
"path": "free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
"src": "//img.staticdj.com/free/e6e8dc980211cbef103e16371d6e0e61.jpeg",
"width": 3000
},
"compare_at_price": "1.00",
"price": "1.00",
"total": "1.00",
"sku": "",
"weight": "0.00",
"weight_unit": "kg",
"taxable": false,
"requires_shipping": true,
"options": [
{
"name": "Size",
"value": "01"
}
],
"vendor": "",
"product_url": "/products/sample-product",
"properties": "{}",
"barcode": "",
"product_spu": "",
"product_vendor_url": "",
"product_tags": [],
"discount_applications": [],
"tax_code": "",
"tax_rate": "0.0000",
"tax_price": "0.00",
"wholesale_price": [
{
"price": "1.00",
"min_quantity": 1
}
],
"mixed_wholesale": false,
"item_price": "0.00",
"cost_price": "1.00",
"custom": false,
"trunk_price": "1.00",
"main_currency_prices": {
"compare_at_price": "1",
"price": "1",
"total": "1",
"tax_price": "0",
"item_price": "",
"cost_price": "1",
"trunk_price": "1",
"actual_rate": "1"
},
"fixed_discount_total": "0.00",
"excluded_tax_sub_total": "1.00",
"tax_lines": [],
"length": 0,
"width": 0,
"height": 0,
"dimension_unit": "",
"commission": "",
"origin_country_code": "",
"hs_code": "",
"created_by": "admin",
"origin_price": "1.00",
"duty_price": "0.00",
"line_price": "1.00",
"discount_total": "0.00",
"final_line_price": "1.00",
"final_price": "1.00"
}
],
"payment_line": null,
"test": false,
"order_status_url": "/order/2446407200000000000000/authenticate?key=155acc5b301bf2c259ebeeb6f6b6ba",
"order_key": "155acc5b301bf2c259ebeeb6f6b6ba",
"yet_payment": "0.00",
"refund": "0.00",
"installment_fee": "0.00",
"paid_total": "0.00",
"updated_time": "2026-09-03T02:38:16Z",
"checkout_id": "0",
"tax_type": 0,
"applied_gift_cards": [],
"payment_lines": [],
"checkout_url": "/checkout/2446407200000000000000?key=155acc5b301bf2c259ebeeb6f6b6ba",
"finished_at": null,
"fulfillments": [],
"identifier_extra": "",
"main_currency_prices": {
"sub_total": "1",
"shipping_total": "0",
"tax_total": "0",
"discount_total": "0",
"total": "1",
"total_tip_received": "0",
"refund_total": "0",
"actual_rate": "1"
},
"shipping_line_detail": null,
"order_type": 0,
"shipping_tax_type": 0,
"product_tax_included": false,
"translations": [],
"location_line": {
"id": "282823366795125518",
"location_id": "653509177250953159",
"location_name": "Default",
"first_name": "Jane",
"last_name": "Doe",
"phone": "+1 555-0100",
"country": "",
"country_code": "",
"province": "",
"province_code": "",
"area": "",
"city": "",
"address": "123 Main St",
"address1": "123 Main St",
"company": "",
"latitude": "0.000000",
"longitude": "0.000000",
"zip": "",
"phone_area_code": "",
"extra_info": "{}"
},
"additional_total": "0.00",
"additional_prices": [],
"tax_lines": {
"sales_tax_lines": []
},
"locale_zone": "+0800",
"tags": [],
"order_customer": {
"origin_id": "9fe44049-abab-4fed-ab3d-1bf4ffee8ef5",
"first_name": "Jane",
"last_name": "Doe",
"phone": "+1 555-0100",
"customer_role": "",
"ext": []
},
"duty_total": "0.00",
"mail_send_config": [],
"custom_fields": [],
"already_payment_lines": [],
"additional_rules": [
{
"id": "2446407_key_1",
"name": "Backup phone",
"input_type": 3,
"description": "",
"enable": 0,
"show_type": "all",
"show_rules": [
{
"field": "country_code",
"rules": []
}
],
"require": 0,
"validates": [],
"enums": []
}
],
"checkout_settings": {
"customer_authority": "all",
"checkout_page_type": "three_step",
"lineitems_validate": false,
"discount_show": "default_new",
"discount_show_v2": [
"contact_information",
"shipping_method",
"payment_method"
],
"reduction_show": {
"single": [
"contact_information"
],
"two_step": [
"payment_method",
"contact_information"
],
"three_step": [
"contact_information",
"shipping_method",
"payment_method"
]
},
"zip_check": "disabled",
"zip_check_v2": "multiple",
"zip_format_check": "enabled",
"zip_check_config": {
"GB": 1,
"US": 0,
"BR": 0,
"MX": 0,
"CL": 0,
"CO": 0,
"DE": 0,
"KR": 1,
"RO": 1
},
"zip_check_config_v2": {
"AE": 2,
"BH": 2,
"KW": 2,
"OM": 2,
"QA": 2,
"SA": 2
},
"order_timeout": 0,
"inventory_deduction": "order_created",
"shipping_cpf": {
"config_info": {
"config_default": {
"length": "30",
"type": "string"
},
"config_br": {
"length": "11",
"type": "number"
}
},
"is_show_countries": {
"cpf_cnpj": {
"title": "CPF/CNPJ",
"country_codes": "BR",
"is_filled": false,
"countries": null,
"format_check": false
},
"rut": {
"title": "RUT",
"country_codes": "CL",
"is_filled": false,
"countries": null,
"format_check": false
},
"other": {
"title": "Tax ID",
"is_filled": false,
"countries": [],
"format_check": false
}
},
"countries": [],
"is_show": false
},
"instruction": "unfold",
"address_setting": {
"name": "separate",
"phone": "+1 555-0100",
"company": "hidden",
"address": "123 Main St",
"address1": "123 Main St",
"name_requirement": "last_name",
"contact_details": "multiple"
},
"auto_complete": "enabled",
"doorplate_format_check": "disabled",
"forced_zip_check": [
"GB",
"MX"
],
"identification_info": {
"default": {
"countries": null,
"format_check": false,
"is_filled": false,
"rules": [
{
"country_code": "ALL",
"name": "ID numbers",
"regexp": "/^.{1,49}$/",
"example_val": "00000001"
},
{
"country_code": "TR",
"name": "T.C. Kimlik Numarası",
"regexp": "/^\\d{11}$/",
"example_val": "12345678901"
},
{
"country_code": "MO",
"name": "Macao Resident Identity Card",
"regexp": "/^[1|5|7]\\d{6}\\(\\d\\)$/",
"example_val": "1234567(8)"
}
]
}
},
"shipping_method_display_style": "manual_select"
},
"address_settings": {
"name": "separate",
"phone": "+1 555-0100",
"company": "hidden",
"address": "123 Main St",
"address1": "123 Main St",
"name_requirement": "last_name",
"contact_details": "multiple"
},
"customer_info": {
"first_name": "Jane",
"last_name": "Doe",
"phone": "+1 555-0100"
},
"payment_settings": {
"settings": {
"dynamic_config": {
"paypal_js_sdk_url": "https://www.paypal.com/sdk/js?client-id=AUwoRlv3iZ3jt3o3hhcft_tZ5g6tvefEpjCf9YNGeH7q8p_WraleitkKfLnWIs8HLpzalgRA5AMT0BYO¤cy=USD&disable-funding=card%2Cbancontact%2Cblik%2Ceps%2Cgiropay%2Cideal%2Cmercadopago%2Cmybank%2Cp24%2Csepa%2Csofort%2Cvenmo&enable-funding=paylater",
"express_checkout_config": {
"express_channels": [],
"express_account_infos": [],
"express_theme_configs": []
},
"scm": "",
"unified_user_id": "",
"fallback_reason": "",
"request_id": "279854cd-e65e-4275-a526-a262bb4c9c49",
"ec_legacy_apple_pay_block_store_ids": [
"2036132",
"2171855",
"2374192"
],
"ec_legacy_google_pay_block_store_ids": [
"2036132",
"2171855",
"2374192"
],
"ec_legacy_spz_paypal_store_ids": []
},
"express_checkout_config": {
"express_account_infos": [],
"express_channels": [],
"express_theme_configs": []
},
"payment_icon_resources": [],
"payment_resources": [],
"paypal_account": [],
"paypal_account_type": "merchant",
"paypal_creditcard_enabled": true,
"paypal_express_enabled": false,
"paypal_shipment_enabled": true,
"support_channels": [
"bogus"
]
}
},
"order_token": "2446407200000000000000",
"currency_symbol": "$",
"currency_symbol_pos": "left",
"payment_due": "1.00",
"all_tax_total": "0.00",
"prices": {
"subtotal_price": "1.00",
"shipping_price": "0.00",
"tax_price": "0.00",
"discount_code_price": "0.00",
"discount_price": "0.00",
"total_price": "1.00",
"shipping_tax_total": "0.00",
"discount_line_item_price": "0.00",
"total_tip_received": "0.00",
"discount_shipping_price": "0.00",
"discount_sub_total": "1.00",
"gift_card_price": "0.00",
"paid_total": "0.00",
"payment_due": "1.00",
"all_tax_total": "0.00",
"payment_discount_total": "0.00",
"additional_total": "0.00",
"duty_total": "0.00"
},
"except_notification": {
"code": ""
},
"ip_address": {
"country_code": "US",
"province_name": "California",
"country_name": "United States",
"city": "Los Angeles",
"ip": "203.0.113.10"
},
"policy_titles": [],
"checkout_page_type": "three_step",
"step": "contact_information"
},
"state": "success",
"message": "",
"errors": []
}
Save a shipping address on a checkout session
POST /{locale}/api/checkout/order/presave
Save a shipping address on the session before payment, so that shipping rates and taxes can be calculated for it.
Example request
const data = {
order_token: '2446407200000000000000',
shipping_address: {
first_name: 'Jane',
last_name: 'Doe',
address: '123 Main St',
city: 'Los Angeles',
country: 'United States',
country_code: 'US',
province: 'California',
province_code: 'CA',
zip: '90001',
}
};
fetch(window.SHOPLAZZA.routes.root + '/api/checkout/order/presave', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-Token': getCsrfToken()
},
body: JSON.stringify(data)
})
.then((response) => response.json())
.then((data) => {
// do something...
});
Request parameters
- Schema
- Example
The order token of the checkout session.
shipping_address object
The shipping address to save on the session.
{
"order_token": "2446407200000000000000",
"shipping_address": {
"first_name": "Jane",
"last_name": "Doe",
"address": "123 Main St",
"city": "Los Angeles",
"country": "United States",
"country_code": "US",
"province": "California",
"province_code": "CA",
"zip": "90001",
}
}
Response
- Schema
- Example
The response payload.
Request result flag; success or 0 means the request succeeded.
Result message returned with the response.
List of errors returned when the request fails.
{
"data": null,
"state": "success",
"message": "",
"errors": []
}
Reopen the checkout of an unpaid session
POST /{locale}/api/checkout/order/repay
Reopen the checkout of a session that was created but not paid, and get its checkout URL back.
Example request
const data = { order_token: '2446407200000000000000' };
fetch(window.SHOPLAZZA.routes.root + '/api/checkout/order/repay', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-Token': getCsrfToken()
},
body: JSON.stringify(data)
})
.then((response) => response.json())
.then((data) => {
// do something...
});
Request parameters
- Schema
- Example
The order token of the checkout session.
{
"order_token": "2446407200000000000000"
}
Response
- Schema
- Example
data object
The response payload.
ID of the order.
Relative URL of the checkout page for the order.
Request result flag; success or 0 means the request succeeded.
Result message returned with the response.
List of errors returned when the request fails.
{
"data": {
"id": "2446407200000000000000",
"checkout_url": "/checkout/2446407200000000000000"
},
"state": "success",
"message": "",
"errors": []
}
Submit a checkout session for payment
POST /{locale}/api/checkout/order/complete
Submit the checkout session for payment with the addresses, the contact details, the chosen shipping and payment options and the prices that the session settled on.
Example request
Read shipping_line, payment_line and prices from GET /{locale}/api/checkout/order/{order_id} and send them back unchanged, so that the server prices the order the same way the session did.
const data = {
order_token: '2446407200000000000000',
shipping_address: {
first_name: 'Jane',
last_name: 'Doe',
phone: '',
country: 'United States',
country_code: 'US',
area: '',
address: '456 Oak Ave',
address1: 'Apt 4',
company: '',
province: 'California',
province_code: 'US-CA',
city: 'Los Angeles',
zip: '90002'
},
billing_address: {
first_name: 'Jane',
last_name: 'Doe',
phone: '',
country: 'United States',
country_code: 'US',
area: '',
address: '456 Oak Ave',
address1: 'Apt 4',
company: '',
province: 'California',
province_code: 'US-CA',
city: 'Los Angeles',
zip: '90002'
},
use_shipping_address: '1',
customer_info: {
first_name: 'Jane',
last_name: 'Doe',
phone: '',
newsletter: 0,
note: '',
save_address: 0,
},
shipping_line: {
id: 'd43bfac3-5f80-433d-b9ce-49a3d645cd5c',
name: 'Standard shipping',
desc: '',
delivery_method: 1,
shipping_price: '1.00',
discount_shipping_price: '1.00',
discounts: [],
is_free: false,
support_cod: 0,
location_id: '0',
plan_code: ''
},
payment_line: {
id: '59107222-a7a9-479a-a1f7-dd5d40015033',
name: 'bogus',
payment_channel: 'bogus',
payment_method: 'bogus_gateway',
payment_key: 'bogus',
status: 'open',
is_active: true
},
prices: {
subtotal_price: '1.00',
shipping_price: '0.00',
tax_price: '0.00',
discount_code_price: '0.00',
discount_price: '0.00',
total_price: '1.00',
shipping_tax_total: '0.00',
discount_line_item_price: '0.00',
total_tip_received: '0.00',
discount_shipping_price: '0.00',
discount_sub_total: '1.00',
gift_card_price: '0.00',
paid_total: '0.00',
payment_due: '1.00',
all_tax_total: '0.00',
payment_discount_total: '0.00',
additional_total: '0.00',
duty_total: '0.00'
},
risk_control_info: []
};
fetch(window.SHOPLAZZA.routes.root + '/api/checkout/order/complete', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-Token': getCsrfToken()
},
body: JSON.stringify(data)
})
.then((response) => response.json())
.then((data) => {
// do something...
});
Request parameters
- Schema
- Example
The order token of the checkout session.
shipping_address object
The shipping address of the order.
billing_address object
The billing address of the order.
Whether the billing address is the same as the shipping address, 1 or 0.
customer_info object
The contact details of the buyer, and whether to subscribe them and save their address.
shipping_line object
The shipping option chosen from the session, copied from the session response.
payment_line object
The payment option chosen from the session, copied from the session response.
prices object
The prices the session settled on, copied from the session response.
The risk control data collected for the order. Pass an empty array when you collect none.
{
"order_token": "2446407200000000000000",
"shipping_address": {
"first_name": "Jane",
"last_name": "Doe",
"phone": "",
"country": "United States",
"country_code": "US",
"area": "",
"address": "456 Oak Ave",
"address1": "Apt 4",
"company": "",
"province": "California",
"province_code": "US-CA",
"city": "Los Angeles",
"zip": "90002"
},
"billing_address": {
"first_name": "Jane",
"last_name": "Doe",
"phone": "",
"country": "United States",
"country_code": "US",
"area": "",
"address": "456 Oak Ave",
"address1": "Apt 4",
"company": "",
"province": "California",
"province_code": "US-CA",
"city": "Los Angeles",
"zip": "90002"
},
"use_shipping_address": "1",
"customer_info": {
"first_name": "Jane",
"last_name": "Doe",
"phone": "",
"newsletter": 0,
"note": "",
"save_address": 0,
},
"shipping_line": {
"id": "d43bfac3-5f80-433d-b9ce-49a3d645cd5c",
"name": "Standard shipping",
"desc": "",
"delivery_method": 1,
"shipping_price": "1.00",
"discount_shipping_price": "1.00",
"discounts": [],
"is_free": false,
"support_cod": 0,
"location_id": "0",
"plan_code": ""
},
"payment_line": {
"id": "59107222-a7a9-479a-a1f7-dd5d40015033",
"name": "bogus",
"payment_channel": "bogus",
"payment_method": "bogus_gateway",
"payment_key": "bogus",
"status": "open",
"is_active": true
},
"prices": {
"subtotal_price": "1.00",
"shipping_price": "0.00",
"tax_price": "0.00",
"discount_code_price": "0.00",
"discount_price": "0.00",
"total_price": "1.00",
"shipping_tax_total": "0.00",
"discount_line_item_price": "0.00",
"total_tip_received": "0.00",
"discount_shipping_price": "0.00",
"discount_sub_total": "1.00",
"gift_card_price": "0.00",
"paid_total": "0.00",
"payment_due": "1.00",
"all_tax_total": "0.00",
"payment_discount_total": "0.00",
"additional_total": "0.00",
"duty_total": "0.00"
},
"risk_control_info": []
}
Response
- Schema
- Example
data object
The response payload.
except_notification object
Information about an exception raised while completing the order.
Exception code, for example total_price_changed.
Request result flag; success or 0 means the request succeeded.
Result message returned with the response.
List of errors returned when the request fails.
{
"data": {
"except_notification": {
"code": "total_price_changed"
}
},
"state": "success",
"message": "",
"errors": []
}