Skip to main content
POST
Create payment_allocations

Authorizations

Authorization
string
header
required

API key from Developers → API Keys, sent as Authorization: Bearer .

Headers

Idempotency-Key
string

Any unique string (≤255 chars). A retry with the same key within 24 hours replays the original response (Idempotent-Replayed: true) instead of creating a second record.

Maximum string length: 255

Body

application/json
patient_id
integer
required

The invoice's owner — the invoice lookup is scoped to it, and a mismatch is a 404. Not necessarily the payer: the payment may be another patient's.

Required range: x >= 1
invoice_id
integer
required

The invoice being paid down. Must not be void, and the amount can't exceed what it still has outstanding (409).

Required range: x >= 1
payment_id
integer
required

The payment being spent. It need not belong to the invoice's patient — one patient's payment can settle another's invoice (family accounts), and both balances refresh.

Required range: x >= 1
amount
string
required

How much of the payment lands on the invoice: positive, 2 dp. Capped at both the invoice's outstanding balance and the payment's unspent remainder, under a row lock.

Pattern: ^-?\d+(\.\d{1,2})?$
Example:

"45.00"

metadata
object

Integrator-owned key/value metadata (max 50 keys). Values are strings (≤500 chars), numbers or booleans and read back with the type they were written with. On write, a null value removes the key. Filter with metadata[key]=op:value; number operands compare numerically.

Response

The resource

data
object
Example: