Skip to main content

Get Payment Access

Retrieves the store's default payment access settings: which payment methods guest, B2C and B2B buyers can use at checkout, and the order in which payment methods are shown.

HTTP Request​

  • URL: /paymentAccess
  • Method: GET
  • Headers:
    • accessToken: Required. Your API access token.
  • Required scope: READ_PAYMENT or READ_WRITE_PAYMENT

cURL Example​

curl --location '<BASE_URL>/paymentAccess' \
--header 'accessToken: <ACCESS_TOKEN>'

Response​

  • 200 OK: The payment access settings were returned successfully.
  • 401 Unauthorized: The access token is missing or invalid.
  • 403 Forbidden: The access token does not have the required scope.
  • 400 Bad Request: The request could not be completed.

Sample JSON Response​

{
"success": true,
"data": {
"guest": {
"mode": "selected",
"methods": [
{ "method": "67644189a909f37370551d41", "types": ["card", "apple_pay", "google_pay"] }
]
},
"b2c": {
"mode": "inherit",
"methods": []
},
"b2b": {
"mode": "selected",
"methods": [
{ "method": "67644189a909f37370551d41", "types": [] },
{ "method": "67644189a909f37370551d44", "types": [] }
]
},
"methodOrder": ["67644189a909f37370551d44", "67644189a909f37370551d41"]
}
}

Response Details​

Payment Access Data​

FieldTypeDescription
guestObjectSettings for shoppers who are not signed in. See below.
b2cObjectSettings for signed-in customers who do not belong to a company.
b2bObjectSettings for customers who belong to a company.
methodOrderArrayPayment method IDs in the order they are shown at checkout.

Access Object​

FieldTypeDescription
modeStringinherit (no restriction at this level) or selected (only the listed methods are allowed).
methodsArrayAllowed payment methods when mode is selected. See below.

Method Object​

FieldTypeDescription
methodStringPayment method ID. See Get All Payment Methods.
typesArrayPayment types allowed for this method, for example card or us_bank_account. An empty list allows all types.

How Payment Access Works​

At checkout, the store decides which payment methods a buyer can use by checking these levels in order. The first level set to selected is used:

  1. The customer (set paymentAccess with Update Customer).
  2. The customer's company (set paymentAccess with Update Company).
  3. The company's group (set paymentAccess with Update Company Group).
  4. The store default for the buyer's type (guest, b2c or b2b), returned by this endpoint.

If every level is set to inherit, all active payment methods are available. Payment rules can then hide methods, add a fee or rename methods based on the order.

Notes​

  • Payment methods not listed in methodOrder are shown after the listed ones.