Record a payment and apply it, or update the one with the same externalId in the channel

method and amount (a magnitude; type refund for money out). order and/or invoice by { id } or { externalId } in the channel. application (default auto) applies what fits: the named invoice, the order's open invoices oldest first, then the order; manual applies the listed invoice amounts exactly. Never applies beyond the payment or beyond an invoice balance (422 totals_mismatch with requested and available). onDuplicate (default update): outcome unchanged when nothing differs. Unknown fields are refused (400).

Scope: payments:write, channel:write or admin. A permission group made before the Channel API scopes existed grants it as payments:manage.

Idempotency: send Idempotency-Key; a retry with the same key replays the first answer.

Rate limit: write class, 1,200 requests per minute per tenant by default (read class 6,000). Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; a refusal is 429 rate_limited with Retry-After.

Body Params
string
^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9a-fA-F]{24})$

Sales channel id: a uuid, or a legacy 24-hex id.

string
length between 1 and 255

The integration's own id for the document, unique within its channel.

string
length between 1 and 100

The channel's payment number: the payment's displayId.

string
length between 1 and 500
date-time

ISO-8601, UTC.

enum
enum
required
required
length ≤ 24
^[0-9]{1,14}(\.[0-9]{1,8})?$

A non-negative decimal amount in currency units ("12.50"); numbers are accepted.

string
length between 3 and 3

ISO 4217; default the order currency.

order
object
invoice
object
string
length between 1 and 255

The provider's transaction or charge id (stored as external_transaction_id).

string
length ≤ 10000
metadata
object

Keys 1 to 100 characters, values up to 1000.

application
object
enum

What a POST does when the document already exists. Default 'update' (D7).

enum

externally (default): recorded from a channel. internally: created by Kentro; a service caller only (403 forbidden otherwise).

Headers
string
length between 7 and 50

Any string of 7 to 50 characters that identifies this request (an order number, a webhook id). A retry with the same key and the same body answers the first result with Idempotent-Replayed: true; the same key with a different body is 422 idempotency_key_reused; a concurrent request with the same key is 409 in_progress with Retry-After. Recommended on every write.

Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json