Skip to main content
WEBHOOK

When it’s sent

  • Always sent right after a NEW_BALANCE_INVOICE, with the payment that added the money to the patient’s balance. Use invoice_id to link the two.
The request type is NEW_BALANCE_PAYMENT. See the introduction to subscribe to this event and verify the X-Hub-Signature-256 signature.
The payload has the same fields as New payment.

Headers

X-Hub-Signature-256
string

HMAC SHA-256 of the raw request body, keyed with your Verify Token, as sha256=<hex>. Sent only when a Verify Token is set.

Example:

"sha256=3f1c5e…"

Body

application/json

Sent with every balance invoice: the payment that added the money to the patient's balance.

version
enum<string>
required

Payload version.

Available options:
v1.0
Example:

"v1.0"

type
enum<string>
required

Event type.

Available options:
NEW_BALANCE_PAYMENT
Example:

"NEW_BALANCE_PAYMENT"

id
string

Payment ID.

Example:

"ckx1y0000001"

amount
number

Amount paid.

Example:

575

payment_type
enum<string>

Payment method.

Available options:
CARD,
CASH,
BALANCE,
INSURANCE,
CHEQUE,
VOUCHER,
BANK_TRANSFER,
MOBILE_WALLET,
BANK,
SAFE,
OTHER
Example:

"CASH"

payment_sub_type
string | null

Payment sub-type (e.g. card brand or wallet name).

Example:

null

invoice_id
string

Balance invoice ID (matches the id of the related NEW_BALANCE_INVOICE).

Example:

"ckx1i0000002"

treasury_id
string | null

Treasury the money was received into.

Example:

"ckx1t0000001"

patient_id
string | null

Patient ID.

Example:

"ckx1p0000001"

bound_type
enum<string>

Always outbound.

Available options:
outbound
Example:

"outbound"

Response

200

Return any 2xx status within 5 seconds to acknowledge the event. Failed deliveries are not retried.