Appearance
List payment methods available to a headless storefront
GET
/rest/v1/checkout/payment-methods
Returns the payways the merchant SELECTED for external frontends — the METHODS.PAYWAY_EXTERNAL list saved in Settings → Payments (#672) — intersected with the adapters PaymentInitializerFactory actually registers on this deployment (#673). Both conditions are required: a gateway whose Registry credentials are configured but which the merchant did not select is OMITTED, and a selected payway with no registered adapter is omitted too. The offline adapters (delivery, bank_transfer, paid_at_store) are NOT exempt — they are filtered by the same selection. paymentMethods[] is returned in the merchant's saved order, not the adapter registration order, so a client may render it as-is. FAIL-CLOSED: when the key is unset or empty the list is EMPTY — it does not fall back to METHODS.PAYWAY (the rendered storefront's list) and it does not mean "unfiltered". POST /rest/checkout/place-order enforces the same list and refuses anything outside it with a 422 (error.code = payway_not_available), so this endpoint is the authoritative source for a payment-method picker.
HOW TO PRESENT EACH ONE (kind, #732) — branch on this, not on a table of keys: offline = nothing to pay online, the order is complete at placement (PENDING_ACCEPTED); bank_code = the order is UNPAID at placement and the customer pays later with the bank code returned with the order (paybybank) — never show it as paid; redirect = send the customer to paymentRedirect.url from place-order: navigate when redirectMethod is GET, auto-submit a form POSTing paymentRedirect.params when it is POST; embedded = keep the customer on the page: render paymentRedirect.url in an iframe, or load it as the gateway's JavaScript SDK with params; widget = an in-page widget first, after which place-order may answer with a redirect or complete in place. The list of kinds is OPEN-ENDED: a value is never redefined, new ones may be added, and a client should treat an unknown kind as "cannot be presented here" and skip it. redirectMethod is GET or POST for redirect and null otherwise. requiresRedirect is kept for existing clients and is DERIVED: true exactly for redirect, embedded and widget. label is an English fallback name; localise by key.
Responses
List of available payment methods
application/json
JSON "paymentMethods": [ { "key": "eurobank", "label": "Card (Eurobank)", "kind": "redirect", "redirectMethod": "string", "requiresRedirect": true } ]
{
}