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
x-spree-token
string

Order token for guest access

Path Parameters

cart_id
string
required

Cart prefixed ID

Body

application/json
payment_method_id
string
required

Payment method ID (must be a non-session payment method)

Example:

"pm_abc123"

amount
string

Payment amount (defaults to order total minus store credits)

Example:

"99.99"

metadata
object

Arbitrary metadata to attach to the payment

Response

payment created

id
string
required
payment_method_id
string
required
response_code
string | null
required
number
string
required
amount
string | null
required
display_amount
string | null
required
status
string
required
source_type
enum<string> | null
required
Available options:
credit_card,
store_credit,
payment_source
source_id
string | null
required
source
object
required
payment_method
object
required