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_PAYMENTorREAD_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
| Field | Type | Description |
|---|---|---|
guest | Object | Settings for shoppers who are not signed in. See below. |
b2c | Object | Settings for signed-in customers who do not belong to a company. |
b2b | Object | Settings for customers who belong to a company. |
methodOrder | Array | Payment method IDs in the order they are shown at checkout. |
Access Object
| Field | Type | Description |
|---|---|---|
mode | String | inherit (no restriction at this level) or selected (only the listed methods are allowed). |
methods | Array | Allowed payment methods when mode is selected. See below. |
Method Object
| Field | Type | Description |
|---|---|---|
method | String | Payment method ID. See Get All Payment Methods. |
types | Array | Payment 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:
- The customer (set
paymentAccesswith Update Customer). - The customer's company (set
paymentAccesswith Update Company). - The company's group (set
paymentAccesswith Update Company Group). - The store default for the buyer's type (
guest,b2corb2b), 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
methodOrderare shown after the listed ones.