Payment settings
The payment setting object and the allowed CRUD operations on the related resource endpoint
Payment settings are the gateway configuration objects in Commerce Layer's Payments API. Each payment setting represents a specific payment provider configuration — Adyen, Braintree, Checkout.com, PayPal, Stripe, gift card, manual, or external — and controls how payment sessions are created and processed.
Payment settings are polymorphic. The concrete type can be one of the following subtypes:
payment_setting_adyens
Adyen gateway configuration.
payment_setting_braintrees
Braintree gateway configuration.
payment_setting_checkout_coms
Checkout.com gateway configuration.
payment_setting_paypals
PayPal gateway configuration.
payment_setting_stripes
Stripe gateway configuration.
payment_setting_gift_cards
Commerce Layer gift card payments.
payment_setting_manuals
Manual payment processing.
payment_setting_externals
Custom external gateway configuration.
Versioning
Payment settings carry two independent versioning concepts: the gateway version, which controls the external API version used to talk to the payment provider, and the internal versions, a read-only field that tracks Commerce Layer's own internal payload-building logic.
Gateway version
The gateway_version attribute controls which version of the external payment provider's API Commerce Layer uses when processing transactions for that setting. It's only meaningful — and only settable — for the payment types listed below. It's always null for every other type. That's because Checkout.com and PayPal's SDK clients pin no API version of their own, and manual, gift card, and external payment settings never talk to a versioned external API at all.
payment_setting_adyens
70, 71, 72
72
payment_setting_braintrees
2019-01-01
2019-01-01
payment_setting_stripes
2019-05-16, 2025-11-17.clover
2025-11-17.clover
Internal versions
The internal_versions attribute is a read-only, Commerce-Layer-internal field — it is not the same thing as gateway_version and isn't something you configure. It records which internal payload-building logic is pinned for each action on that specific payment setting, for example:
Each key is the name of a specific payload/action (e.g. payment_intent, setup_intent, session, capture), scoped to how that one action is built — not a single version for the whole gateway. This lets Commerce Layer evolve how a request is built for new settings without changing behavior for existing ones, and lets a version pinned for one action (e.g. capture) differ from the version used for another (e.g. refund) on that same setting.
Whether a payment setting supports internal versioning at all is exposed via the read-only internal_versionable boolean:
falsefor Checkout.com, gift card, and manual payment settings.truefor Adyen, Braintree, PayPal, Stripe, and external payment settings.
Per-request overrides
Using internal versions lets you pin a default for the setting as a whole, but individual payment resources — payment sessions, payment wallets, payment links, and payment transactions — can override it for a single request via that resource's own _internal_version trigger attribute, without changing the setting's default for every other request. For example, to pin the LineItemSku payload variant for an Adyen payment authorization, send:
The value must always be one of the versions already available for that specific resource's own action — Commerce Layer validates it against the same set of built-in payload variants exposed via internal_versions, scoped to the resource's own family (e.g. a payment session can only request session-family versions, not one meant for a payment wallet). An unsupported value is rejected with a 422 Unprocessable Entity error.
Automation flags
All payment settings expose the following top-level boolean attributes:
auto_capture— whentrue, a capture is created automatically as soon as the authorization succeeds, without requiring a separate API call.auto_place— whentrue, the associated order is placed automatically when the payment session transitions toauthorized, without requiring a separate_placecall.
Idempotency window
The idempotency_window_mins attribute controls how long an open payment transaction keeps absorbing identical repeats. A transaction created within that many minutes of a matching open one inherits its idempotency key, so the gateway deduplicates the two. Past the window, a repeat gets a fresh key and reaches the provider as its own operation.
Payment rules
Payment rules are market-level rules that affect payment settings in two ways: some rules make specific settings available for a given order only when their conditions are met, while others can block placement if the payment coverage doesn't meet a configured threshold.
Status
Every payment setting has a read-only status attribute that tells whether Commerce Layer can receive the gateway's webhook events for it:
pending
The gateway webhook isn't configured yet. The setting can't be used for payments.
active
The gateway webhook is configured. The setting can be used for payments.
Braintree, gift card, manual, and external payment settings don't rely on a webhook provisioned by Commerce Layer, so they're active as soon as they're created. Adyen, Checkout.com, PayPal, and Stripe payment settings become active once their webhook is configured. Once active, a payment setting never goes back to the pending status.
A pending payment setting is excluded from the available_payment_settings relationship on orders, and creating a payment link or a payment wallet against it is rejected with a 422 Unprocessable Entity error.
Webhook provisioning
When an Adyen, Checkout.com, PayPal, or Stripe payment setting is created, Commerce Layer tries to configure the gateway webhook automatically, using the credentials you provided. If the gateway rejects the request — e.g. because the API credentials lack the necessary permissions — the payment setting is still created, but stays in the pending status.
To bring a pending payment setting to the active status, you can:
Fix the credentials — updating them on a pending payment setting automatically triggers a new provisioning attempt.
Retry without changing anything, by sending a
PATCHrequest with the_provision_webhooktrigger attribute set totrue. If the gateway rejects the request again, the error is returned with a422 Unprocessable Entitystatus code.Configure the webhook manually on the gateway side and set the related credential attribute — only supported by Adyen.
Enabling and disabling
Payment settings can be enabled or disabled. Disabled settings are excluded from the available_payment_settings relationship on orders and cannot be used for new sessions or wallets. Use the _disable and _enable trigger attributes to toggle the state.
Connectivity check
Payment settings expose a _check_client trigger attribute that tests the connection to the underlying payment provider using the stored credentials. On success, the setting's configuration is verified without creating any real transactions.
Last updated