Skip to main content
POST
Spree SDK

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

Bearer token for authenticated customers

x-spree-token
string

Order token for guest access

Idempotency-Key
string

Unique key for request idempotency.

Path Parameters

cart_id
string
required

Cart prefixed ID (e.g., cart_abc123)

Body

application/json
payment_method_id
string
required

Payment method ID

Example:

"pm_abc123"

amount
string

Payment amount (defaults to order total minus store credits)

Example:

"99.99"

external_data
object

Provider-specific data passed to the gateway

Response

201 - application/json

payment session created

id
string
required
status
string
required
currency
string
required
external_id
string
required
external_data
object
required
customer_external_id
string | null
required
expires_at
string | null
required
amount
string
required
payment_method_id
string
required
order_id
string
required
payment_method
object
required
payment
object