List payment methods
const url = 'https://apibase.ecomweb.app/api/v1/public/stores/example/payment-methods';const options = {method: 'GET', headers: {'x-storefront-api-key': '<x-storefront-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://apibase.ecomweb.app/api/v1/public/stores/example/payment-methods \ --header 'x-storefront-api-key: <x-storefront-api-key>'Returns the payment methods the store accepts, in the order the merchant set. Show them at checkout and send the chosen method’s payment_method code when placing the order. A method with a provider_code is paid through a gateway: after the order exists, start the payment with that code. The bank transfer method also carries the merchant’s active bank accounts and a transfer instruction to show once the order exists.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The store’s ref, as returned by GET /stores.
Responses
Section titled “Responses”object
Bank transfer only: the accounts the shopper can transfer to.
object
Bank account ID.
The merchant’s label for the account.
The bank’s code.
The bank’s name.
The account number to transfer to.
The name the account is held under.
The text a banking app turns into a payment QR code, or null when none is set.
Whether the account is currently offered to shoppers.
When the account was added, as an ISO 8601 timestamp, or null.
When the account last changed, as an ISO 8601 timestamp, or null.
Always null: removed accounts are not listed.
Bank transfer only: how to fill in the transfer, to show once the order exists.
Payment method ID.
The method’s code, such as cod or bank_transfer. Send it as payment_method when placing an order.
The gateway to pass to the payment initiation route, or null when the method is not paid through a gateway.
The name to show the shopper.
A description to show while the shopper chooses, or null.
Always true: only enabled methods are listed.
Position in the list, lowest first.
Example generated
[ { "bank_accounts": [ { "id": 1, "label": "example", "bank_code": "example", "bank_name": "example", "account_number": "example", "account_holder": "example", "qr_payload": "example", "is_active": true, "created_at": "example", "updated_at": "example", "deleted_at": "example" } ], "transfer_instruction": "example", "id": 1, "payment_method": "example", "provider_code": "example", "display_name": "example", "description": "example", "is_enabled": true, "sort_order": 1 }]The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}