Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Added `createPayment` server action for non-session payment methods … (#13761)

Damian Legawiec4305e93b5efc
diff --git a/docs/api-reference/store.yaml b/docs/api-reference/store.yaml
index 2b0e8df5bb..d09fa88f26 100644
--- a/docs/api-reference/store.yaml
+++ b/docs/api-reference/store.yaml
@@ -661,16 +661,16 @@ paths:
content:
application/json:
example:
- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjZmNGNhMTM5LTU4OTktNGQ5NC1iMjU2LTkxNDMxZWMyMjg5MyIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzczMTY1ODQ1fQ.arE64PcBNn_bqvkn3mNeprNTiYZGTxrhTsHs5aBt3ZA
+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjRjZjZiNzkxLTZiY2MtNDUyMi05YTNhLWQ0ZmMyNzNmNmEwMSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzczMjQzOTM2fQ.Zi2gcBzDMpqNSeJIoLphDWxYI0C8SQYXihILkuHnFkU
user:
id: cus_UkLWZg9DAJ
- first_name: Marlon
- last_name: West
+ first_name: Elizebeth
+ last_name: Herman
phone:
accepts_email_marketing: false
- created_at: '2026-03-10T17:04:05.201Z'
- updated_at: '2026-03-10T17:04:05.201Z'
+ created_at: '2026-03-11T14:45:36.632Z'
+ updated_at: '2026-03-11T14:45:36.632Z'
addresses: []
default_billing_address:
default_shipping_address:
@@ -747,16 +747,16 @@ paths:
content:
application/json:
example:
- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjdmOTNlMDgxLTk4MWItNGJiZi05NzNmLWY0ZWIwNTZmYTE0MCIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzczMTY1ODQ2fQ.b6N44Rfgd1i1jNe-hcbkD70cqfX416s-mORw-l7Z4nQ
+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjBlZjM1Y2I0LTY2NDgtNDE5Zi04MjkzLTgxYjU1N2ExZDQwNSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzczMjQzOTM4fQ.gPHrg7pll8g-zU2xYEVR_1JyQZMxshSf7TEkvhX0QgI
user:
id: cus_UkLWZg9DAJ
- first_name: Scot
- last_name: Emmerich
+ first_name: Wilbur
+ last_name: Romaguera
phone:
accepts_email_marketing: false
- created_at: '2026-03-10T17:04:06.613Z'
- updated_at: '2026-03-10T17:04:06.613Z'
+ created_at: '2026-03-11T14:45:38.074Z'
+ updated_at: '2026-03-11T14:45:38.074Z'
addresses: []
default_billing_address:
default_shipping_address:
@@ -828,13 +828,13 @@ paths:
application/json:
example:
id: or_UkLWZg9DAJ
- number: R566603277
+ number: R077815792
state: cart
checkout_steps:
- address
- delivery
- complete
- token: Vbi67ooEnj4QRpELdX71hg1773162247402
+ token: 6H3Y5-uIi04wYEUYjECsNQ1773240338859
email:
special_instructions:
currency: USD
@@ -860,8 +860,8 @@ paths:
total: '0.0'
display_total: "$0.00"
completed_at:
- created_at: '2026-03-10T17:04:07.404Z'
- updated_at: '2026-03-10T17:04:07.404Z'
+ created_at: '2026-03-11T14:45:38.860Z'
+ updated_at: '2026-03-11T14:45:38.860Z'
order_promotions: []
line_items: []
shipments: []
@@ -987,15 +987,15 @@ paths:
application/json:
example:
id: or_UkLWZg9DAJ
- number: R611627103
+ number: R272523018
state: cart
checkout_steps:
- address
- delivery
- payment
- complete
- token: zqH8pYZ6ZtpmeJuamYMsjqNyq2XJzDxQwiy
+ token: sGEy8hb61E75fgLCzSknZEKxk5W6Jrjw2kJ
special_instructions:
currency: USD
locale: en
@@ -1020,16 +1020,16 @@ paths:
total: '110.0'
display_total: "$110.00"
completed_at:
- created_at: '2026-03-10T17:04:08.407Z'
- updated_at: '2026-03-10T17:04:08.468Z'
+ created_at: '2026-03-11T14:45:39.864Z'
+ updated_at: '2026-03-11T14:45:39.923Z'
order_promotions: []
line_items:
- id: li_UkLWZg9DAJ
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 39126
- slug: product-39126
+ name: Product 3148
+ slug: product-3148
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -1048,23 +1048,23 @@ paths:
discounted_amount: '10.0'
display_discounted_amount: "$10.00"
display_compare_at_amount: "$0.00"
- created_at: '2026-03-10T17:04:08.442Z'
- updated_at: '2026-03-10T17:04:08.442Z'
+ created_at: '2026-03-11T14:45:39.898Z'
+ updated_at: '2026-03-11T14:45:39.898Z'
compare_at_amount:
thumbnail_url:
option_values: []
digital_links: []
shipments:
- id: ship_UkLWZg9DAJ
- number: H10115076175
+ number: H56116570825
state: pending
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
shipped_at:
- created_at: '2026-03-10T17:04:08.449Z'
- updated_at: '2026-03-10T17:04:08.466Z'
+ created_at: '2026-03-11T14:45:39.905Z'
+ updated_at: '2026-03-11T14:45:39.921Z'
shipping_method:
id: shpm_UkLWZg9DAJ
name: UPS Ground
@@ -1072,7 +1072,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_42
- name: Aubrey Bruen
+ name: Perry Effertz
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -1190,15 +1190,15 @@ paths:
application/json:
example:
id: or_UkLWZg9DAJ
- number: R676232166
+ number: R745530903
state: cart
checkout_steps:
- address
- delivery
- payment
- complete
- token: Adxhhn1GWaDXbesk6hwNRfHHgELLdY4pozi
+ token: M7c69YQScfTYk6xxwD7g7cXT39avBQ2i9Hk
special_instructions:
currency: USD
locale: en
@@ -1223,16 +1223,16 @@ paths:
total: '110.0'
display_total: "$110.00"
completed_at:
- created_at: '2026-03-10T17:04:09.049Z'
- updated_at: '2026-03-10T17:04:09.107Z'
+ created_at: '2026-03-11T14:45:40.501Z'
+ updated_at: '2026-03-11T14:45:40.556Z'
order_promotions: []
line_items:
- id: li_UkLWZg9DAJ
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 45192
- slug: product-45192
+ name: Product 48828
+ slug: product-48828
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -1251,23 +1251,23 @@ paths:
discounted_amount: '10.0'
display_discounted_amount: "$10.00"
display_compare_at_amount: "$0.00"
- created_at: '2026-03-10T17:04:09.083Z'
- updated_at: '2026-03-10T17:04:09.083Z'
+ created_at: '2026-03-11T14:45:40.532Z'
+ updated_at: '2026-03-11T14:45:40.532Z'
compare_at_amount:
thumbnail_url:
option_values: []
digital_links: []
shipments:
- id: ship_UkLWZg9DAJ
- number: H03365039999
+ number: H66232635703
state: pending
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
shipped_at:
- created_at: '2026-03-10T17:04:09.089Z'
- updated_at: '2026-03-10T17:04:09.104Z'
+ created_at: '2026-03-11T14:45:40.537Z'
+ updated_at: '2026-03-11T14:45:40.553Z'
shipping_method:
id: shpm_UkLWZg9DAJ
name: UPS Ground
@@ -1275,7 +1275,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_46
- name: Elinore Mertz
+ name: Nickie Considine
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -1419,8 +1419,8 @@ paths:
meta_description:
meta_keywords:
children_count: 1
- created_at: '2026-03-10T17:04:11.284Z'
- updated_at: '2026-03-10T17:04:11.338Z'
+ created_at: '2026-03-11T14:45:42.864Z'
+ updated_at: '2026-03-11T14:45:42.921Z'
parent_id:
description: ''
description_html: ''
@@ -1438,8 +1438,8 @@ paths:
meta_description:
meta_keywords:
children_count: 1
- created_at: '2026-03-10T17:04:11.291Z'
- updated_at: '2026-03-10T17:04:11.338Z'
+ created_at: '2026-03-11T14:45:42.873Z'
+ updated_at: '2026-03-11T14:45:42.920Z'
parent_id: ctg_UkLWZg9DAJ
description: ''
description_html: ''
@@ -1457,8 +1457,8 @@ paths:
meta_description:
meta_keywords:
children_count: 0
- created_at: '2026-03-10T17:04:11.301Z'
- updated_at: '2026-03-10T17:04:11.307Z'
+ created_at: '2026-03-11T14:45:42.884Z'
+ updated_at: '2026-03-11T14:45:42.890Z'
parent_id: ctg_gbHJdmfrXB
description: ''
description_html: ''
@@ -1559,8 +1559,8 @@ paths:
meta_description:
meta_keywords:
children_count: 1
- created_at: '2026-03-10T17:04:11.717Z'
- updated_at: '2026-03-10T17:04:11.782Z'
+ created_at: '2026-03-11T14:45:43.305Z'
+ updated_at: '2026-03-11T14:45:43.348Z'
parent_id: ctg_UkLWZg9DAJ
description: ''
description_html: ''
@@ -1687,18 +1687,20 @@ paths:
example:
data:
- id: prod_UkLWZg9DAJ
- name: Product 156044
+ name: Product 154952
description: |-
- At tempora iure expedita quae magnam consectetur beatae. Repudiandae repellat assumenda vitae laudantium officia. Minima eos placeat ipsa laborum.
- Mollitia quo numquam quisquam qui cumque illo quis. Numquam sed pariatur incidunt laborum fugiat rerum maiores temporibus. Error facere cum excepturi similique accusamus quis in at. Aspernatur ducimus ipsa eligendi hic voluptatem magnam. Dolorum laborum ea necessitatibus eius amet.
- Nesciunt quo blanditiis veniam animi officia vero. Excepturi nobis corrupti ad error rem accusantium exercitationem. Veniam harum recusandae ipsa nostrum nihil. Quasi dolorum praesentium doloremque illo sed. Harum id enim dicta voluptatem deleniti ex.
- slug: product-156044
+ Facere fuga in provident praesentium architecto. Expedita excepturi voluptatem et corporis. Quia esse dolorem non cum doloribus. Adipisci officiis ex quibusdam recusandae doloremque aspernatur.
+ Est id dignissimos dolor reiciendis modi. Quod modi laudantium ducimus deleniti consectetur quibusdam ut. Sint earum quidem nam sed ullam ratione similique ab. Labore magnam fuga eius enim.
+ Itaque cum consequuntur vel placeat enim excepturi. Repellat doloremque dolore voluptatem eaque nulla. Sit maxime reiciendis explicabo sed voluptatem.
+ Expedita fugit autem officia vero tenetur tempore sed quisquam. Aliquid optio nemo beatae vero natus. Explicabo repellendus eaque eligendi sit consequatur. Adipisci nobis repudiandae ipsa placeat eligendi molestias.
+ Quis totam eligendi earum quos praesentium debitis. Ut adipisci aut exercitationem officia reprehenderit. Accusantium libero at nobis pariatur.
+ slug: product-154952
meta_description:
meta_keywords:
variant_count: 0
- available_on: '2025-03-10T17:04:12.315Z'
- created_at: '2026-03-10T17:04:12.330Z'
- updated_at: '2026-03-10T17:04:12.342Z'
+ available_on: '2025-03-11T14:45:43.852Z'
+ created_at: '2026-03-11T14:45:43.867Z'
+ updated_at: '2026-03-11T14:45:43.889Z'
purchasable: true
in_stock: false
backorderable: true
@@ -1969,15 +1971,15 @@ paths:
application/json:
example:
id: or_UkLWZg9DAJ
- number: R099009108
+ number: R876411685
state: cart
checkout_steps:
- address
- delivery
- payment
- complete
- token: tagwKUrjm2YSpCHTdWRga92CHnhMPi1mEK8
+ token: bty88BCdfBv1QJXGecUT5qdwkzesGTQW3Wt
special_instructions:
currency: USD
locale: en
@@ -2002,16 +2004,16 @@ paths:
total: '110.0'
display_total: "$110.00"
completed_at:
- created_at: '2026-03-10T17:04:14.179Z'
- updated_at: '2026-03-10T17:04:14.290Z'
+ created_at: '2026-03-11T14:45:45.801Z'
+ updated_at: '2026-03-11T14:45:45.922Z'
order_promotions: []
line_items:
- id: li_UkLWZg9DAJ
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 198696
- slug: product-198696
+ name: Product 193788
+ slug: product-193788
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -2030,23 +2032,23 @@ paths:
discounted_amount: '10.0'
display_discounted_amount: "$10.00"
display_compare_at_amount: "$0.00"
- created_at: '2026-03-10T17:04:14.215Z'
- updated_at: '2026-03-10T17:04:14.215Z'
+ created_at: '2026-03-11T14:45:45.836Z'
+ updated_at: '2026-03-11T14:45:45.836Z'
compare_at_amount:
thumbnail_url:
option_values: []
digital_links: []
shipments:
- id: ship_UkLWZg9DAJ
- number: H32397292586
+ number: H04394759162
state: pending
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
shipped_at:
- created_at: '2026-03-10T17:04:14.221Z'
- updated_at: '2026-03-10T17:04:14.234Z'
+ created_at: '2026-03-11T14:45:45.844Z'
+ updated_at: '2026-03-11T14:45:45.859Z'
shipping_method:
id: shpm_UkLWZg9DAJ
name: UPS Ground
@@ -2054,7 +2056,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_76
- name: Hilda Jerde
+ name: Rozella Orn
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -2076,12 +2078,12 @@ paths:
- id: py_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
state: checkout
- response_code: 1-SC-20260310170414280732
- number: PECNCT6N
+ response_code: 1-SC-20260311144545911349
+ number: PSFC389G
amount: '50.0'
display_amount: "$50.00"
- created_at: '2026-03-10T17:04:14.284Z'
- updated_at: '2026-03-10T17:04:14.284Z'
+ created_at: '2026-03-11T14:45:45.916Z'
+ updated_at: '2026-03-11T14:45:45.916Z'
source_type: store_credit
source_id: credit_UkLWZg9DAJ
source:
@@ -2235,15 +2237,15 @@ paths:
application/json:
example:
id: or_UkLWZg9DAJ
- number: R062686836
+ number: R556023391
state: cart
checkout_steps:
- address
- delivery
- payment
- complete
- token: EZpVTuMvjWumkYFitNFQkemRz2qxYSidDUm
+ token: atsEAqaNHZb2NUJH1G2AmgDG9eAFiSKjWtZ
special_instructions:
currency: USD
locale: en
@@ -2268,16 +2270,16 @@ paths:
total: '110.0'
display_total: "$110.00"
completed_at:
- created_at: '2026-03-10T17:04:16.057Z'
- updated_at: '2026-03-10T17:04:16.181Z'
+ created_at: '2026-03-11T14:45:47.705Z'
+ updated_at: '2026-03-11T14:45:47.826Z'
order_promotions: []
line_items:
- id: li_UkLWZg9DAJ
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 226425
- slug: product-226425
+ name: Product 22504
+ slug: product-22504
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -2296,23 +2298,23 @@ paths:
discounted_amount: '10.0'
display_discounted_amount: "$10.00"
display_compare_at_amount: "$0.00"
- created_at: '2026-03-10T17:04:16.087Z'
- updated_at: '2026-03-10T17:04:16.176Z'
+ created_at: '2026-03-11T14:45:47.737Z'
+ updated_at: '2026-03-11T14:45:47.820Z'
compare_at_amount:
thumbnail_url:
option_values: []
digital_links: []
shipments:
- id: ship_UkLWZg9DAJ
- number: H30874485277
+ number: H45666021172
state: pending
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
shipped_at:
- created_at: '2026-03-10T17:04:16.092Z'
- updated_at: '2026-03-10T17:04:16.106Z'
+ created_at: '2026-03-11T14:45:47.743Z'
+ updated_at: '2026-03-11T14:45:47.758Z'
shipping_method:
id: shpm_UkLWZg9DAJ
name: UPS Ground
@@ -2320,7 +2322,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_88
- name: Petra Langosh
+ name: Lonny Waelchi
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -2750,15 +2752,15 @@ paths:
example:
data:
- id: or_UkLWZg9DAJ
- number: R350199218
+ number: R939843740
state: cart
checkout_steps:
- address
- delivery
- payment
- complete
- token: qeyhApjW9bSEvShvbcGCkMstn48q1M73N9T
+ token: XVdvFACWeHB6yfr5H7rqVg8B2GLtNEmiUZT
special_instructions:
currency: USD
locale: en
@@ -2783,16 +2785,16 @@ paths:
total: '110.0'
display_total: "$110.00"
completed_at:
- created_at: '2026-03-10T17:04:20.838Z'
- updated_at: '2026-03-10T17:04:20.911Z'
+ created_at: '2026-03-11T14:45:52.512Z'
+ updated_at: '2026-03-11T14:45:52.596Z'
order_promotions: []
line_items:
- id: li_UkLWZg9DAJ
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 244861
- slug: product-244861
+ name: Product 248498
+ slug: product-248498
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -2811,23 +2813,23 @@ paths:
discounted_amount: '10.0'
display_discounted_amount: "$10.00"
display_compare_at_amount: "$0.00"
- created_at: '2026-03-10T17:04:20.885Z'
- updated_at: '2026-03-10T17:04:20.885Z'
+ created_at: '2026-03-11T14:45:52.566Z'
+ updated_at: '2026-03-11T14:45:52.566Z'
compare_at_amount:
thumbnail_url:
option_values: []
digital_links: []
shipments:
- id: ship_UkLWZg9DAJ
- number: H25589098875
+ number: H23827286331
state: pending
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
shipped_at:
- created_at: '2026-03-10T17:04:20.891Z'
- updated_at: '2026-03-10T17:04:20.908Z'
+ created_at: '2026-03-11T14:45:52.574Z'
+ updated_at: '2026-03-11T14:45:52.593Z'
shipping_method:
id: shpm_UkLWZg9DAJ
name: UPS Ground
@@ -2835,7 +2837,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_108
- name: Monet Doyle
+ name: Lindsy Mueller
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -2959,7 +2961,7 @@ paths:
content:
application/json:
example:
- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjVkOWNhMjM2LTEwZTEtNDczMC04YmNiLTBkMTgwZDg1MGFjMSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzczMTY1ODYxfQ.-rzaJDSb7_KpPTpgiiFaCr80Zr8JY-YTxlq4lrOCT7s
+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjFiNjcyN2RlLTE4ZmYtNDA4Ny05YTBiLWRkYWM4MWQ1MGVmYSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzczMjQzOTUzfQ.tyQZduHlN6j52kHMKfD6S1fBqonkEtcUgUfIwBBXgas
user:
id: cus_UkLWZg9DAJ
@@ -2967,8 +2969,8 @@ paths:
last_name: Doe
phone: "+1234567890"
accepts_email_marketing: true
- created_at: '2026-03-10T17:04:21.838Z'
- updated_at: '2026-03-10T17:04:21.838Z'
+ created_at: '2026-03-11T14:45:53.547Z'
+ updated_at: '2026-03-11T14:45:53.547Z'
addresses: []
default_billing_address:
default_shipping_address:
@@ -3072,13 +3074,13 @@ paths:
application/json:
example:
id: cus_UkLWZg9DAJ
- first_name: Otelia
- last_name: Witting
+ first_name: Ashlea
+ last_name: Gutkowski
phone: 555-555-0199
accepts_email_marketing: false
- created_at: '2026-03-10T17:04:22.391Z'
- updated_at: '2026-03-10T17:04:22.676Z'
+ created_at: '2026-03-11T14:45:54.093Z'
+ updated_at: '2026-03-11T14:45:54.364Z'
addresses:
- id: addr_gbHJdmfrXB
firstname: John
@@ -3202,13 +3204,13 @@ paths:
application/json:
example:
id: cus_UkLWZg9DAJ
first_name: Updated
last_name: Name
phone: 555-555-0199
accepts_email_marketing: false
- created_at: '2026-03-10T17:04:22.966Z'
- updated_at: '2026-03-10T17:04:23.269Z'
+ created_at: '2026-03-11T14:45:54.654Z'
+ updated_at: '2026-03-11T14:45:54.935Z'
addresses:
- id: addr_gbHJdmfrXB
firstname: John
@@ -3432,7 +3434,7 @@ paths:
example:
data:
- id: gc_UkLWZg9DAJ
- code: B808F5A9CEEB4C30
+ code: 865326619F6C0947
state: active
currency: USD
amount: '10.0'
@@ -3446,8 +3448,8 @@ paths:
redeemed_at:
expired: false
active: true
- created_at: '2026-03-10T17:04:26.496Z'
- updated_at: '2026-03-10T17:04:26.496Z'
+ created_at: '2026-03-11T14:45:58.057Z'
+ updated_at: '2026-03-11T14:45:58.057Z'
meta:
page: 1
limit: 25
@@ -3530,7 +3532,7 @@ paths:
application/json:
example:
id: gc_UkLWZg9DAJ
- code: D6D1841288553AB1
+ code: 9A67B41946E61B0F
state: active
currency: USD
amount: '10.0'
@@ -3544,8 +3546,8 @@ paths:
redeemed_at:
expired: false
active: true
- created_at: '2026-03-10T17:04:27.590Z'
- updated_at: '2026-03-10T17:04:27.590Z'
+ created_at: '2026-03-11T14:45:59.146Z'
+ updated_at: '2026-03-11T14:45:59.146Z'
schema:
"$ref": "#/components/schemas/GiftCard"
'404':
@@ -3623,15 +3625,15 @@ paths:
application/json:
example:
id: or_UkLWZg9DAJ
- number: R910591887
+ number: R153037447
state: cart
checkout_steps:
- address
- delivery
- payment
- complete
- token: hX1Lt6FYjSvJEegD2k5YjsKrBntPRvnAavL
+ token: do8ruoWJqGJMxXMHGeGiE2LoEYXu8eZa7e6
special_instructions:
currency: USD
locale: en
@@ -3656,16 +3658,16 @@ paths:
total: '29.99'
display_total: "$29.99"
completed_at:
- created_at: '2026-03-10T17:04:29.336Z'
- updated_at: '2026-03-10T17:04:29.430Z'
+ created_at: '2026-03-11T14:46:00.913Z'
+ updated_at: '2026-03-11T14:46:01.016Z'
order_promotions: []
line_items:
- id: li_UkLWZg9DAJ
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 344628
- slug: product-344628
+ name: Product 341458
+ slug: product-341458
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -3684,8 +3686,8 @@ paths:
discounted_amount: '10.0'
display_discounted_amount: "$10.00"
display_compare_at_amount: "$0.00"
- created_at: '2026-03-10T17:04:29.365Z'
- updated_at: '2026-03-10T17:04:29.365Z'
+ created_at: '2026-03-11T14:46:00.944Z'
+ updated_at: '2026-03-11T14:46:00.944Z'
compare_at_amount:
thumbnail_url:
option_values: []
@@ -3694,8 +3696,8 @@ paths:
variant_id: variant_gbHJdmfrXB
quantity: 1
currency: USD
- name: Product 353236
- slug: product-353236
+ name: Product 353183
+ slug: product-353183
options_text: ''
price: '19.99'
display_price: "$19.99"
@@ -3714,8 +3716,8 @@ paths:
discounted_amount: '19.99'
display_discounted_amount: "$19.99"
display_compare_at_amount: "$0.00"
- created_at: '2026-03-10T17:04:29.407Z'
- updated_at: '2026-03-10T17:04:29.407Z'
+ created_at: '2026-03-11T14:46:00.990Z'
+ updated_at: '2026-03-11T14:46:00.990Z'
compare_at_amount:
thumbnail_url:
option_values: []
@@ -3835,14 +3837,14 @@ paths:
application/json:
example:
id: or_UkLWZg9DAJ
- number: R791655168
+ number: R599053352
state: cart
checkout_steps:
- address
- delivery
- complete
- token: nMy9E556iyogVQNDRPmuywUtbMzDURtkKTy
+ token: ELfSXoFpKiCeBLWD1Uuy9TYUgSfJnEkR7GN
special_instructions:
currency: USD
locale: en
@@ -3867,16 +3869,16 @@ paths:
total: '0.0'
display_total: "$0.00"
completed_at:
- created_at: '2026-03-10T17:04:31.802Z'
- updated_at: '2026-03-10T17:04:31.834Z'
+ created_at: '2026-03-11T14:46:03.390Z'
+ updated_at: '2026-03-11T14:46:03.433Z'
order_promotions: []
line_items:
- id: li_UkLWZg9DAJ
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 391152
- slug: product-391152
+ name: Product 397255
+ slug: product-397255
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -3895,8 +3897,8 @@ paths:
discounted_amount: '10.0'
display_discounted_amount: "$10.00"
display_compare_at_amount: "$0.00"
- created_at: '2026-03-10T17:04:31.833Z'
- updated_at: '2026-03-10T17:04:31.851Z'
+ created_at: '2026-03-11T14:46:03.432Z'
+ updated_at: '2026-03-11T14:46:03.455Z'
compare_at_amount:
thumbnail_url:
option_values: []
@@ -3995,14 +3997,14 @@ paths:
application/json:
example:
id: or_UkLWZg9DAJ
- number: R584020025
+ number: R705024898
state: cart
checkout_steps:
- address
- delivery
- complete
- token: fDabjRHTJTgCfnXRsW7pixnuRuCZzh4kS72
+ token: 4vfbWYeTWTeRjhtnr62wgGGtbfZFq88rJxF
special_instructions:
currency: USD
locale: en
@@ -4027,8 +4029,8 @@ paths:
total: '0.0'
display_total: "$0.00"
completed_at:
- created_at: '2026-03-10T17:04:32.439Z'
- updated_at: '2026-03-10T17:04:32.504Z'
+ created_at: '2026-03-11T14:46:04.003Z'
+ updated_at: '2026-03-11T14:46:04.053Z'
order_promotions: []
line_items: []
shipments: []
@@ -4584,14 +4586,14 @@ paths:
application/json:
example:
id: or_gbHJdmfrXB
- number: R805209960
+ number: R940809780
state: cart
checkout_steps:
- address
- delivery
- payment
- complete
- token: hY2ic7vcmDnqZCwum3x5i9UwAWghGR6JwBC
+ token: VKHJYstcpDPxeEnBaMYwSvSiM3nXWPojae9
email:
special_instructions:
currency: USD
@@ -4617,16 +4619,16 @@ paths:
total: '110.0'
display_total: "$110.00"
completed_at:
- created_at: '2026-03-10T17:04:34.973Z'
- updated_at: '2026-03-10T17:04:35.018Z'
+ created_at: '2026-03-11T14:46:06.349Z'
+ updated_at: '2026-03-11T14:46:06.399Z'
order_promotions: []
line_items:
- id: li_gbHJdmfrXB
variant_id: variant_gbHJdmfrXB
quantity: 1
currency: USD
- name: Product 444781
- slug: product-444781
+ name: Product 443663
+ slug: product-443663
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -4645,23 +4647,23 @@ paths:
discounted_amount: '10.0'
display_discounted_amount: "$10.00"
display_compare_at_amount: "$0.00"
- created_at: '2026-03-10T17:04:35.000Z'
- updated_at: '2026-03-10T17:04:35.000Z'
+ created_at: '2026-03-11T14:46:06.379Z'
+ updated_at: '2026-03-11T14:46:06.379Z'
compare_at_amount:
thumbnail_url:
option_values: []
digital_links: []
shipments:
- id: ship_gbHJdmfrXB
- number: H75004939866
+ number: H28618015022
state: pending
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
shipped_at:
- created_at: '2026-03-10T17:04:35.007Z'
- updated_at: '2026-03-10T17:04:35.016Z'
+ created_at: '2026-03-11T14:46:06.386Z'
+ updated_at: '2026-03-11T14:46:06.397Z'
shipping_method:
id: shpm_gbHJdmfrXB
name: UPS Ground
@@ -4669,7 +4671,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_170
- name: Chung Tillman
+ name: Davida Deckow
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -4808,15 +4810,15 @@ paths:
application/json:
example:
id: or_UkLWZg9DAJ
- number: R200672713
+ number: R463665774
state: cart
checkout_steps:
- address
- delivery
- payment
- complete
- token: 6A1ihueJxQfB2Et23r7SEyC15sU2v5LLcFw
+ token: StutsTbAPhZaKLCy3UbnxWejcoK1gaQzXw8
special_instructions:
currency: USD
locale: en
@@ -4841,16 +4843,16 @@ paths:
total: '110.0'
display_total: "$110.00"
completed_at:
- created_at: '2026-03-10T17:04:38.392Z'
- updated_at: '2026-03-10T17:04:38.469Z'
+ created_at: '2026-03-11T14:46:09.751Z'
+ updated_at: '2026-03-11T14:46:09.829Z'
order_promotions: []
line_items:
- id: li_UkLWZg9DAJ
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 502226
- slug: product-502226
+ name: Product 505081
+ slug: product-505081
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -4869,23 +4871,23 @@ paths:
discounted_amount: '10.0'
display_discounted_amount: "$10.00"
display_compare_at_amount: "$0.00"
- created_at: '2026-03-10T17:04:38.423Z'
- updated_at: '2026-03-10T17:04:38.423Z'
+ created_at: '2026-03-11T14:46:09.786Z'
+ updated_at: '2026-03-11T14:46:09.786Z'
compare_at_amount:
thumbnail_url:
option_values: []
digital_links: []
shipments:
- id: ship_UkLWZg9DAJ
- number: H10876887956
+ number: H15150422408
state: pending
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
shipped_at:
- created_at: '2026-03-10T17:04:38.428Z'
- updated_at: '2026-03-10T17:04:38.442Z'
+ created_at: '2026-03-11T14:46:09.793Z'
+ updated_at: '2026-03-11T14:46:09.809Z'
shipping_method:
id: shpm_UkLWZg9DAJ
name: UPS Ground
@@ -4893,7 +4895,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_193
- name: Jerold McGlynn
+ name: Shaniqua Ebert
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -5125,15 +5127,15 @@ paths:
application/json:
example:
id: or_gbHJdmfrXB
- number: R308013991
+ number: R872065977
state: address
checkout_steps:
- address
- delivery
- payment
- complete
- token: nz8S6B3ucvQP3mq9rsao8sSvQ719AizpeZa
+ token: DMW6AkxApqY2i3C5y1ExYVgX3yk2EDUNdvD
special_instructions:
currency: USD
locale: en
@@ -5158,16 +5160,16 @@ paths:
total: '110.0'
display_total: "$110.00"
completed_at:
- created_at: '2026-03-10T17:04:39.752Z'
- updated_at: '2026-03-10T17:04:39.816Z'
+ 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 546220
- slug: product-546220
+ name: Product 549296
+ slug: product-549296
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -5186,23 +5188,23 @@ paths:
discounted_amount: '10.0'
display_discounted_amount: "$10.00"
display_compare_at_amount: "$0.00"
- created_at: '2026-03-10T17:04:39.778Z'
- updated_at: '2026-03-10T17:04:39.778Z'
+ created_at: '2026-03-11T14:46:11.149Z'
+ updated_at: '2026-03-11T14:46:11.149Z'
compare_at_amount:
thumbnail_url:
option_values: []
digital_links: []
shipments:
- id: ship_gbHJdmfrXB
- number: H37308014112
+ number: H79412789239
state: pending
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
shipped_at:
- created_at: '2026-03-10T17:04:39.785Z'
- updated_at: '2026-03-10T17:04:39.796Z'
+ created_at: '2026-03-11T14:46:11.162Z'
+ updated_at: '2026-03-11T14:46:11.175Z'
shipping_method:
id: shpm_gbHJdmfrXB
name: UPS Ground
@@ -5210,7 +5212,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_203
- name: Mika Wilderman
+ name: Corrin Parker
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -5335,15 +5337,15 @@ paths:
application/json:
example:
id: or_gbHJdmfrXB
- number: R256036719
+ number: R076286330
state: payment
checkout_steps:
- address
- delivery
- payment
- complete
- token: Ke5TvpPLo2GPYwV5cvTDV8qVdkaYe4QZkc2
+ token: haEJssNxc12QAR3dRYeS7ZHdqfwXArRd4e6
special_instructions:
currency: USD
locale: en
@@ -5368,16 +5370,16 @@ paths:
total: '29.99'
display_total: "$29.99"
completed_at:
- created_at: '2026-03-10T17:04:41.098Z'
- updated_at: '2026-03-10T17:04:41.242Z'
+ created_at: '2026-03-11T14:46:12.426Z'
+ updated_at: '2026-03-11T14:46:12.631Z'
order_promotions: []
line_items:
- id: li_gbHJdmfrXB
variant_id: variant_gbHJdmfrXB
quantity: 1
currency: USD
- name: Product 576517
- slug: product-576517
+ name: Product 57296
+ slug: product-57296
options_text: ''
price: '19.99'
display_price: "$19.99"
@@ -5396,23 +5398,23 @@ paths:
discounted_amount: '19.99'
display_discounted_amount: "$19.99"
display_compare_at_amount: "$0.00"
- created_at: '2026-03-10T17:04:41.125Z'
- updated_at: '2026-03-10T17:04:41.184Z'
+ created_at: '2026-03-11T14:46:12.452Z'
+ updated_at: '2026-03-11T14:46:12.533Z'
compare_at_amount:
thumbnail_url:
option_values: []
digital_links: []
shipments:
- id: ship_EfhxLZ9ck8
- number: H91036417779
+ number: H90196871256
state: pending
tracking:
tracking_url:
cost: '10.0'
display_cost: "$10.00"
shipped_at:
- created_at: '2026-03-10T17:04:41.203Z'
- updated_at: '2026-03-10T17:04:41.216Z'
+ created_at: '2026-03-11T14:46:12.565Z'
+ updated_at: '2026-03-11T14:46:12.586Z'
shipping_method:
id: shpm_UkLWZg9DAJ
name: UPS Ground
@@ -5420,7 +5422,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_213
- name: Antonietta Dare
+ name: Lavenia Hackett
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -5544,15 +5546,15 @@ paths:
application/json:
example:
id: or_gbHJdmfrXB
- number: R254885749
+ number: R312364650
state: complete
checkout_steps:
- address
- delivery
- payment
- complete
- token: xEgPmTJp4LaXoKzpVAp9d3yin44132tQtgH
+ token: HHo1kQ5b6gYW3igDaaZydKnK8YgWNQMMGZ1
special_instructions:
currency: USD
locale: en
@@ -5576,17 +5578,17 @@ paths:
display_additional_tax_total: "$0.00"
total: '29.99'
display_total: "$29.99"
- completed_at: '2026-03-10T17:04:42.124Z'
- created_at: '2026-03-10T17:04:41.879Z'
- updated_at: '2026-03-10T17:04:42.124Z'
+ completed_at: '2026-03-11T14:46:13.566Z'
+ created_at: '2026-03-11T14:46:13.339Z'
+ updated_at: '2026-03-11T14:46:13.566Z'
order_promotions: []
line_items:
- id: li_gbHJdmfrXB
variant_id: variant_gbHJdmfrXB
quantity: 1
currency: USD
- name: Product 59584
- slug: product-59584
+ name: Product 591606
+ slug: product-591606
options_text: ''
price: '19.99'
display_price: "$19.99"
@@ -5605,23 +5607,23 @@ paths:
discounted_amount: '19.99'
display_discounted_amount: "$19.99"
display_compare_at_amount: "$0.00"
- created_at: '2026-03-10T17:04:41.926Z'
- updated_at: '2026-03-10T17:04:42.003Z'
+ created_at: '2026-03-11T14:46:13.363Z'
+ updated_at: '2026-03-11T14:46:13.433Z'
compare_at_amount:
thumbnail_url:
option_values: []
digital_links: []
shipments:
- id: ship_EfhxLZ9ck8
- number: H73037386882
+ number: H47261238756
state: pending
tracking:
tracking_url:
cost: '10.0'
display_cost: "$10.00"
shipped_at:
- created_at: '2026-03-10T17:04:42.023Z'
- updated_at: '2026-03-10T17:04:42.114Z'
+ created_at: '2026-03-11T14:46:13.460Z'
+ updated_at: '2026-03-11T14:46:13.558Z'
shipping_method:
id: shpm_UkLWZg9DAJ
name: UPS Ground
@@ -5629,7 +5631,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: STATE_ABBR_219
- name: Joe Batz
+ name: Candie Toy
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -5662,11 +5664,11 @@ paths:
payment_method_id: pm_UkLWZg9DAJ
state: checkout
response_code: '12345'
- number: PUULQOJO
+ number: P2QKNM5G
amount: '29.99'
display_amount: "$29.99"
- created_at: '2026-03-10T17:04:42.085Z'
- updated_at: '2026-03-10T17:04:42.085Z'
+ created_at: '2026-03-11T14:46:13.532Z'
+ updated_at: '2026-03-11T14:46:13.532Z'
source_type: credit_card
source_id: card_UkLWZg9DAJ
source:
@@ -5899,13 +5901,13 @@ paths:
id: ps_gbHJdmfrXB
status: pending
currency: USD
- external_id: bogus_24f80a115f6ec613a16db472
+ external_id: bogus_c3f5b9f7bac3e180e6ca9e52
external_data:
- client_secret: bogus_secret_0fedf6cd8dcb6dd6
+ client_secret: bogus_secret_7a9472fcff4f3952
customer_external_id:
expires_at:
- created_at: '2026-03-10T17:04:44.552Z'
- updated_at: '2026-03-10T17:04:44.552Z'
+ created_at: '2026-03-11T14:46:16.078Z'
+ updated_at: '2026-03-11T14:46:16.078Z'
amount: '110.0'
payment_method_id: pm_UkLWZg9DAJ
order_id: or_UkLWZg9DAJ
@@ -6010,13 +6012,13 @@ paths:
id: ps_UkLWZg9DAJ
status: pending
currency: USD
- external_id: bogus_e43d9b7f3cae456e4b5107ef
+ external_id: bogus_336d5c5b9c794137ab1abedc
external_data:
client_secret: secret_123
customer_external_id:
expires_at:
- created_at: '2026-03-10T17:04:45.813Z'
- updated_at: '2026-03-10T17:04:45.813Z'
+ created_at: '2026-03-11T14:46:17.421Z'
+ updated_at: '2026-03-11T14:46:17.421Z'
amount: '110.0'
payment_method_id: pm_UkLWZg9DAJ
order_id: or_UkLWZg9DAJ
@@ -6073,13 +6075,13 @@ paths:
id: ps_UkLWZg9DAJ
status: pending
currency: USD
- external_id: bogus_53fe2325575c59a1333fcfd7
+ external_id: bogus_7852464e9e675ece9c58a135
external_data:
client_secret: secret_123
customer_external_id:
expires_at:
- created_at: '2026-03-10T17:04:47.023Z'
- updated_at: '2026-03-10T17:04:47.036Z'
+ created_at: '2026-03-11T14:46:18.755Z'
+ updated_at: '2026-03-11T14:46:18.767Z'
amount: '50.0'
payment_method_id: pm_UkLWZg9DAJ
order_id: or_UkLWZg9DAJ
@@ -6177,13 +6179,13 @@ paths:
id: ps_UkLWZg9DAJ
status: completed
currency: USD
- external_id: bogus_f134966162bb4f0c41d283b9
+ external_id: bogus_4549bc3eab40446299163180
external_data:
client_secret: secret_123
customer_external_id:
expires_at:
- created_at: '2026-03-10T17:04:47.625Z'
- updated_at: '2026-03-10T17:04:47.643Z'
+ created_at: '2026-03-11T14:46:19.432Z'
+ updated_at: '2026-03-11T14:46:19.449Z'
amount: '110.0'
payment_method_id: pm_UkLWZg9DAJ
order_id: or_UkLWZg9DAJ
@@ -6263,11 +6265,11 @@ paths:
example:
id: pss_gbHJdmfrXB
status: pending
- external_id: bogus_seti_f6b724b1c02fdc8ebe113469
- external_client_secret: bogus_seti_secret_15978e14fbfe797c
+ external_id: bogus_seti_3d2fa5f1f03bda163c29a912
+ external_client_secret: bogus_seti_secret_74ba16f4d510ce3e
external_data: {}
- created_at: '2026-03-10T17:04:48.865Z'
- updated_at: '2026-03-10T17:04:48.865Z'
+ created_at: '2026-03-11T14:46:20.660Z'
+ updated_at: '2026-03-11T14:46:20.660Z'
payment_method_id: pm_UkLWZg9DAJ
payment_source_id:
payment_source_type:
@@ -6364,12 +6366,12 @@ paths:
example:
id: pss_UkLWZg9DAJ
status: pending
- external_id: seti_test_139f62554e1b1f886f9372f8
- external_client_secret: seti_secret_896b7fff701a3b14c4a160f3
+ external_id: seti_test_bcc8c5aa477a9c34899e35b1
+ external_client_secret: seti_secret_ffcead150899cf16e5b4301a
external_data:
client_secret: secret_123
- created_at: '2026-03-10T17:04:50.565Z'
- updated_at: '2026-03-10T17:04:50.565Z'
+ created_at: '2026-03-11T14:46:22.386Z'
+ updated_at: '2026-03-11T14:46:22.386Z'
payment_method_id: pm_UkLWZg9DAJ
payment_source_id:
payment_source_type:
@@ -6442,12 +6444,12 @@ paths:
example:
id: pss_UkLWZg9DAJ
status: completed
- external_id: seti_test_cb2bb23d0ca11478078d8a6f
- external_client_secret: seti_secret_9526c4785711ff397d58f416
+ external_id: seti_test_5d5f199c34c93bcb73eb3431
+ external_client_secret: seti_secret_b3c37c1c53c57b970fcb8818
external_data:
client_secret: secret_123
- created_at: '2026-03-10T17:04:51.689Z'
- updated_at: '2026-03-10T17:04:51.703Z'
+ created_at: '2026-03-11T14:46:23.508Z'
+ updated_at: '2026-03-11T14:46:23.529Z'
payment_method_id: pm_UkLWZg9DAJ
payment_source_id: card_UkLWZg9DAJ
payment_source_type: Spree::CreditCard
@@ -6530,11 +6532,11 @@ paths:
payment_method_id: pm_UkLWZg9DAJ
state: checkout
response_code: '12345'
- number: PKKDJAF3
+ number: PZB8DYTD
amount: '110.0'
display_amount: "$110.00"
- created_at: '2026-03-10T17:04:52.945Z'
- updated_at: '2026-03-10T17:04:52.945Z'
+ created_at: '2026-03-11T14:46:24.725Z'
+ updated_at: '2026-03-11T14:46:24.725Z'
source_type: credit_card
source_id: card_UkLWZg9DAJ
source:
@@ -6572,6 +6574,107 @@ paths:
message: Order not found
schema:
"$ref": "#/components/schemas/ErrorResponse"
+ post:
+ summary: Create payment
+ tags:
+ - Checkout
+ security:
+ - api_key: []
+ bearer_auth: []
+ description: Creates a payment for a non-session payment method (e.g. Check,
+ Cash on Delivery, Bank Transfer). For payment methods that require a session
+ (e.g. Stripe, PayPal), use the payment sessions endpoint instead.
+ x-codeSamples:
+ - lang: javascript
+ label: Spree SDK
+ source: |-
+ import { createClient } from '@spree/sdk'
+
+ const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+ })
+
+ const payment = await client.orders.payments.create('or_abc123', {
+ payment_method_id: 'pm_abc123',
+ }, {
+ bearerToken: '<token>',
+ })
+ parameters:
+ - name: x-spree-order-token
+ in: header
+ required: false
+ description: Order token for guest access
+ schema:
+ type: string
+ responses:
+ '201':
+ description: payment created
+ content:
+ application/json:
+ example:
+ id: py_gbHJdmfrXB
+ payment_method_id: pm_EfhxLZ9ck8
+ state: checkout
+ response_code:
+ number: P5W30ZLT
+ amount: '110.0'
+ display_amount: "$110.00"
+ created_at: '2026-03-11T14:46:25.982Z'
+ updated_at: '2026-03-11T14:46:25.982Z'
+ source_type:
+ source_id:
+ source:
+ payment_method:
+ id: pm_EfhxLZ9ck8
+ name: Check
+ description:
+ type: Spree::PaymentMethod::Check
+ session_required: false
+ schema:
+ "$ref": "#/components/schemas/Payment"
+ '422':
+ description: session-based payment method
+ content:
+ application/json:
+ example:
+ error:
+ code: payment_session_required
+ message: This payment method requires a payment session. Use the
+ payment sessions endpoint instead.
+ schema:
+ "$ref": "#/components/schemas/ErrorResponse"
+ '404':
+ description: order not found
+ content:
+ application/json:
+ example:
+ error:
+ code: order_not_found
+ message: Order not found
+ schema:
+ "$ref": "#/components/schemas/ErrorResponse"
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ payment_method_id:
+ type: string
+ example: pm_abc123
+ description: Payment method ID (must be a non-session payment method)
+ amount:
+ type: string
+ example: '99.99'
+ description: Payment amount (defaults to order total minus store
+ credits)
+ metadata:
+ type: object
+ description: Arbitrary metadata to attach to the payment (write-only,
+ not returned in Store API responses)
+ required:
+ - payment_method_id
"/api/v3/store/orders/{order_id}/payments/{id}":
parameters:
- name: x-spree-api-key
@@ -6628,11 +6731,11 @@ paths:
payment_method_id: pm_UkLWZg9DAJ
state: checkout
response_code: '12345'
- number: PNYHVSO0
+ number: PFXXLSLN
amount: '110.0'
display_amount: "$110.00"
- created_at: '2026-03-10T17:04:54.252Z'
- updated_at: '2026-03-10T17:04:54.252Z'
+ created_at: '2026-03-11T14:46:27.814Z'
+ updated_at: '2026-03-11T14:46:27.814Z'
source_type: credit_card
source_id: card_UkLWZg9DAJ
source:
@@ -6776,19 +6879,18 @@ paths:
example:
data:
- id: prod_UkLWZg9DAJ
- name: Product 764489
+ name: Product 791573
description: |-
- Provident nobis inventore ducimus odit. Ipsa non eos fugit odio dolorem repellat. Nobis earum nisi nulla alias adipisci quidem. Corporis eos eum et sint laboriosam reprehenderit. Quas doloribus inventore amet nemo.
- Ducimus beatae sunt harum tempora. Mollitia reiciendis totam minus adipisci nostrum. Repellendus modi nulla quia a harum sapiente architecto.
- Fuga placeat veniam provident excepturi. Placeat mollitia inventore excepturi dolorum molestiae. Voluptas nihil cupiditate aperiam aliquid.
- Laudantium tempore nesciunt quaerat error fugit incidunt nisi. Eaque similique assumenda commodi quidem quas aspernatur. Qui magnam aspernatur deleniti nisi animi quod sint. Impedit sequi numquam molestias nam veniam distinctio alias iusto.
- slug: product-764489
+ Dolor nihil nisi soluta voluptatem necessitatibus doloribus facilis. Accusantium quo esse at natus explicabo dolorem. Nesciunt corrupti quos voluptatibus exercitationem. Provident at natus molestias placeat odit veritatis. Enim temporibus maiores explicabo adipisci accusamus eius.
+ Minima maiores porro aspernatur corporis ea deserunt quos. Accusantium libero dolor aspernatur rem omnis voluptatibus distinctio saepe. Inventore rerum temporibus voluptatum atque. Animi recusandae omnis ad commodi.
+ Qui dicta amet consequuntur asperiores quasi esse blanditiis modi. Provident excepturi similique laborum ea. Repellat non hic temporibus nisi.
+ slug: product-791573
meta_description:
meta_keywords:
variant_count: 1
- available_on: '2025-03-10T17:04:54.899Z'
- created_at: '2026-03-10T17:04:54.914Z'
- updated_at: '2026-03-10T17:04:54.956Z'
+ available_on: '2025-03-11T14:46:28.471Z'
+ created_at: '2026-03-11T14:46:28.484Z'
+ updated_at: '2026-03-11T14:46:28.522Z'
purchasable: true
in_stock: false
backorderable: true
@@ -6808,17 +6910,18 @@ paths:
price_list_id:
original_price:
- id: prod_gbHJdmfrXB
- name: Product 772269
+ name: Product 802302
description: |-
- Quisquam totam libero consectetur quam illum occaecati sunt voluptatum. Deleniti molestias ipsum fugiat voluptatibus libero nulla. Sapiente hic commodi voluptatum sunt recusandae provident. Mollitia labore ipsum tenetur corporis voluptatum voluptatibus numquam voluptate.
- Aliquam earum totam ea adipisci nihil minus harum. Animi adipisci sapiente quisquam molestias. Vel minima expedita iste perspiciatis eos esse voluptatibus. Quia molestiae veritatis explicabo dolore error ab maxime optio.
- slug: product-772269
+ Quo cum inventore ipsa ex ipsam quis. Optio et accusamus ducimus sed. Molestiae debitis libero culpa ipsum. Quam aspernatur eveniet adipisci dolorum.
+ Suscipit ab quisquam magni velit perspiciatis veniam odio repellat. Necessitatibus ipsa quam amet reiciendis sunt. Doloremque quidem similique repellat nemo id deserunt dolor.
+ Eaque occaecati nulla excepturi officia distinctio amet tempore. Voluptatem veniam corrupti sequi ullam placeat. Sit unde mollitia nulla repellendus ab dolor culpa.
+ slug: product-802302
meta_description:
meta_keywords:
variant_count: 0
- available_on: '2025-03-10T17:04:54.964Z'
- created_at: '2026-03-10T17:04:54.975Z'
- updated_at: '2026-03-10T17:04:54.990Z'
+ available_on: '2025-03-11T14:46:28.527Z'
+ created_at: '2026-03-11T14:46:28.536Z'
+ updated_at: '2026-03-11T14:46:28.548Z'
purchasable: true
in_stock: false
backorderable: true
@@ -6924,18 +7027,19 @@ paths:
application/json:
example:
id: prod_UkLWZg9DAJ
- name: Product 883743
+ name: Product 916887
description: |-
- Tenetur laudantium omnis ab adipisci laboriosam. Atque earum iusto temporibus ipsam ullam. Qui dolore eius odit hic numquam excepturi corporis atque.
- Mollitia voluptate possimus non consectetur at excepturi occaecati quod. Ullam aut perferendis voluptatem dolor asperiores corrupti reprehenderit. Eaque repudiandae et quos officiis mollitia eum. In velit inventore quasi ipsum.
- Molestias tempore vero consectetur delectus exercitationem maiores nulla. Minus blanditiis excepturi cupiditate ut. Reiciendis cumque nisi nihil maxime. Eum fuga ipsa porro earum consequuntur omnis nihil. Molestiae enim dicta soluta doloremque.
- slug: product-883743
+ Velit atque repudiandae omnis ipsa magnam. Eaque molestiae facere consequatur molestias. Eius consequuntur sequi maxime quo.
+ Facilis sed quasi laborum magnam repudiandae occaecati culpa ducimus. Illum dignissimos vero velit beatae non adipisci. Cupiditate deleniti adipisci nisi officia.
+ Saepe iure odit rerum voluptatibus repudiandae blanditiis deleniti sequi. Fugit suscipit illum saepe cum et dignissimos. Autem nemo consectetur quae qui beatae nulla nostrum voluptatibus. Incidunt beatae dolore tempora amet corrupti quaerat quisquam.
+ Vel quibusdam libero perspiciatis natus facere. Molestias accusantium cupiditate molestiae suscipit. Quidem perferendis facere laboriosam odio iste cum. Error illum deleniti non minus mollitia.
+ slug: product-916887
meta_description:
meta_keywords:
variant_count: 1
- available_on: '2025-03-10T17:04:55.491Z'
- created_at: '2026-03-10T17:04:55.504Z'
- updated_at: '2026-03-10T17:04:55.535Z'
+ available_on: '2025-03-11T14:46:29.120Z'
+ created_at: '2026-03-11T14:46:29.134Z'
+ updated_at: '2026-03-11T14:46:29.237Z'
purchasable: true
in_stock: false
backorderable: true
@@ -7152,29 +7256,29 @@ paths:
example:
data:
- id: ship_UkLWZg9DAJ
- number: H95308138645
+ number: H56045510455
state: pending
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
shipped_at:
- created_at: '2026-03-10T17:04:57.456Z'
- updated_at: '2026-03-10T17:04:57.472Z'
+ created_at: '2026-03-11T14:46:31.392Z'
+ updated_at: '2026-03-11T14:46:31.406Z'
shipping_method:
id: shpm_UkLWZg9DAJ
name: UPS Ground
code: UPS_GROUND
stock_location:
id: sloc_UkLWZg9DAJ
- state_abbr: STATE_ABBR_305
- name: Buddy Harvey
+ state_abbr: STATE_ABBR_317
+ name: Len Corwin
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
country_iso: US
country_name: United States of America
- state_text: STATE_ABBR_305
+ state_text: STATE_ABBR_317
shipping_rates:
- id: shpr_UkLWZg9DAJ
shipping_method_id: shpm_UkLWZg9DAJ
@@ -7265,29 +7369,29 @@ paths:
application/json:
example:
id: ship_UkLWZg9DAJ
- number: H32342050285
+ number: H00889849207
state: pending
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
shipped_at:
- created_at: '2026-03-10T17:04:58.669Z'
- updated_at: '2026-03-10T17:04:58.682Z'
+ created_at: '2026-03-11T14:46:32.631Z'
+ updated_at: '2026-03-11T14:46:32.658Z'
shipping_method:
id: shpm_UkLWZg9DAJ
name: UPS Ground
code: UPS_GROUND
stock_location:
id: sloc_UkLWZg9DAJ
- state_abbr: STATE_ABBR_313
- name: Barbie Beier
+ state_abbr: STATE_ABBR_325
+ name: Louvenia Harvey
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
country_iso: US
country_name: United States of America
- state_text: STATE_ABBR_313
+ state_text: STATE_ABBR_325
shipping_rates:
- id: shpr_UkLWZg9DAJ
shipping_method_id: shpm_UkLWZg9DAJ
@@ -7371,15 +7475,15 @@ paths:
application/json:
example:
id: or_UkLWZg9DAJ
- number: R547955671
+ number: R113462108
state: delivery
checkout_steps:
- address
- delivery
- payment
- complete
- token: s2D3AWULn6SZ3HbP3KZBD7Nq3mXzjZdhSFh
+ token: oH5zJdWjEiE1WzuMXb3kSFhynrUmjUHWE3g
special_instructions:
currency: USD
locale: en
@@ -7404,16 +7508,16 @@ paths:
total: '110.0'
display_total: "$110.00"
completed_at:
- created_at: '2026-03-10T17:04:59.849Z'
- updated_at: '2026-03-10T17:04:59.914Z'
+ created_at: '2026-03-11T14:46:33.866Z'
+ updated_at: '2026-03-11T14:46:33.934Z'
order_promotions: []
line_items:
- id: li_UkLWZg9DAJ
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 1209434
- slug: product-1209434
+ name: Product 1233123
+ slug: product-1233123
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -7432,37 +7536,37 @@ paths:
discounted_amount: '10.0'
display_discounted_amount: "$10.00"
display_compare_at_amount: "$0.00"
- created_at: '2026-03-10T17:04:59.878Z'
- updated_at: '2026-03-10T17:04:59.878Z'
+ created_at: '2026-03-11T14:46:33.896Z'
+ updated_at: '2026-03-11T14:46:33.896Z'
compare_at_amount:
thumbnail_url:
option_values: []
digital_links: []
shipments:
- id: ship_UkLWZg9DAJ
- number: H39630301795
+ number: H01376293569
state: pending
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
shipped_at:
- created_at: '2026-03-10T17:04:59.883Z'
- updated_at: '2026-03-10T17:04:59.913Z'
+ created_at: '2026-03-11T14:46:33.901Z'
+ updated_at: '2026-03-11T14:46:33.932Z'
shipping_method:
id: shpm_UkLWZg9DAJ
name: UPS Ground
code: UPS_GROUND
stock_location:
id: sloc_UkLWZg9DAJ
- state_abbr: STATE_ABBR_321
- name: Rebekah Goyette
+ state_abbr: STATE_ABBR_333
+ name: Mechelle Ledner
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
country_iso: US
country_name: United States of America
- state_text: STATE_ABBR_321
+ state_text: STATE_ABBR_333
shipping_rates:
- id: shpr_UkLWZg9DAJ
shipping_method_id: shpm_UkLWZg9DAJ
@@ -7480,7 +7584,7 @@ paths:
firstname: John
lastname: Doe
full_name: John Doe
- address1: 302 Lovely Street
+ address1: 314 Lovely Street
address2: Northwest
city: Herndon
zipcode: '35005'
@@ -7488,16 +7592,16 @@ paths:
company: Company
country_name: United States of America
country_iso: US
- state_text: STATE_ABBR_323
- state_abbr: STATE_ABBR_323
+ state_text: STATE_ABBR_335
+ state_abbr: STATE_ABBR_335
quick_checkout: false
- state_name: STATE_NAME_323
+ state_name: STATE_NAME_335
ship_address:
id: addr_VqXmZF31wY
firstname: John
lastname: Doe
full_name: John Doe
- address1: 303 Lovely Street
+ address1: 315 Lovely Street
address2: Northwest
city: Herndon
zipcode: '35005'
@@ -7505,10 +7609,10 @@ paths:
company: Company
country_name: United States of America
country_iso: US
- state_text: STATE_ABBR_324
- state_abbr: STATE_ABBR_324
+ state_text: STATE_ABBR_336
+ state_abbr: STATE_ABBR_336
quick_checkout: false
- state_name: STATE_NAME_324
+ state_name: STATE_NAME_336
payment_methods: []
schema:
"$ref": "#/components/schemas/Order"
@@ -7593,15 +7697,15 @@ paths:
application/json:
example:
id: or_UkLWZg9DAJ
- number: R034719281
+ number: R418869961
state: cart
checkout_steps:
- address
- delivery
- payment
- complete
- token: SWzRTQLxVE7NHxc6G299YfvCeXWP2MHyg9w
+ token: MeADhwL96G5Zsy36KqthCP1mE9GawvfuuXw
special_instructions:
currency: USD
locale: en
@@ -7626,16 +7730,16 @@ paths:
total: '110.0'
display_total: "$110.00"
completed_at:
- created_at: '2026-03-10T17:05:01.116Z'
- updated_at: '2026-03-10T17:05:01.199Z'
+ created_at: '2026-03-11T14:46:35.123Z'
+ updated_at: '2026-03-11T14:46:35.175Z'
order_promotions: []
line_items:
- id: li_UkLWZg9DAJ
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 1223187
- slug: product-1223187
+ name: Product 1254911
+ slug: product-1254911
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -7654,37 +7758,37 @@ paths:
discounted_amount: '10.0'
display_discounted_amount: "$10.00"
display_compare_at_amount: "$0.00"
- created_at: '2026-03-10T17:05:01.172Z'
- updated_at: '2026-03-10T17:05:01.172Z'
+ created_at: '2026-03-11T14:46:35.154Z'
+ updated_at: '2026-03-11T14:46:35.154Z'
compare_at_amount:
thumbnail_url:
option_values: []
digital_links: []
shipments:
- id: ship_UkLWZg9DAJ
- number: H16218442175
+ number: H36977143143
state: pending
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
shipped_at:
- created_at: '2026-03-10T17:05:01.180Z'
- updated_at: '2026-03-10T17:05:01.197Z'
+ created_at: '2026-03-11T14:46:35.159Z'
+ updated_at: '2026-03-11T14:46:35.173Z'
shipping_method:
id: shpm_UkLWZg9DAJ
name: UPS Ground
code: UPS_GROUND
stock_location:
id: sloc_UkLWZg9DAJ
- state_abbr: STATE_ABBR_329
- name: Paige Koss
+ state_abbr: STATE_ABBR_341
+ name: Kimberlee Dach
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
country_iso: US
country_name: United States of America
- state_text: STATE_ABBR_329
+ state_text: STATE_ABBR_341
shipping_rates:
- id: shpr_UkLWZg9DAJ
shipping_method_id: shpm_UkLWZg9DAJ
@@ -7700,12 +7804,12 @@ paths:
- id: py_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
state: checkout
- response_code: 1-SC-20260310170501502405
- number: P4IT9OGA
+ response_code: 1-SC-20260311144635483353
+ number: PGMMUC9Z
amount: '10.0'
display_amount: "$10.00"
- created_at: '2026-03-10T17:05:01.505Z'
- updated_at: '2026-03-10T17:05:01.505Z'
+ created_at: '2026-03-11T14:46:35.487Z'
+ updated_at: '2026-03-11T14:46:35.487Z'
source_type: store_credit
source_id: credit_UkLWZg9DAJ
source:
@@ -7728,7 +7832,7 @@ paths:
firstname: John
lastname: Doe
full_name: John Doe
- address1: 310 Lovely Street
+ address1: 322 Lovely Street
address2: Northwest
city: Herndon
zipcode: '35005'
@@ -7736,16 +7840,16 @@ paths:
company: Company
country_name: United States of America
country_iso: US
- state_text: STATE_ABBR_331
- state_abbr: STATE_ABBR_331
+ state_text: STATE_ABBR_343
+ state_abbr: STATE_ABBR_343
quick_checkout: false
- state_name: STATE_NAME_331
+ state_name: STATE_NAME_343
ship_address:
id: addr_VqXmZF31wY
firstname: John
lastname: Doe
full_name: John Doe
- address1: 311 Lovely Street
+ address1: 323 Lovely Street
address2: Northwest
city: Herndon
zipcode: '35005'
@@ -7753,10 +7857,10 @@ paths:
company: Company
country_name: United States of America
country_iso: US
- state_text: STATE_ABBR_332
- state_abbr: STATE_ABBR_332
+ state_text: STATE_ABBR_344
+ state_abbr: STATE_ABBR_344
quick_checkout: false
- state_name: STATE_NAME_332
+ state_name: STATE_NAME_344
payment_methods:
- id: pm_UkLWZg9DAJ
name: Store Credit
@@ -7835,15 +7939,15 @@ paths:
application/json:
example:
id: or_UkLWZg9DAJ
- number: R734318424
+ number: R176406903
state: cart
checkout_steps:
- address
- delivery
- payment
- complete
- token: jHD2wZotmK4yfCSCq7sumARkEXiSET3GKU4
+ token: o6HCgycDeUUk4qM1xsQcHX3XBynYmZ2eRLC
special_instructions:
currency: USD
locale: en
@@ -7868,16 +7972,16 @@ paths:
total: '110.0'
display_total: "$110.00"
completed_at:
- created_at: '2026-03-10T17:05:02.666Z'
- updated_at: '2026-03-10T17:05:02.717Z'
+ created_at: '2026-03-11T14:46:36.664Z'
+ updated_at: '2026-03-11T14:46:36.713Z'
order_promotions: []
line_items:
- id: li_UkLWZg9DAJ
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 1245816
- slug: product-1245816
+ name: Product 127583
+ slug: product-127583
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -7896,37 +8000,37 @@ paths:
discounted_amount: '10.0'
display_discounted_amount: "$10.00"
display_compare_at_amount: "$0.00"
- created_at: '2026-03-10T17:05:02.695Z'
- updated_at: '2026-03-10T17:05:02.695Z'
+ created_at: '2026-03-11T14:46:36.694Z'
+ updated_at: '2026-03-11T14:46:36.694Z'
compare_at_amount:
thumbnail_url:
option_values: []
digital_links: []
shipments:
- id: ship_UkLWZg9DAJ
- number: H38993011835
+ number: H44612030253
state: pending
tracking: U10000
tracking_url:
cost: '100.0'
display_cost: "$100.00"
shipped_at:
- created_at: '2026-03-10T17:05:02.701Z'
- updated_at: '2026-03-10T17:05:02.715Z'
+ created_at: '2026-03-11T14:46:36.699Z'
+ updated_at: '2026-03-11T14:46:36.711Z'
shipping_method:
id: shpm_UkLWZg9DAJ
name: UPS Ground
code: UPS_GROUND
stock_location:
id: sloc_UkLWZg9DAJ
- state_abbr: STATE_ABBR_337
- name: Allyn Yost
+ state_abbr: STATE_ABBR_349
+ name: Melaine Beier
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
country_iso: US
country_name: United States of America
- state_text: STATE_ABBR_337
+ state_text: STATE_ABBR_349
shipping_rates:
- id: shpr_UkLWZg9DAJ
shipping_method_id: shpm_UkLWZg9DAJ
@@ -7944,7 +8048,7 @@ paths:
firstname: John
lastname: Doe
full_name: John Doe
- address1: 318 Lovely Street
+ address1: 330 Lovely Street
address2: Northwest
city: Herndon
zipcode: '35005'
@@ -7952,16 +8056,16 @@ paths:
company: Company
country_name: United States of America
country_iso: US
- state_text: STATE_ABBR_339
- state_abbr: STATE_ABBR_339
+ state_text: STATE_ABBR_351
+ state_abbr: STATE_ABBR_351
quick_checkout: false
- state_name: STATE_NAME_339
+ state_name: STATE_NAME_351
ship_address:
id: addr_VqXmZF31wY
firstname: John
lastname: Doe
full_name: John Doe
- address1: 319 Lovely Street
+ address1: 331 Lovely Street
address2: Northwest
city: Herndon
zipcode: '35005'
@@ -7969,10 +8073,10 @@ paths:
company: Company
country_name: United States of America
country_iso: US
- state_text: STATE_ABBR_340
- state_abbr: STATE_ABBR_340
+ state_text: STATE_ABBR_352
+ state_abbr: STATE_ABBR_352
quick_checkout: false
- state_name: STATE_NAME_340
+ state_name: STATE_NAME_352
payment_methods: []
schema:
"$ref": "#/components/schemas/Order"
@@ -8036,9 +8140,9 @@ paths:
data:
- id: wl_UkLWZg9DAJ
name: My Wishlist
- token: 6m4ZLjk8tFGtqQvMQBYDcXir
- created_at: '2026-03-10T17:05:03.274Z'
- updated_at: '2026-03-10T17:05:03.274Z'
+ token: i4KkuH3yB8s2YBm7s7BructR
+ created_at: '2026-03-11T14:46:37.275Z'
+ updated_at: '2026-03-11T14:46:37.275Z'
is_default: false
is_private: true
meta:
@@ -8114,9 +8218,9 @@ paths:
example:
id: wl_gbHJdmfrXB
name: Birthday Ideas
- token: XTM6UEAmnkHpxGLg8VQwWri4
- created_at: '2026-03-10T17:05:04.454Z'
- updated_at: '2026-03-10T17:05:04.454Z'
+ token: cHskWcu665FJV1ubD3nc7T3i
+ created_at: '2026-03-11T14:46:38.457Z'
+ updated_at: '2026-03-11T14:46:38.457Z'
is_default: false
is_private: true
schema:
@@ -8212,9 +8316,9 @@ paths:
example:
id: wl_UkLWZg9DAJ
name: My Wishlist
- token: vw9isW8Gr8x3Xugbk7qRA2Kg
- created_at: '2026-03-10T17:05:05.633Z'
- updated_at: '2026-03-10T17:05:05.633Z'
+ token: CQtCzpXN8LtU5rnZkz9rVEHV
+ created_at: '2026-03-11T14:46:39.578Z'
+ updated_at: '2026-03-11T14:46:39.578Z'
is_default: false
is_private: true
schema:
@@ -8276,9 +8380,9 @@ paths:
example:
id: wl_UkLWZg9DAJ
name: Updated Name
- token: MRjk3FQKq28nzNSYn6R4Y4DZ
- created_at: '2026-03-10T17:05:06.816Z'
- updated_at: '2026-03-10T17:05:06.871Z'
+ token: pVfqT75mC5QtFmKdeQU3eTvC
+ created_at: '2026-03-11T14:46:40.832Z'
+ updated_at: '2026-03-11T14:46:40.876Z'
is_default: false
is_private: true
schema:
@@ -8390,18 +8494,18 @@ paths:
variant_id: variant_gbHJdmfrXB
wishlist_id: wl_UkLWZg9DAJ
quantity: 1
- created_at: '2026-03-10T17:05:08.111Z'
- updated_at: '2026-03-10T17:05:08.111Z'
+ created_at: '2026-03-11T14:46:42.040Z'
+ updated_at: '2026-03-11T14:46:42.040Z'
variant:
id: variant_gbHJdmfrXB
product_id: prod_gbHJdmfrXB
- sku: SKU-146
+ sku: SKU-149
is_master: true
options_text: ''
track_inventory: true
image_count: 0
- created_at: '2026-03-10T17:05:08.084Z'
- updated_at: '2026-03-10T17:05:08.096Z'
+ created_at: '2026-03-11T14:46:42.018Z'
+ updated_at: '2026-03-11T14:46:42.026Z'
thumbnail:
purchasable: true
in_stock: false
diff --git a/docs/developer/core-concepts/payments.mdx b/docs/developer/core-concepts/payments.mdx
index bf9cd4266e..ae9f6eb5d1 100644
--- a/docs/developer/core-concepts/payments.mdx
+++ b/docs/developer/core-concepts/payments.mdx
@@ -148,9 +148,41 @@ Payment methods indicate whether they use the modern session-based flow via the
Modern gateways like Stripe and Adyen set `session_required?` to `true`. The Store API serializer includes this as the `session_required` field so your frontend knows which flow to use.
+### Non-Session Payment Methods (Manual/Offline)
+
+Payment methods where `session_required?` returns `false` don't need a payment session. These are typically offline or manual payment methods such as:
+
+- **Check** — built-in (`Spree::PaymentMethod::Check`)
+- **Cash on Delivery** — customer pays upon delivery
+- **Bank Transfer / Wire** — customer transfers money to a bank account
+- **Purchase Order** — common in B2B, customer provides a PO number
+
+For these methods, the Store API allows creating a payment directly without going through the payment session flow:
+
+```typescript
+const options = { orderToken: cart.token }
+
+// Create a payment for a non-session payment method
+const payment = await client.orders.payments.create(cart.id, {
+ payment_method_id: 'pm_xyz789',
+ amount: '99.99', // Optional, defaults to order total minus store credits
+ metadata: { // Optional, write-only metadata (e.g. PO number)
+ purchase_order_number: 'PO-12345',
+ },
+}, options)
+```
+
+The payment is created in `checkout` state. When the order transitions to `complete`, Spree calls `process_payments!` which runs the payment method's `authorize` (or `purchase` if auto-capture is enabled). For manual payment methods like Check, this is a no-op that succeeds immediately — the payment moves to `pending` (or `completed` with auto-capture), allowing the order to complete.
+
+The merchant can later capture or void the payment from the Admin Panel once the actual payment is received (e.g., check arrives, bank transfer clears, cash is collected on delivery).
+
## Payment Flow
-Modern payment gateways (Stripe, Adyen, PayPal) use a two-phase approach: first a **Payment Session** is created with the gateway, then after the customer completes payment on the frontend, Spree creates a **Payment** record to track the result. This ensures full PCI compliance, 3D Secure support, and compatibility with all payment method types.
+Spree supports two payment flows depending on the payment method type:
+
+### Session-Based Flow (Stripe, Adyen, PayPal, etc.)
+
+Modern payment gateways use a two-phase approach: first a **Payment Session** is created with the gateway, then after the customer completes payment on the frontend, Spree creates a **Payment** record to track the result. This ensures full PCI compliance, 3D Secure support, and compatibility with all payment method types.
```mermaid
sequenceDiagram
@@ -199,6 +231,40 @@ sequenceDiagram
</Step>
</Steps>
+### Direct Payment Flow (Check, Cash on Delivery, Bank Transfer, etc.)
+
+Non-session payment methods use a simpler flow where a payment is created directly without involving an external payment provider:
+
+```mermaid
+sequenceDiagram
+ participant Frontend
+ participant Spree API
+
+ Frontend->>Spree API: GET /payment_methods
+ Spree API-->>Frontend: Payment methods (with session_required flag)
+
+ Frontend->>Spree API: POST /payments (payment_method_id)
+ Spree API->>Spree API: Create Payment (checkout state)
+ Spree API-->>Frontend: Payment created
+
+ Frontend->>Spree API: PATCH /orders/:id/complete
+ Spree API->>Spree API: process_payments! (no-op for manual methods)
+ Spree API->>Spree API: Payment → pending/completed
+ Spree API-->>Frontend: Order completed
+```
+
+<Steps>
+ <Step title="List payment methods">
+ The frontend calls `GET /payment_methods` and checks the `session_required` flag on each method. Methods with `session_required: false` use this direct flow.
+ </Step>
+ <Step title="Create payment">
+ The frontend calls `POST /payments` with the `payment_method_id`. Spree creates a `Payment` record in `checkout` state. No external provider interaction is needed.
+ </Step>
+ <Step title="Complete order">
+ The frontend completes the order. Spree's `process_payments!` runs the payment method's authorize/purchase, which for manual methods is a no-op success. The payment transitions to `pending` (or `completed` with auto-capture) and the order completes.
+ </Step>
+</Steps>
+
### Payment Session
A `PaymentSession` (`Spree::PaymentSession`) represents a server-side session with the payment gateway. It is the entry point for every payment attempt and holds the provider-specific data needed by the frontend SDK.
diff --git a/docs/developer/sdk/quickstart.mdx b/docs/developer/sdk/quickstart.mdx
index 4418505203..0008adb074 100644
--- a/docs/developer/sdk/quickstart.mdx
+++ b/docs/developer/sdk/quickstart.mdx
@@ -58,7 +58,7 @@ The SDK uses a resource builder pattern for nested resources:
| Parent Resource | Nested Resource | Available Methods |
|-----------------|-----------------|-------------------|
| `orders` | `lineItems` | `create`, `update`, `delete` |
-| `orders` | `payments` | `list`, `get` |
+| `orders` | `payments` | `list`, `get`, `create` |
| `orders` | `paymentMethods` | `list` |
| `orders` | `paymentSessions` | `create`, `get`, `update`, `complete` |
| `orders` | `shipments` | `list`, `update` |
diff --git a/docs/developer/sdk/store/payments.mdx b/docs/developer/sdk/store/payments.mdx
index f40667594a..2842ad24b8 100644
--- a/docs/developer/sdk/store/payments.mdx
+++ b/docs/developer/sdk/store/payments.mdx
@@ -3,7 +3,7 @@ title: Payments & Shipping
description: Handle payments, payment sessions, and shipping with the Spree SDK
---
-## Payments
+## Payment Methods
```typescript
const options = { orderToken: cart.token };
@@ -11,13 +11,38 @@ const options = { orderToken: cart.token };
// Get available payment methods for an order
const methods = await client.orders.paymentMethods.list(cart.id, options);
+// Each method includes a `session_required` flag:
+// - true → use Payment Sessions (Stripe, Adyen, PayPal, etc.)
+// - false → use direct payment creation (Check, Cash on Delivery, Bank Transfer, etc.)
+```
+
+## Payments
+
+```typescript
+const options = { orderToken: cart.token };
+
// List payments on an order
const payments = await client.orders.payments.list(cart.id, options);
// Get a specific payment
const payment = await client.orders.payments.get(cart.id, paymentId, options);
+
+// Create a payment for a non-session payment method
+// (e.g. Check, Cash on Delivery, Bank Transfer, Purchase Order)
+const payment = await client.orders.payments.create(cart.id, {
+ payment_method_id: 'pm_xxx',
+ amount: '99.99', // Optional, defaults to order total minus store credits
+ metadata: { // Optional, write-only metadata
+ purchase_order_number: 'PO-12345',
+ },
+}, options);
```
+<Note>
+ `payments.create()` only works with non-session payment methods (where `session_required` is `false`).
+ For session-based gateways like Stripe or Adyen, use `paymentSessions.create()` instead.
+</Note>
+
## Payment Sessions
Payment sessions provide a unified, provider-agnostic interface for payment processing. They work with any payment gateway (Stripe, Adyen, PayPal, etc.) through a single API.
diff --git a/packages/next/.changeset/rename-taxons-to-categories.md b/packages/next/.changeset/rename-taxons-to-categories.md
deleted file mode 100644
index ced09b0c7e..0000000000
--- a/packages/next/.changeset/rename-taxons-to-categories.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@spree/next": patch
----
-
-Renamed Taxons/Taxonomies to Categories. `listTaxons`/`getTaxon`/`listTaxonProducts` replaced with `listCategories`/`getCategory`/`listCategoryProducts`. `listTaxonomies`/`getTaxonomy` removed. Re-exported `Category` type replaces `Taxon`/`Taxonomy`.
diff --git a/packages/next/CHANGELOG.md b/packages/next/CHANGELOG.md
index d3f328fb73..943cec57fb 100644
--- a/packages/next/CHANGELOG.md
+++ b/packages/next/CHANGELOG.md
@@ -1,5 +1,14 @@
# @spree/next
+## 0.8.2
+
+### Patch Changes
+
+- Added `createPayment` server action for non-session payment methods (e.g. Check, Cash on Delivery, Bank Transfer). Exported `CreatePaymentParams` type.
+
+- Updated dependencies:
+
## 0.8.1
### Patch Changes
diff --git a/packages/next/README.md b/packages/next/README.md
index 9ea285ff9e..c1723f98b1 100644
--- a/packages/next/README.md
+++ b/packages/next/README.md
@@ -195,7 +195,23 @@ const orders = await listOrders();
const order = await getOrder(orderId);
```
-### Payment Sessions
+### Payments (Manual/Offline)
+
+```typescript
+import { createPayment } from '@spree/next';
+
+// Create a payment for a non-session payment method
+// (e.g. Check, Cash on Delivery, Bank Transfer, Purchase Order)
+await createPayment(orderId, {
+ payment_method_id: 'pm_123',
+ amount: '99.99', // Optional, defaults to order total minus store credits
+ metadata: { // Optional, write-only metadata
+ purchase_order_number: 'PO-12345',
+ },
+});
+```
+
+### Payment Sessions (Stripe, Adyen, PayPal, etc.)
```typescript
import {
diff --git a/packages/next/package.json b/packages/next/package.json
index 79bdfe1f46..f99ebcb210 100644
--- a/packages/next/package.json
+++ b/packages/next/package.json
@@ -1,6 +1,6 @@
{
"name": "@spree/next",
- "version": "0.8.1",
+ "version": "0.8.2",
"description": "Next.js integration for Spree Commerce — server actions, caching, and cookie-based auth",
"type": "module",
"main": "./dist/index.js",
@@ -62,7 +62,7 @@
"url": "https://github.com/spree/spree/issues"
},
"peerDependencies": {
- "@spree/sdk": ">=0.8.1",
+ "@spree/sdk": ">=0.8.3",
"next": ">=15.0.0",
"react": ">=19.0.0"
},
diff --git a/packages/next/src/actions/payments.ts b/packages/next/src/actions/payments.ts
new file mode 100644
index 0000000000..39ddcc0938
--- /dev/null
+++ b/packages/next/src/actions/payments.ts
@@ -0,0 +1,26 @@
+'use server';
+
+import { revalidateTag } from 'next/cache';
+import type { Payment, CreatePaymentParams } from '@spree/sdk';
+import { getClient } from '../config';
+import { getCartToken, getAccessToken } from '../cookies';
+
+async function getCheckoutOptions() {
+ const orderToken = await getCartToken();
+ const token = await getAccessToken();
+ return { orderToken, token };
+}
+
+/**
+ * Create a payment for a non-session payment method (e.g. Check, Cash on Delivery, Bank Transfer).
+ * For session-based payment methods (e.g. Stripe, PayPal), use createPaymentSession instead.
+ */
+export async function createPayment(
+ orderId: string,
+ params: CreatePaymentParams
+): Promise<Payment> {
+ const options = await getCheckoutOptions();
+ const result = await getClient().orders.payments.create(orderId, params, options);
+ revalidateTag('checkout');
+ return result;
+}
diff --git a/packages/next/src/index.ts b/packages/next/src/index.ts
index 9e3be7c3ea..d1ebb6244e 100644
--- a/packages/next/src/index.ts
+++ b/packages/next/src/index.ts
@@ -54,6 +54,8 @@ export { setLocale } from './actions/locale';
export { listCreditCards, deleteCreditCard } from './actions/credit-cards';
export { listGiftCards, getGiftCard } from './actions/gift-cards';
+export { createPayment } from './actions/payments';
+
export {
createPaymentSession,
getPaymentSession,
@@ -100,6 +102,7 @@ export type {
LineItemInput,
UpdateOrderParams,
ProductFiltersResponse,
+ CreatePaymentParams,
CreatePaymentSessionParams,
UpdatePaymentSessionParams,
CompletePaymentSessionParams,
diff --git a/packages/sdk/.changeset/rename-taxons-to-categories.md b/packages/sdk/.changeset/rename-taxons-to-categories.md
deleted file mode 100644
index 40383391a1..0000000000
--- a/packages/sdk/.changeset/rename-taxons-to-categories.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@spree/sdk": patch
----
-
-Renamed Taxons/Taxonomies to Categories in the public API surface. `client.taxons` is now `client.categories`, `client.taxonomies` has been removed. Types `Taxon`/`Taxonomy` replaced with `Category`. Filter types updated accordingly (`TaxonFilter` → `CategoryFilter`, `TaxonListParams` → `CategoryListParams`, `ProductFiltersParams.taxon_id` → `category_id`).
diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md
index 28885ab892..030ef0f7c6 100644
--- a/packages/sdk/CHANGELOG.md
+++ b/packages/sdk/CHANGELOG.md
@@ -1,5 +1,11 @@
# @spree/sdk
+## 0.8.2
+
+### Patch Changes
+
+- Added `orders.payments.create()` method for non-session payment methods (e.g. Check, Cash on Delivery, Bank Transfer). Accepts `payment_method_id`, optional `amount`, and optional `metadata`. For session-based payment methods, use `orders.paymentSessions.create()` instead. Added `CreatePaymentParams` type.
+
## 0.8.1
### Patch Changes
diff --git a/packages/sdk/README.md b/packages/sdk/README.md
index 9ec094aecd..d355562525 100644
--- a/packages/sdk/README.md
+++ b/packages/sdk/README.md
@@ -307,12 +307,25 @@ const options = { orderToken: cart.token };
// Get available payment methods for an order
const methods = await client.orders.paymentMethods.list(cart.id, options);
+// Each method includes `session_required` flag:
+// - true → use paymentSessions (Stripe, Adyen, PayPal, etc.)
+// - false → use payments.create (Check, Cash on Delivery, Bank Transfer, etc.)
// List payments on an order
const payments = await client.orders.payments.list(cart.id, options);
// Get a specific payment
const payment = await client.orders.payments.get(cart.id, paymentId, options);
+
+// Create a payment for a non-session payment method
+// (e.g. Check, Cash on Delivery, Bank Transfer, Purchase Order)
+const payment = await client.orders.payments.create(cart.id, {
+ payment_method_id: 'pm_xxx',
+ amount: '99.99', // Optional, defaults to order total minus store credits
+ metadata: { // Optional, write-only metadata
+ purchase_order_number: 'PO-12345',
+ },
+}, options);
```
### Payment Sessions
@@ -505,7 +518,7 @@ The SDK uses a resource builder pattern for nested resources:
| Parent Resource | Nested Resource | Available Methods |
|-----------------|-----------------|-------------------|
| `orders` | `lineItems` | `create`, `update`, `delete` |
-| `orders` | `payments` | `list`, `get` |
+| `orders` | `payments` | `list`, `get`, `create` |
| `orders` | `paymentMethods` | `list` |
| `orders` | `paymentSessions` | `create`, `get`, `update`, `complete` |
| `orders` | `shipments` | `list`, `update` |
@@ -655,6 +668,7 @@ The SDK exports all Store API types:
- `PaginatedResponse<T>` - Paginated API response
- `AuthTokens` - JWT tokens from login
- `AddressParams` - Address input parameters
+- `CreatePaymentParams` - Direct payment creation parameters (for non-session payment methods)
- `CreatePaymentSessionParams` - Payment session creation parameters
- `UpdatePaymentSessionParams` - Payment session update parameters
- `CompletePaymentSessionParams` - Payment session completion parameters
diff --git a/packages/sdk/package.json b/packages/sdk/package.json
index 6302c9d60e..f939493a43 100644
--- a/packages/sdk/package.json
+++ b/packages/sdk/package.json
@@ -1,6 +1,6 @@
{
"name": "@spree/sdk",
- "version": "0.8.1",
+ "version": "0.8.2",
"description": "Official TypeScript SDK for Spree Commerce Store API",
"type": "module",
"main": "./dist/index.cjs",
diff --git a/packages/sdk/src/store-client.ts b/packages/sdk/src/store-client.ts
index 093d4edfea..78a395b334 100644
--- a/packages/sdk/src/store-client.ts
+++ b/packages/sdk/src/store-client.ts
@@ -19,6 +19,7 @@ import type {
AddLineItemParams,
UpdateLineItemParams,
UpdateOrderParams,
+ CreatePaymentParams,
CreatePaymentSessionParams,
UpdatePaymentSessionParams,
CompletePaymentSessionParams,
@@ -479,6 +480,21 @@ export class StoreClient {
`/orders/${orderId}/payments/${paymentId}`,
options
),
+
+ /**
+ * Create a payment for a non-session payment method (e.g. Check, Cash on Delivery, Bank Transfer)
+ * For session-based payment methods (e.g. Stripe, PayPal), use paymentSessions.create() instead
+ */
+ create: (
+ orderId: string,
+ params: CreatePaymentParams,
+ options?: RequestOptions
+ ): Promise<Payment> =>
+ this.request<Payment>(
+ 'POST',
+ `/orders/${orderId}/payments`,
+ { ...options, body: params }
+ ),
},
/**
diff --git a/packages/sdk/src/types/index.ts b/packages/sdk/src/types/index.ts
index aeacfe075d..410c992f07 100644
--- a/packages/sdk/src/types/index.ts
+++ b/packages/sdk/src/types/index.ts
@@ -240,6 +240,13 @@ export interface UpdateOrderParams {
line_items?: LineItemInput[];
}
+// Payments
+export interface CreatePaymentParams {
+ payment_method_id: string;
+ amount?: string;
+ metadata?: Record<string, unknown>;
+}
+
// Payment Sessions
export interface CreatePaymentSessionParams {
payment_method_id: string;
diff --git a/packages/sdk/tests/mocks/handlers.ts b/packages/sdk/tests/mocks/handlers.ts
index a6ad18beef..63c2bfb109 100644
--- a/packages/sdk/tests/mocks/handlers.ts
+++ b/packages/sdk/tests/mocks/handlers.ts
@@ -295,6 +295,24 @@ export const handlers = [
})
),
+ http.post(`${API_PREFIX}/orders/:orderId/payments`, () =>
+ HttpResponse.json({
+ id: 'py_2',
+ payment_method_id: 'pm_2',
+ state: 'checkout',
+ response_code: null,
+ number: 'P5678',
+ amount: '19.99',
+ display_amount: '$19.99',
+ source_type: null,
+ source_id: null,
+ source: null,
+ created_at: '2026-02-17T00:00:00.000Z',
+ updated_at: '2026-02-17T00:00:00.000Z',
+ payment_method: { id: 'pm_2', name: 'Check', description: null, type: 'Spree::PaymentMethod::Check', session_required: false },
+ }, { status: 201 })
+ ),
+
// Payment Methods
http.get(`${API_PREFIX}/orders/:orderId/payment_methods`, () =>
HttpResponse.json({ data: [], meta: paginationMeta })
diff --git a/packages/sdk/tests/payments.test.ts b/packages/sdk/tests/payments.test.ts
index c914d99033..f472580d92 100644
--- a/packages/sdk/tests/payments.test.ts
+++ b/packages/sdk/tests/payments.test.ts
@@ -54,4 +54,39 @@ describe('payments', () => {
expect(result.source!.id).toBe('card_1');
});
});
+
+ describe('create', () => {
+ it('creates a payment for a non-session payment method', async () => {
+ const result = await client.orders.payments.create(
+ 'order_1',
+ { payment_method_id: 'pm_2' },
+ opts
+ );
+ expect(result.id).toBe('py_2');
+ expect(result.state).toBe('checkout');
+ expect(result.payment_method_id).toBe('pm_2');
+ expect(result.source_type).toBeNull();
+ expect(result.source).toBeNull();
+ });
+
+ it('accepts optional amount', async () => {
+ const result = await client.orders.payments.create(
+ 'order_1',
+ { payment_method_id: 'pm_2', amount: '50.00' },
+ opts
+ );
+ expect(result.id).toBe('py_2');
+ });
+
+ it('includes payment_method association', async () => {
+ const result = await client.orders.payments.create(
+ 'order_1',
+ { payment_method_id: 'pm_2' },
+ opts
+ );
+ expect(result.payment_method.id).toBe('pm_2');
+ expect(result.payment_method.name).toBe('Check');
+ expect(result.payment_method.session_required).toBe(false);
+ });
+ });
});
diff --git a/spree/api/app/controllers/spree/api/v3/store/orders/payments_controller.rb b/spree/api/app/controllers/spree/api/v3/store/orders/payments_controller.rb
index 706c741c11..c255cddc2f 100644
--- a/spree/api/app/controllers/spree/api/v3/store/orders/payments_controller.rb
+++ b/spree/api/app/controllers/spree/api/v3/store/orders/payments_controller.rb
@@ -24,6 +24,44 @@ module Spree
render json: serialize_resource(@payment)
end
+ # POST /api/v3/store/orders/:order_id/payments
+ # Creates a payment for non-session payment methods (e.g. Check, Cash on Delivery, Bank Transfer)
+ def create
+ payment_method = current_store.payment_methods.find_by_prefix_id!(params[:payment_method_id])
+
+ if payment_method.session_required?
+ return render_error(
+ code: 'payment_session_required',
+ message: Spree.t('api.v3.payments.session_required'),
+ status: :unprocessable_content
+ )
+ end
+
+ unless payment_method.available_for_order?(@parent)
+ return render_error(
+ code: 'payment_method_unavailable',
+ message: Spree.t('api.v3.payments.method_unavailable'),
+ status: :unprocessable_content
+ )
+ end
+
+ amount = params[:amount].presence || @parent.total_minus_store_credits
+
+ @payment = @parent.payments.build(
+ payment_method: payment_method,
+ amount: amount,
+ metadata: params[:metadata].present? ? params[:metadata].to_unsafe_h : {}
+ )
+
+ authorize!(:update, @parent, order_token)
+
+ if @payment.save
+ render json: serialize_resource(@payment), status: :created
+ else
+ render_errors(@payment.errors)
+ end
+ end
+
private
def set_payment
diff --git a/spree/api/config/locales/en.yml b/spree/api/config/locales/en.yml
index 407b18c51d..0c6ffeaa33 100644
--- a/spree/api/config/locales/en.yml
+++ b/spree/api/config/locales/en.yml
@@ -24,6 +24,10 @@ en:
shipment_transfer_success: Variants successfully transferred
stock_location_required: A stock_location_id parameter must be provided in order to retrieve stock movements.
unauthorized: You are not authorized to perform that action.
+ v3:
+ payments:
+ session_required: This payment method requires a payment session. Use the payment sessions endpoint instead.
+ method_unavailable: This payment method is not available for this order.
v2:
cart:
no_coupon_code: No coupon code provided and the Order doesn't have any coupon code promotions applied
diff --git a/spree/api/config/routes.rb b/spree/api/config/routes.rb
index 3cad4fd8ff..5acf84faa5 100644
--- a/spree/api/config/routes.rb
+++ b/spree/api/config/routes.rb
@@ -51,7 +51,7 @@ Spree::Core::Engine.add_routes do
resource :store_credits, only: [:create, :destroy], controller: 'orders/store_credits'
resources :line_items, only: [:create, :update, :destroy], controller: 'orders/line_items'
resources :coupon_codes, only: [:create, :destroy], controller: 'orders/coupon_codes'
- resources :payments, only: [:index, :show], controller: 'orders/payments'
+ resources :payments, only: [:index, :show, :create], controller: 'orders/payments'
resources :payment_methods, only: [:index], controller: 'orders/payment_methods'
resources :payment_sessions, only: [:create, :show, :update], controller: 'orders/payment_sessions' do
member do
diff --git a/spree/api/spec/controllers/spree/api/v3/store/orders/payments_controller_spec.rb b/spree/api/spec/controllers/spree/api/v3/store/orders/payments_controller_spec.rb
index b6a29f97d2..9cb4f65d51 100644
--- a/spree/api/spec/controllers/spree/api/v3/store/orders/payments_controller_spec.rb
+++ b/spree/api/spec/controllers/spree/api/v3/store/orders/payments_controller_spec.rb
@@ -99,4 +99,76 @@ RSpec.describe Spree::Api::V3::Store::Orders::PaymentsController, type: :control
end
end
end
+
+ describe 'POST #create' do
+ let(:check_payment_method) { create(:check_payment_method, stores: [store]) }
+
+ it 'creates a payment with a non-session payment method' do
+ post :create, params: { order_id: order.to_param, payment_method_id: check_payment_method.prefixed_id }
+
+ expect(response).to have_http_status(:created)
+ expect(json_response['id']).to be_present
+ expect(json_response['state']).to eq('checkout')
+ expect(json_response['payment_method_id']).to eq(check_payment_method.prefixed_id)
+ expect(json_response['amount']).to eq(order.total_minus_store_credits.to_s)
+ end
+
+ it 'creates a payment with a custom amount' do
+ post :create, params: { order_id: order.to_param, payment_method_id: check_payment_method.prefixed_id, amount: '50.00' }
+
+ expect(response).to have_http_status(:created)
+ expect(json_response['amount']).to eq('50.0')
+ end
+
+ it 'creates a payment with metadata' do
+ post :create, params: {
+ order_id: order.to_param,
+ payment_method_id: check_payment_method.prefixed_id,
+ metadata: { purchase_order_number: 'PO-12345' }
+ }
+
+ expect(response).to have_http_status(:created)
+ payment = Spree::Payment.find_by_prefix_id(json_response['id'])
+ expect(payment.metadata['purchase_order_number']).to eq('PO-12345')
+ end
+
+ it 'rejects session-required payment methods' do
+ bogus_method = create(:bogus_payment_method, stores: [store])
+
+ post :create, params: { order_id: order.to_param, payment_method_id: bogus_method.prefixed_id }
+
+ expect(response).to have_http_status(:unprocessable_content)
+ expect(json_response['error']['code']).to eq('payment_session_required')
+ end
+
+ it 'rejects unavailable payment methods' do
+ unavailable_method = create(:check_payment_method, stores: [store])
+ allow_any_instance_of(Spree::PaymentMethod::Check).to receive(:available_for_order?).and_return(false)
+
+ post :create, params: { order_id: order.to_param, payment_method_id: unavailable_method.prefixed_id }
+
+ expect(response).to have_http_status(:unprocessable_content)
+ expect(json_response['error']['code']).to eq('payment_method_unavailable')
+ end
+
+ it 'returns not found for invalid payment method' do
+ post :create, params: { order_id: order.to_param, payment_method_id: 'pm_invalid' }
+
+ expect(response).to have_http_status(:not_found)
+ end
+
+ context 'with order token (guest)' do
+ let(:guest_order) { create(:order_with_line_items, user: nil, store: store, state: 'payment') }
+
+ before { request.headers['Authorization'] = nil }
+
+ it 'creates a payment with valid order token' do
+ request.headers['X-Spree-Order-Token'] = guest_order.token
+ post :create, params: { order_id: guest_order.to_param, payment_method_id: check_payment_method.prefixed_id }
+
+ expect(response).to have_http_status(:created)
+ expect(json_response['payment_method_id']).to eq(check_payment_method.prefixed_id)
+ end
+ end
+ end
end
diff --git a/spree/api/spec/integration/spree/api/v3/store/payments_spec.rb b/spree/api/spec/integration/spree/api/v3/store/payments_spec.rb
index 6f3bd1d3c3..bfe4c32b4c 100644
--- a/spree/api/spec/integration/spree/api/v3/store/payments_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/payments_spec.rb
@@ -56,6 +56,69 @@ RSpec.describe 'Payments API', type: :request, swagger_doc: 'api-reference/store
run_test!
end
end
+
+ post 'Create payment' do
+ let(:check_method) { create(:check_payment_method, stores: [store]) }
+
+ tags 'Checkout'
+ consumes 'application/json'
+ produces 'application/json'
+ security [api_key: [], bearer_auth: []]
+ description 'Creates a payment for a non-session payment method (e.g. Check, Cash on Delivery, Bank Transfer). For payment methods that require a session (e.g. Stripe, PayPal), use the payment sessions endpoint instead.'
+
+ sdk_example <<~JS
+ const payment = await client.orders.payments.create('or_abc123', {
+ payment_method_id: 'pm_abc123',
+ }, {
+ bearerToken: '<token>',
+ })
+ JS
+
+ parameter name: 'x-spree-order-token', in: :header, type: :string, required: false,
+ description: 'Order token for guest access'
+ parameter name: :body, in: :body, schema: {
+ type: :object,
+ properties: {
+ payment_method_id: { type: :string, example: 'pm_abc123', description: 'Payment method ID (must be a non-session payment method)' },
+ amount: { type: :string, example: '99.99', description: 'Payment amount (defaults to order total minus store credits)' },
+ metadata: { type: :object, description: 'Arbitrary metadata to attach to the payment (write-only, not returned in Store API responses)' }
+ },
+ required: %w[payment_method_id]
+ }
+
+ response '201', 'payment created' do
+ let(:'x-spree-api-key') { api_key.token }
+ let(:'Authorization') { "Bearer #{jwt_token}" }
+ let(:body) { { payment_method_id: check_method.prefixed_id } }
+
+ schema '$ref' => '#/components/schemas/Payment'
+
+ run_test! do |response|
+ data = JSON.parse(response.body)
+ expect(data['state']).to eq('checkout')
+ expect(data['payment_method_id']).to eq(check_method.prefixed_id)
+ end
+ end
+
+ response '422', 'session-based payment method' do
+ let(:'x-spree-api-key') { api_key.token }
+ let(:'Authorization') { "Bearer #{jwt_token}" }
+ let(:body) { { payment_method_id: payment_method.prefixed_id } }
+
+ schema '$ref' => '#/components/schemas/ErrorResponse'
+ run_test!
+ end
+
+ response '404', 'order not found' do
+ let(:'x-spree-api-key') { api_key.token }
+ let(:'Authorization') { "Bearer #{jwt_token}" }
+ let(:order_id) { 'invalid' }
+ let(:body) { { payment_method_id: check_method.prefixed_id } }
+
+ schema '$ref' => '#/components/schemas/ErrorResponse'
+ run_test!
+ end
+ end
end
path '/api/v3/store/orders/{order_id}/payments/{id}' do