Remove an applied credit

Removes one applied credit. Its credit transaction is voided, every invoice it paid reopens for that amount, and the credit returns to the credit memos it was drawn from.

The credit is named by the increment id of its credit transaction, not by a credit memo number: credit_transaction.increment_id in the Apply to an invoice answer.

Body

FieldTypeDescription
credit_increment_idstringRequired. Increment id of the credit transaction to remove
reasonstringRequired. Kept in the history

Rules

  • A credit that is no longer applied, or that was not applied from a credit memo, is refused with a 400.
  • An unknown credit_increment_id answers 404.
  • On a store synced to QuickBooks or NetSuite the removal is sent there first. If that system refuses it, nothing is saved and its reason comes back as a 400.
  • With a staff user's token, the user's role must allow removing credit; otherwise the call answers 403 You do not have permission to remove credit.

Response

FieldDescription
credit_transaction{ id, increment_id } of the credit transaction removed
bills[]{ bill_id, increment_id, amount_removed, remaining_to_pay } for each invoice it had paid
creditmemos[]{ creditmemo_id, increment_id, amount_returned, remaining_credit, state } for each credit memo the credit went back to. state is the state's name, e.g. Unapplied
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
string
Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json