Skip to content

List payment methods

GET
/public/stores/{storeRef}/payment-methods
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.

storeRef
required
string

The store’s ref, as returned by GET /stores.

Media typeapplication/json
Array<object>
object
bank_accounts

Bank transfer only: the accounts the shopper can transfer to.

Array<object>
object
id
required

Bank account ID.

number
label
required

The merchant’s label for the account.

string
bank_code
required

The bank’s code.

string
bank_name
required

The bank’s name.

string
account_number
required

The account number to transfer to.

string
account_holder
required

The name the account is held under.

string
qr_payload

The text a banking app turns into a payment QR code, or null when none is set.

string
nullable
is_active
required

Whether the account is currently offered to shoppers.

boolean
created_at

When the account was added, as an ISO 8601 timestamp, or null.

string
nullable
updated_at

When the account last changed, as an ISO 8601 timestamp, or null.

string
nullable
deleted_at

Always null: removed accounts are not listed.

string
nullable
transfer_instruction

Bank transfer only: how to fill in the transfer, to show once the order exists.

string
nullable
id
required

Payment method ID.

number
payment_method
required

The method’s code, such as cod or bank_transfer. Send it as payment_method when placing an order.

string
provider_code
required

The gateway to pass to the payment initiation route, or null when the method is not paid through a gateway.

string
nullable
display_name
required

The name to show the shopper.

string
description
required

A description to show while the shopper chooses, or null.

string
nullable
is_enabled
required

Always true: only enabled methods are listed.

boolean
sort_order
required

Position in the list, lowest first.

number

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.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

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.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}