v49

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-081445491.8 MB
Customer

Create customer balance transaction

Creates an immutable balance transaction that updates the customer's balance and returns back the newly created transaction.

post/customers/{customer_id}/balance_transactions

Path parameters

customer_idstring required

Request body

amountstring required
type'increment' | 'decrement' required
descriptionstring nullable

An optional description that can be specified around this entry.

Response

OK

idstring required

A unique id for this transaction.

created_atstring date-time required

The creation time of this transaction.

starting_balancestring required

The original value of the customer's balance prior to the transaction, in the customer's currency.

ending_balancestring required

The new value of the customer's balance prior to the transaction, in the customer's currency.

amountstring required

The value of the amount changed in the transaction.

action'applied_to_invoice' | 'manual_adjustment' | 'prorated_refund' | 'revert_prorated_refund' | 'return_from_voiding' | 'credit_note_applied' | 'credit_note_voided' | 'overpayment_refund' | 'external_payment' | 'small_invoice_carryover' required
descriptionstring nullable required

An optional description provided for manual customer balance adjustments.

type'increment' | 'decrement' required

Example response

{
  "id": "cgZa3SXcsPTVyC4Y",
  "created_at": "2022-05-01T07:01:31+00:00",
  "starting_balance": "33.00",
  "ending_balance": "22.00",
  "amount": "11.00",
  "description": "An optional description",
  "invoice": {
    "id": "gXcsPTVyC4YZa3Sc"
  }
}