docs

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"}