Advances the order to the next state in the checkout flow
JavaScript
import { createClient } from '@spree/sdk' const client = createClient({ baseUrl: 'https://your-store.com', publishableKey: '<api-key>', }) const order = await client.orders.next('or_abc123', { bearerToken: '<token>', })
{ "id": "or_gbHJdmfrXB", "number": "R872065977", "state": "address", "checkout_steps": [ "address", "delivery", "payment", "complete" ], "token": "DMW6AkxApqY2i3C5y1ExYVgX3yk2EDUNdvD", "email": "bobbi@kuhic.com", "special_instructions": null, "currency": "USD", "locale": "en", "item_count": 1, "state_lock_version": 1, "shipment_state": null, "payment_state": null, "item_total": "10.0", "display_item_total": "$10.00", "ship_total": "100.0", "display_ship_total": "$100.00", "adjustment_total": "0.0", "display_adjustment_total": "$0.00", "promo_total": "0.0", "display_promo_total": "$0.00", "tax_total": "0.0", "display_tax_total": "$0.00", "included_tax_total": "0.0", "display_included_tax_total": "$0.00", "additional_tax_total": "0.0", "display_additional_tax_total": "$0.00", "total": "110.0", "display_total": "$110.00", "completed_at": null, "created_at": "2026-03-11T14:46:11.123Z", "updated_at": "2026-03-11T14:46:11.199Z", "order_promotions": [], "line_items": [ { "id": "li_gbHJdmfrXB", "variant_id": "variant_gbHJdmfrXB", "quantity": 1, "currency": "USD", "name": "Product 549296", "slug": "product-549296", "options_text": "", "price": "10.0", "display_price": "$10.00", "total": "10.0", "display_total": "$10.00", "adjustment_total": "0.0", "display_adjustment_total": "$0.00", "additional_tax_total": "0.0", "display_additional_tax_total": "$0.00", "included_tax_total": "0.0", "display_included_tax_total": "$0.00", "promo_total": "0.0", "display_promo_total": "$0.00", "pre_tax_amount": "10.0", "display_pre_tax_amount": "$10.00", "discounted_amount": "10.0", "display_discounted_amount": "$10.00", "display_compare_at_amount": "$0.00", "created_at": "2026-03-11T14:46:11.149Z", "updated_at": "2026-03-11T14:46:11.149Z", "compare_at_amount": null, "thumbnail_url": null, "option_values": [], "digital_links": [] } ], "shipments": [ { "id": "ship_gbHJdmfrXB", "number": "H79412789239", "state": "pending", "tracking": "U10000", "tracking_url": null, "cost": "100.0", "display_cost": "$100.00", "shipped_at": null, "created_at": "2026-03-11T14:46:11.162Z", "updated_at": "2026-03-11T14:46:11.175Z", "shipping_method": { "id": "shpm_gbHJdmfrXB", "name": "UPS Ground", "code": "UPS_GROUND" }, "stock_location": { "id": "sloc_UkLWZg9DAJ", "state_abbr": "STATE_ABBR_203", "name": "Corrin Parker", "address1": "1600 Pennsylvania Ave NW", "city": "Washington", "zipcode": "20500", "country_iso": "US", "country_name": "United States of America", "state_text": "STATE_ABBR_203" }, "shipping_rates": [ { "id": "shpr_gbHJdmfrXB", "shipping_method_id": "shpm_gbHJdmfrXB", "name": "UPS Ground", "selected": true, "cost": "100.0", "display_cost": "$100.00", "shipping_method": { "id": "shpm_gbHJdmfrXB", "name": "UPS Ground", "code": "UPS_GROUND" } } ] } ], "payments": [], "bill_address": { "id": "addr_uw2YK1rnl0", "firstname": "John", "lastname": "Doe", "full_name": "John Doe", "address1": "196 Lovely Street", "address2": "Northwest", "city": "Herndon", "zipcode": "35005", "phone": "555-555-0199", "company": "Company", "country_name": "United States of America", "country_iso": "US", "state_text": "STATE_ABBR_207", "state_abbr": "STATE_ABBR_207", "quick_checkout": false, "state_name": "STATE_NAME_207" }, "ship_address": { "id": "addr_OIJLhNcSbf", "firstname": "John", "lastname": "Doe", "full_name": "John Doe", "address1": "197 Lovely Street", "address2": "Northwest", "city": "Herndon", "zipcode": "35005", "phone": "555-555-0199", "company": "Company", "country_name": "United States of America", "country_iso": "US", "state_text": "STATE_ABBR_208", "state_abbr": "STATE_ABBR_208", "quick_checkout": false, "state_name": "STATE_NAME_208" }, "payment_methods": [] }
Publishable API key for store access
JWT token for authenticated customers
Unique key for request idempotency. Duplicate requests with the same key return the cached response.
order advanced
Show child attributes
Was this page helpful?