Update Payment Access
Updates the store's default payment access for one or more buyer types, and optionally the order in which payment methods are shown at checkout. Buyer types you do not send keep their current settings.
HTTP Request
- URL:
/paymentAccess - Method:
PUT - Headers:
accessToken: Required. Your API access token.Content-Type:application/json
- Required scope:
READ_WRITE_PAYMENT
Request Body
Send at least one of the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
guest | Object | No | Settings for shoppers who are not signed in. See below. |
b2c | Object | No | Settings for signed-in customers without a company. |
b2b | Object | No | Settings for customers who belong to a company. |
methodOrder | Array | No | Payment method IDs in the order they should be shown. Replaces the current order. |
Access Object
| Field | Type | Required | Description |
|---|---|---|---|
mode | String | Yes | inherit (no restriction) or selected (only the listed methods). |
methods | Array | No | Allowed payment methods when mode is selected. See below. |
Method Object
| Field | Type | Required | Description |
|---|---|---|---|
method | String | Yes | Payment method ID. See Get All Payment Methods. |
types | Array | No | Payment types to allow, for example card. Use lowercase letters and underscores. Leave empty to allow all types. |
The same access object can be sent as paymentAccess when you create or update a customer, company or company group.
cURL Example
curl --location --request PUT '<BASE_URL>/paymentAccess' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"guest": {
"mode": "selected",
"methods": [
{ "method": "67644189a909f37370551d41", "types": ["card", "apple_pay", "google_pay"] }
]
},
"b2b": {
"mode": "selected",
"methods": [
{ "method": "67644189a909f37370551d41" },
{ "method": "67644189a909f37370551d44" }
]
},
"methodOrder": ["67644189a909f37370551d44", "67644189a909f37370551d41"]
}'
Response
- 200 OK: The payment access settings were updated 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 body is empty or a field is not valid.
Sample JSON Response
{
"success": true,
"message": "Payment access updated successfully",
"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
| Field | Type | Description |
|---|---|---|
success | Boolean | Whether the request was successful. |
message | String | Confirmation message. |
data | Object | All payment access settings after the update. See Get Payment Access. |
Notes
- When
modeisinherit, themethodslist is cleared. - See How Payment Access Works for how these defaults combine with customer, company and company group settings.