Invoice Payment
An Invoice Payment is one payment made on an invoice. An invoice can have several: one per part payment or installment. A payment is backed by a PaymentIntent when the customer paid online, or by a payment record when the merchant recorded money received outside XPay, such as cash or a cheque. Money returned from a payment is shown in amountRefunded and documented by a credit note; the payment's status stays paid.
An Invoice Payment is one payment made on an invoice. An invoice can have several: one per part payment or installment. A payment is backed by a PaymentIntent when the customer paid online, or by a payment record when the merchant recorded money received outside XPay, such as cash or a cheque. Money returned from a payment is shown in amountRefunded and documented by a credit note; the payment's status stays paid.
{ "id": "inpay_3Nf8a2kLmPq9", "object": "invoice_payment", "invoiceId": "string", "status": "open", "amountRequested": -9007199254740991, "amountPaid": -9007199254740991, "amountRefunded": -9007199254740991, "currency": "EGP", "payment": { "type": "payment_intent", "paymentIntentId": "string", "checkoutSessionId": "string", "paymentRecord": { "method": "cash", "reference": "string", "note": "string" } }, "statusTransitions": { "paidAt": "string", "canceledAt": "string" }, "installmentId": "string", "receiptNumber": "string", "receiptUrl": "string", "merchantId": "string", "createdAt": "string", "updatedAt": "string"}Discount
A Discount records a single application of a Coupon to a specific Checkout Session, PaymentIntent, or Customer. Where a Coupon is the reusable template, a Discount captures the concrete redemption: which Coupon was applied, when it became active, when it expires, and (when applicable) which Promotion Code the customer entered to claim it.
Invoice
An Invoice is a statement of what a customer owes, with a page where they can pay it. An invoice starts as a draft you can edit freely. Finalizing it assigns its number, freezes its amounts and the customer's details, and makes it payable. A finalized invoice is never edited: correct it with a credit note, or revise it, which replaces it with a new invoice. An invoice can take several payments, online or recorded by you, and is paid when nothing remains.