Customer Balance Transaction
A Customer Balance Transaction is one change to a customer's balance. The balance always equals the sum of its transactions. A negative balance is credit, used up by the customer's next invoice.
A Customer Balance Transaction is one change to a customer's balance. The balance always equals the sum of its transactions. A negative balance is credit, used up by the customer's next invoice.
{ "id": "cbtxn_3Nf8a2kLmPq9", "object": "customer_balance_transaction", "type": "adjustment", "amount": -9007199254740991, "endingBalance": -9007199254740991, "currency": "EGP", "invoiceId": "string", "creditNoteId": "string", "description": "string", "customerId": "string", "merchantId": "string", "createdAt": "string"}Credit Note
A Credit Note lowers the amount of an issued invoice without changing the invoice itself. It first reduces what the customer still owes (prePaymentAmount). Anything beyond that was already paid (postPaymentAmount) and goes back to the customer by a refund, as customer credit, or outside XPay. Refunding a payment of an invoice directly also writes its credit note.
Customer
A Customer represents a buyer you do business with. Use Customers to save payment methods for reuse, track lifetime spend, attach metadata for your CRM, and group related Charges, Refunds, and Checkout Sessions under a single record. Give a Customer your own ID as `externalId` and pass it as `externalCustomerId` on later checkout sessions, so you never need to store the XPay customer ID.