ChargebeeAPI

Record an invoice payment

Idempotency Supported
Try in API Explorer

Records an offline payment for an invoice.

Use this API to record payments that you receive outside Chargebee, such as bank transfers or checks, so that you can reconcile them against invoices.

Prerequisites & Constraints

  • The invoice status must be payment_due, posted, or not_paid.

Impacts

Invoice

  • The amount_due on the invoice decreases by transaction[amount] when the transaction[status] is success.
  • The invoice status changes to paid if the amount_due on the invoice becomes zero because of this payment. Otherwise, the status remains unchanged.

Customer

If the recorded payment exceeds the invoice's amount_due, the excess is added to the customer's excess_payments balance.

Implementation Notes

Before calling this API, ensure the following:

  • The invoice status must be payment_due, posted, or not_paid.

Sample Request

URL Format

POST https://[site].chargebee.com/api/v2/invoices/{invoice-id}/record_payment

Input Parameters

comment
optional, string, max chars=300

Remarks, if any, on the payment.

transaction
optional, in cents

Parameters for transaction

Returns

invoiceInvoice object

Resource object representing invoice

transactionTransaction object

Resource object representing transaction