Skip to content

Get an order's payment state

GET
/public/stores/{storeRef}/orders/{order_code}/payment-state
curl --request GET \
--url https://apibase.ecomweb.app/api/v1/public/stores/example/orders/example/payment-state \
--header 'x-storefront-api-key: <x-storefront-api-key>'

Returns the payment status and order status for an order, so a storefront can poll while the shopper pays at a gateway. It exposes nothing else about the order.

order_code
required
string

The order code returned when the order was placed.

storeRef
required
string

The store’s ref, as returned by GET /stores.

Media typeapplication/json
object
payment_status
required

Payment status, such as pending or paid.

string
order_status
required

Order status, such as pending or cancelled.

string

Example generated

{
"payment_status": "example",
"order_status": "example"
}

The key is missing, invalid, revoked or expired.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The resource does not exist in this store.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}