Cancel a credit
Cancel (void) a credit. A canceled credit keeps its record and history and still appears in
this API, but its status becomes CANCELED and its remaining balance can no longer be applied
to invoices. The response returns the credit with its updated status.
By default the credit's existing applications to invoices (its credit uses) are left in place.
Set should_delete_credit_uses to true to also remove those applications, returning the used
amounts to the affected invoices and payments.
Overpayment credits (created from an invoice overpayment or a QuickBooks Online payment) cannot
be canceled — void the associated payment instead, which returns an error here. Canceling an
already-canceled credit returns an error, unless should_delete_credit_uses is true: that
removes the applications an earlier cancel left in place, and keeps the credit's original
canceled_at.
If your account syncs credits with QuickBooks Online, the cancellation is pushed to QuickBooks Online in the background; a 200 confirms the cancel in Distru, not that the QuickBooks Online side has finished. Credits do not touch inventory or state compliance (Metrc / BioTrack).
Required permission: credits_permissions_edit. The authenticated user must also have access to
the credit under their team restrictions, otherwise the request returns 403.
BearerAuthorizationBearer <token>API token generated in Distru (Settings → Distru API). Send it on every request as Authorization: Bearer YOUR_API_TOKEN.
id*stringThe credit's ID (as returned in the id field of a credit).
Cancel options (optional body)
application/json- body
Options for canceling a credit
should_delete_credit_uses?booleanWhen true, also removes this credit's existing applications to invoices (its credit uses), returning the used amounts to the affected invoices and payments. When false or omitted, those applications are left in place and only the remaining balance is voided. Defaults to false.
The canceled credit
*/*- response
A single credit wrapped in a data envelope
data?Store credit held by a customer that can be applied toward what they owe. Credits can be issued manually or generated automatically (for example from a return or an invoice overpayment).
curl -X POST 'https://app.distru.com/public/v1/credits/17d132a5-0ba2-41d6-84e5-7255880501f8/cancel' \ -H 'Content-Type: application/json' \ -d '{ "should_delete_credit_uses": false}'{ "data": { "amount": "100", "brand": null, "canceled_datetime": "2026-10-13T15:03:27.656145Z", "company": { "id": "00000000-0000-0000-0000-0000000000ed", "name": "Company 754", "updated_datetime": "2026-10-13T15:03:27.486810Z" }, "creator": { "banned": false, "deleted_at": null, "email": "[email protected]", "full_name": "FirstName2226 LastName2227", "id": "00000000-0000-0000-0000-00000000045b", "inserted_datetime": "2026-10-13T15:03:27.491302Z", "role": { "id": "00000000-0000-0000-0000-00000000047e", "name": "Admin 1149" }, "updated_datetime": "2026-10-13T15:03:27.491302Z" }, "credit_number": "CRT-00000005", "credit_uses": [ { "amount": "40", "credit": { "amount": "100", "credit_number": "CRT-00000005", "id": "a27cd203-ce57-462a-83a3-e64108bdf014", "source": "USER" }, "id": "ecbaadf4-2a67-4633-8582-a07cedfc9c9e", "inserted_datetime": "2026-10-13T15:03:27.502449Z", "payment": null } ], "deleted_in_qbo": false, "external_note": "External note", "id": "a27cd203-ce57-462a-83a3-e64108bdf014", "inserted_datetime": "2026-10-13T15:03:27.494963Z", "internal_note": "Internal note", "original_amount": "100", "owner": null, "payment": null, "qb_credit_memo_id": null, "qb_payment_id": null, "qb_sync_status": null, "remaining_balance": "60", "return": null, "source": "USER", "status": "CANCELED", "updated_datetime": "2026-10-13T15:03:27.656156Z" }}