A payment gateway configuration connects Kontorion to an external payment processor (Stripe, GoCardless, or other providers) for collecting payments from customers.
Each organization can have multiple gateway configurations - for example, Stripe for card payments and GoCardless for SEPA direct debits. One gateway is marked as the default.
Key concepts:
- Provider - the payment processor (
stripe,gocardless, etc.) - Mode -
liveortest- determines whether real charges are made - Supported currencies - which currencies this gateway can process
- Supported methods - which payment methods this gateway handles (card, direct_debit, etc.)
List payment gateways
Returns all payment gateway configurations for the organization. Sensitive config fields are masked. Requires the gateway.read permission.
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
List payment gateways › Responses
OK
Create a payment gateway configuration
Requires the gateway.manage permission: the row holds the org's live provider secret.
Headers
Idempotency-KeyUnique key that makes this POST safe to retry: repeats with the same key replay the first response instead of re-executing. Replays are scoped to the retrying principal (same API key / user) and kept for 24 hours. Required on every POST.
Client-generated idempotency key (e.g. a UUID).
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Create a payment gateway configuration › Request Body
Provider-specific credential document. Stripe: api_key (required), stripe_account_id, webhook_secret, api_base. GoCardless: access_token, webhook_secret. PATCH merges shallowly - send only the keys to change; omitted keys keep their stored value (so a masked read never needs to be resent).
display_namemodeprovidersupported_currenciessupported_methodsCreate a payment gateway configuration › Responses
Created
Get a payment gateway configuration
Returns one gateway configuration by ID. Sensitive config fields are masked. Requires the gateway.read permission.
path Parameters
idGateway config UUID
Gateway config UUID
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Get a payment gateway configuration › Responses
OK
Delete a payment gateway configuration
Requires the gateway.manage permission: the row holds the org's live provider secret.
path Parameters
idGateway config UUID
Gateway config UUID
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Delete a payment gateway configuration › Responses
No Content
Update a payment gateway configuration
Requires the gateway.manage permission: the row holds the org's live provider secret.
path Parameters
idGateway config UUID
Gateway config UUID
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Update a payment gateway configuration › Request Body
Provider-specific credential document. Stripe: api_key (required), stripe_account_id, webhook_secret, api_base. GoCardless: access_token, webhook_secret. PATCH merges shallowly - send only the keys to change; omitted keys keep their stored value (so a masked read never needs to be resent).
display_nameis_defaultis_enabledmodesupported_currenciessupported_methodsUpdate a payment gateway configuration › Responses
OK