Idempotency Supported
Try in API ExplorerRefunds online payments or online refundable credit notes applied to an invoice.
If multiple transactions or credit note allocations are associated with the invoice, the refund can be processed only for one transaction or allocation at a time. The refund amount is returned to the customer through the payment_source associated with the transaction.
For recording offline refunds, including those for linked_taxes_withheld, use the Record refund for an invoice API.
Prerequisites & Constraints
- The invoice must have a refundable amount derived from online transactions. The refundable amount = (the total amount paid on the invoice via online payments) + (allocations on the invoice from refundable credit notes that were created from online payments) - (any amount already refunded from the invoice)
- There must be no
linked_paymentswith a status ofin-progress. - Partial refunds can be processed only if the associated payment gateway supports partial refund operations.
- Ensure that all parameter-level requirements are met.
Impacts
Invoice
- The invoice status does not change after this operation.
Credit note
- A refundable credit note is created for the invoice to capture the refund details.
Implementation Notes
Before calling this API, ensure the following:
- The invoice must have a refundable amount derived from online transactions.
The refundable amount is calculated as:
linked_payments[].amountfor online payments +applied_credits[].applied_amount-issued_credit_notes[].cn_total - There must be no
linked_paymentswith a status ofin-progress. - All parameter-level requirements are met.
Related APIs
Record refund for an invoice
Sample Request
URL Format
POST https://[site].chargebee.com/api/v2/invoices/{invoice-id}/refund
Input Parameters
optional, in cents, min=1
The amount to be refunded.
Constraints
- If multiple transactions or credit note allocations are associated with the invoice, the refund can be processed only for one transaction or allocation at a time.
- Offline refunds, including those for
linked_taxes_withheld, cannot be refunded via this operation. Use the Record refund for an invoice API instead.
Default behavior
- If not specified, the total refundable amount for this invoice derived from online transactions is implied. The refundable amount is calculated as: (the total amount paid on the invoice via online payments) + (allocations on the invoice from refundable credit notes that were created from online payments) - (any amount already refunded from the invoice).
optional, string, max chars=2000
The Customer Notes to be filled in the Credit Notes created to capture this refund detail.
Returns
invoiceInvoice object
Resource object representing invoice
transactionTransaction object
Resource object representing transaction
credit_noteCredit note object
Resource object representing credit_note