Archive a credit
Credits and commits
Archive a credit
Archive a contract-level or customer-level credit. Use this endpoint to deactivate a credit while preserving historical records. You will not be able to archive a credit until all of the finalized invoices the credit has been applied to are voided.
Example workflow: The customer was granted a free credit erroneously. It was applied to their most recent finalized invoice.
- First, void the finalized invoice that the credit was applied to.
- Then, use the archiveCredit endpoint to deactivate the credit.
- Finally, regenerate the voided invoice. The invoice will be regenerated without the application of the credit, which has now been archived.
Usage guidelines:
- Once a credit has been archived, it will no longer appear by default on the endpoints
listCustomerCreditsorlistCustomerBalances. Use theinclude_archivedparameter to choose to fetch the details. - Once a credit has been archived, it has a null ledger and 0 remaining balance.
- Archiving a credit fully deactivates the entire access schedule. If you want to reduce the amount granted in a credit, consider editing the access schedule using the
editCreditendpoint, or adding a manual ledger entry using theaddManualBalanceLedgerEntryendpoint.
POST
Archive a credit
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Customer ID and Credit ID to archive
Response
Success