post
https://{store}/api/rest/sales2/creditmemo/writeoff
Writes off part or all of a credit memo's unused credit without canceling the memo. The amount goes into the memo's written_off_amount and comes off its available credit. The memo's grand_total stays the amount it was issued for.
No email is sent. Undo it with Reverse Write-Off.
Body
| Field | Type | Default | Description |
|---|---|---|---|
increment_id | string | none | Required. Credit memo increment id |
reason | string | none | Required. Kept in the memo's history |
base_amount | number | everything left | Amount to write off, in base currency. Above 0 and at most the credit the memo has not applied, refunded or held for a checkout in progress. Leave it out to write off all of that credit |
Rules
- A memo with no credit left to write off is refused.
- A memo that is open for editing in the admin is refused:
400 This Credit Memo is currently locked and cannot be edited. - A memo already synced to QuickBooks or NetSuite is changed there first. If that system refuses the change, nothing is saved and its reason comes back as a
400. - With a staff user's token, the user's role must allow writing off credit memo balances; otherwise the call answers
403 You do not have permission to write off credit memo balances.
Response
| Field | Description |
|---|---|
success | true |
written_off | The amount written off by this call, in base currency |
creditmemo | The memo's full payload after the write-off |
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
