heruAPI
Point of sale

Void a charge

LiveServed by the v1 API in development with the same checks as production; production opens on the same contract. The capabilities from before v1 keep running in production at the path your account team gives you.

POST
/charges/{id}/void

Use it when the card payment is reversed before the customer invoices: a wrong amount, a refund or a bank reversal. The charge becomes void, its link stops working and it never goes into the global invoice. If the customer already invoiced it, cancel the invoice instead; this answers 409. A charge that expired or was already voided answers 410.

Needs the charges:void scope.

Authorization

oauth2 charges:void
headerAuthorizationBearer <token>

OAuth 2.0 client credentials. Exchange your client_id and client_secret at /oauth/token of the environment for a bearer token valid for one hour. The playground of every operation asks for your own client and keeps it in your browser tab only.

Scope: charges:void

Path parameters

id*string

The charge id.

Match^chg_[0-7][0-9a-hjkmnp-tv-z]{25}$

Header parameters

Idempotency-Key*string

Unique per operation. Retrying with the same key returns the original result for 24 hours.

Lengthlength <= 255

Request body

application/json
  1. body
reason?string

Why the payment was undone. It shows in your reports.

Value in"wrong_amount""refund""reversal""duplicate"

Response body

The charge is void.

application/json
  1. response
id*string

The charge in this API: use it to get or void it.

Match^chg_[0-7][0-9a-hjkmnp-tv-z]{25}$
external_id*string

Your transaction id, as you sent it. Webhooks carry it so you can match them to your records.

status*string

open while the customer can invoice it; invoiced once they did; expired when expires_at passed unused; void after POST /charges/{id}/void; included_in_global when an expired charge went into the merchant's global invoice.

Value in"open""invoiced""expired""void""included_in_global"
merchant_id*string

The merchant that made the sale.

Match^mer_[0-7][0-9a-hjkmnp-tv-z]{25}$
amount*string

Total charged to the card, VAT included.

Match^[0-9]+\.[0-9]{2}$
payment_form*string

SAT c_FormaPago: 04 credit card, 28 debit card.

Value in"04""28"
occurred_at*string

When the card payment was approved.

Formatdate-time
location?|

external_id of the merchant's location, if you sent it.

items*array<>

What the invoice will say. If you sent no items, it holds the merchant's default_item for the whole amount.

invoice_token*|

Code inside invoice_url. Use it only if you build the link yourself, for example on your own domain. It is not the charge id. Null once the charge is no longer open.

invoice_url*|

Link the customer opens to invoice this charge: https://invoice.heru.app/{merchant slug}/c/{invoice_token}. It works once and until expires_at. Null once the charge is no longer open.

qr*|

QR with invoice_url. Null once the charge is no longer open.

expires_at*string

Last moment the customer can invoice the charge.

Formatdate-time
invoice*|

The CFDI the customer issued. Null until status is invoiced. Download its files with GET /invoices/{id}/download.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
curl -X POST 'https://api.dev.b2b.heru.app/v1/charges/chg_01m4p7sbvpev1s5086cty36rvs/void' \  -H 'Idempotency-Key: try-it-0001' \  -H 'Content-Type: application/json' \  -d '{  "reason": "wrong_amount"}'
{  "id": "chg_01m4p7ne2nejtbv6n6b53xttxm",  "external_id": "TXN-0001845121",  "status": "void",  "merchant_id": "mer_01m4ra8wsyfh3s0tr4nrq3y96j",  "amount": "520.00",  "payment_form": "28",  "occurred_at": "2026-10-11T13:40:01-06:00",  "location": "SUC-01",  "items": [    {      "product_code": "90101500",      "description": "Consumo de alimentos y bebidas",      "amount": "520.00",      "quantity": 1,      "unit_code": "E48",      "vat_rate": "0.16"    }  ],  "invoice_token": null,  "invoice_url": null,  "qr": null,  "expires_at": "2026-11-10T23:59:59-06:00",  "invoice": null,  "created_at": "2026-10-11T19:40:02.517Z",  "updated_at": "2026-10-11T19:41:15.157Z"}
© 2026 Kuarto Inc. (heru)heru.appQuestions about your integration? Contact your heru account team.