Skip to main content
POST
Create Balance Transaction

Authorizations

Authorization
string
header
required

Service (M2M) access token issued by POST /auth/token using the client_credentials grant. Required scopes, where known, are listed on each operation below.

Headers

Idempotency-Key
string

Deduplicates retried requests with the same key and parameters (about a 24-hour window), except a clawback retried after it succeeded, which can return 400. Printable ASCII with no trailing whitespace. Keep it short (a UUID works): the key is scoped to the customer before it reaches the payment provider, and a key too long once scoped is a 400. Without a key a retry is not deduplicated and grants the credit twice, so send one on every request.

Path Parameters

provider_customer_id
string
required

Provider customer ID. Must belong to your own configuration.

Body

application/json
amount
integer
required

Non-zero, in the smallest unit of currency. Negative grants credit (at least -10000); positive claws credit back (at most the remaining credit).

currency
string
required

ISO currency code; lowercased server-side. For a clawback it must match the customer's currency (400 on a mismatch, or when the customer has no currency yet). For a credit, use the customer's currency.

description
string
required

Why the credit is granted or taken back. Trimmed; 1–350 characters.

metadata
object

Free-form string key/value pairs stored on the transaction.

Response

Success.

data
object