Skip to main content
PATCH
/
api
/
v3
/
store
/
orders
/
{id}
/
complete
Spree SDK
import { createSpreeClient } from '@spree/sdk'

const client = createSpreeClient({
  baseUrl: 'https://your-store.com',
  publishableKey: '<api-key>',
})

const order = await client.store.orders.complete('or_abc123', {
  bearerToken: '<token>',
})
{
  "id": "or_gbHJdmfrXB",
  "number": "R780875872",
  "state": "complete",
  "checkout_steps": [
    "address",
    "delivery",
    "payment",
    "complete"
  ],
  "token": "FiDBzEteBd6KhuvTwNarfFwLWADn5Nr5jjz",
  "email": "randall@ziemann.name",
  "special_instructions": null,
  "currency": "USD",
  "locale": "en",
  "item_count": 1,
  "state_lock_version": 1,
  "shipment_state": "backorder",
  "payment_state": "balance_due",
  "item_total": "19.99",
  "display_item_total": "$19.99",
  "ship_total": "10.0",
  "display_ship_total": "$10.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": "29.99",
  "display_total": "$29.99",
  "completed_at": "2026-03-05T20:52:23.549Z",
  "created_at": "2026-03-05T20:52:23.355Z",
  "updated_at": "2026-03-05T20:52:23.549Z",
  "order_promotions": [],
  "line_items": [
    {
      "id": "li_gbHJdmfrXB",
      "variant_id": "variant_gbHJdmfrXB",
      "quantity": 1,
      "currency": "USD",
      "name": "Product 469532",
      "slug": "product-469532",
      "options_text": "",
      "price": "19.99",
      "display_price": "$19.99",
      "total": "19.99",
      "display_total": "$19.99",
      "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": "19.99",
      "display_pre_tax_amount": "$19.99",
      "discounted_amount": "19.99",
      "display_discounted_amount": "$19.99",
      "display_compare_at_amount": "$0.00",
      "created_at": "2026-03-05T20:52:23.387Z",
      "updated_at": "2026-03-05T20:52:23.435Z",
      "compare_at_amount": null,
      "thumbnail_url": null,
      "option_values": [],
      "digital_links": []
    }
  ],
  "shipments": [
    {
      "id": "ship_EfhxLZ9ck8",
      "number": "H36400898276",
      "state": "pending",
      "tracking": null,
      "tracking_url": null,
      "cost": "10.0",
      "display_cost": "$10.00",
      "shipped_at": null,
      "created_at": "2026-03-05T20:52:23.453Z",
      "updated_at": "2026-03-05T20:52:23.538Z",
      "shipping_method": {
        "id": "shpm_UkLWZg9DAJ",
        "name": "UPS Ground",
        "code": "UPS_GROUND"
      },
      "stock_location": {
        "id": "sloc_UkLWZg9DAJ",
        "state_abbr": "STATE_ABBR_204",
        "name": "Gino O'Reilly",
        "address1": "1600 Pennsylvania Ave NW",
        "city": "Washington",
        "zipcode": "20500",
        "country_iso": "US",
        "country_name": "United States of America",
        "state_text": "STATE_ABBR_204"
      },
      "shipping_rates": [
        {
          "id": "shpr_EfhxLZ9ck8",
          "shipping_method_id": "shpm_UkLWZg9DAJ",
          "name": "UPS Ground",
          "selected": true,
          "cost": "10.0",
          "display_cost": "$10.00",
          "shipping_method": {
            "id": "shpm_UkLWZg9DAJ",
            "name": "UPS Ground",
            "code": "UPS_GROUND"
          }
        },
        {
          "id": "shpr_VqXmZF31wY",
          "shipping_method_id": "shpm_gbHJdmfrXB",
          "name": "UPS Ground",
          "selected": false,
          "cost": "10.0",
          "display_cost": "$10.00",
          "shipping_method": {
            "id": "shpm_gbHJdmfrXB",
            "name": "UPS Ground",
            "code": "UPS_GROUND"
          }
        }
      ]
    }
  ],
  "payments": [
    {
      "id": "py_UkLWZg9DAJ",
      "payment_method_id": "pm_UkLWZg9DAJ",
      "state": "checkout",
      "response_code": "12345",
      "number": "P6KOZVDB",
      "amount": "29.99",
      "display_amount": "$29.99",
      "created_at": "2026-03-05T20:52:23.511Z",
      "updated_at": "2026-03-05T20:52:23.511Z",
      "source_type": "credit_card",
      "source_id": "card_UkLWZg9DAJ",
      "source": {
        "id": "card_UkLWZg9DAJ",
        "cc_type": "visa",
        "last_digits": "1111",
        "month": 12,
        "year": 2027,
        "name": "Spree Commerce",
        "default": false,
        "gateway_payment_profile_id": null
      },
      "payment_method": {
        "id": "pm_UkLWZg9DAJ",
        "name": "Check",
        "description": null,
        "type": "Spree::PaymentMethod::Check",
        "session_required": false
      }
    }
  ],
  "bill_address": {
    "id": "addr_uw2YK1rnl0",
    "firstname": "John",
    "lastname": "Doe",
    "full_name": "John Doe",
    "address1": "208 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"
  },
  "ship_address": {
    "id": "addr_OIJLhNcSbf",
    "firstname": "John",
    "lastname": "Doe",
    "full_name": "John Doe",
    "address1": "209 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_209",
    "state_abbr": "STATE_ABBR_209",
    "quick_checkout": false,
    "state_name": "STATE_NAME_209"
  },
  "payment_methods": [
    {
      "id": "pm_UkLWZg9DAJ",
      "name": "Check",
      "description": null,
      "type": "Spree::PaymentMethod::Check",
      "session_required": false
    },
    {
      "id": "pm_gbHJdmfrXB",
      "name": "Credit Card",
      "description": null,
      "type": "Spree::Gateway::Bogus",
      "session_required": true
    }
  ]
}

Authorizations

x-spree-api-key
string
header
required

Publishable API key for store access

Authorization
string
header
required

JWT token for authenticated customers

Headers

x-spree-api-key
string
required
Authorization
string
x-spree-order-token
string
Idempotency-Key
string

Unique key for request idempotency. Duplicate requests with the same key return the cached response.

Path Parameters

id
string
required

Response

order completed

id
string
required
number
string
required
state
string
required
checkout_steps
string[]
required
token
string
required
email
string | null
required
special_instructions
string | null
required
currency
string
required
locale
string | null
required
item_count
number
required
state_lock_version
number
required
shipment_state
string | null
required
payment_state
string | null
required
item_total
string
required
display_item_total
string
required
ship_total
string
required
display_ship_total
string
required
adjustment_total
string
required
display_adjustment_total
string
required
promo_total
string
required
display_promo_total
string
required
tax_total
string
required
display_tax_total
string
required
included_tax_total
string
required
display_included_tax_total
string
required
additional_tax_total
string
required
display_additional_tax_total
string
required
total
string
required
display_total
string
required
completed_at
string | null
required
created_at
string
required
updated_at
string
required
order_promotions
object[]
required
line_items
object[]
required
shipments
object[]
required
payments
object[]
required
bill_address
object
required
ship_address
object
required
payment_methods
object[]
required