ChargebeeAPI

Record refund for a credit note

Idempotency Supported
Try in API Explorer

Records a refund for a refundable credit note.

This API does not process an actual refund for online payments by returning money to customers.

Use this API to record refunds processed outside Chargebee (for example, directly through a payment gateway or via offline methods such as bank transfers or checks) so you can reconcile them in Chargebee.

To process refunds via Chargebee for online payments and automatically return money to customers, use the Refund a credit note API instead.

Prerequisites & Constraints

  • The credit note type must be refundable.
  • The credit note status must be refund_due.

Impacts

Transactions

Chargebee records the refunds by creating transactions of type refund and links them to the credit note. The refund transactions are recorded in the following order:

  1. linked_payments of the invoice associated with the credit note. This is recorded as linked_refunds[] in the credit note.
  2. linked_taxes_withheld (if available). This is recorded as linked_tax_withheld_refunds[] in the credit note.

Implementation Notes

Before using this API, ensure:

  • The credit note type is refundable.
  • The credit note status is refund_due.
  • If reason codes are mandatory in Chargebee Billing, include the refund_reason_code parameter with a value from the configured list of codes.

Sample Request

URL Format

POST https://[site].chargebee.com/api/v2/credit_notes/{credit-note-id}/record_refund

Input Parameters

refund_reason_code
optional, string, max chars=100

Reason code for the refund. Must be one from a list of reason codes set in the Chargebee app in Settings > Configure Chargebee > Reason Codes > Credit Notes > Refund Credit Note. Must be passed if set as mandatory in the app. The codes are case-sensitive.

comment
optional, string, max chars=300

Remarks, if any, on the refund.

transaction[0..n]
Parameters for transaction
pass parameters as transaction[<param name>]

Returns

credit_noteCredit note object
Resource object representing credit_note
transactionTransaction object
Resource object representing transaction