Returns a list of available payment methods for this checkout.
JavaScript
const options = {method: 'GET', headers: {'X-Spree-Order-Token': '<api-key>'}}; fetch('https://demo.spreecommerce.org/api/v2/storefront/checkout/payment_methods', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
{ "data": [ { "id": "1", "type": "payment_method", "attributes": { "type": "Spree::Gateway::Bogus", "name": "Credit Card", "description": "Bogus payment gateway.", "preferences": { "dummy_key": "PUBLICKEY123" } } }, { "id": "2", "type": "payment_method", "attributes": { "type": "Spree::PaymentMethod::Check", "name": "Check", "description": "Pay by check.", "preferences": {} } } ] }
Order token to authorize Cart and Checkout requests.
How to obtain X-Spree-Order-Token
200 Success - Returns an array of payment_method objects.
payment_method
Show child attributes
Was this page helpful?