OUTCOME · Create or advance
What changes
Records CANCELLED and cancels an eligible linked OPEN payment request. It does not reverse payment, refund value, cancel a fulfilled order, return inventory, or settle a wallet.
v2Merchant commerce
/api/v2/commerce/invoices/{invoice_uuid}/cancellationsPURPOSE + BUSINESS CONTEXT
WHEN THIS CALL IS USEFUL
Cancel one exact unpaid OPEN or PAYMENT_PENDING invoice after reconciling the latest invoice version and linked Payments V2 request.
OUTCOME · Create or advance
Records CANCELLED and cancels an eligible linked OPEN payment request. It does not reverse payment, refund value, cancel a fulfilled order, return inventory, or settle a wallet.
WHY IT MATTERS
ISOLATION + AUTHORITY
Tenant, workspace, merchant, product, customer, invoice, checkout, collection wallet, payment, custody, treasury settlement, tax or compliance policy, and finality remain distinct. Merchant configuration or invoice state cannot authorize wallet signing, move funds, prove settlement, or grant publisher, matching, or trading authority.
BEFORE YOU CALL
WHAT TO DO NEXT
AGENT GUIDANCE
The exact deployed parameters, schemas, responses, security requirements, and Hybrid-Chain agent metadata are authoritative at this operation's production OpenAPI JSON Pointer. The readable tables below add integration guidance; the deployed OpenAPI controls if guidance and the machine contract ever differ.
Open the authoritative production contract ↗EXTENDED INTEGRATION GUIDANCE
Examples illustrate integration intent; the referenced OpenAPI operation and component schemas define the executable shape.
PARAMETERS
AuthorizationheaderRequiredBearer tokenCredential containing commerce:write authority.EXAMPLEBearer hc_live_…
invoice_uuidpathRequiredidentifierStable invoice uuid selecting the exact resource addressed by this route.EXAMPLEinvoice-uuid-01
Idempotency-KeyheaderRequiredASCII string · 1–128Caller-generated stable key reused for retries of the same logical mutation.EXAMPLEpost-api-v2-commerce-invoices-invoice-uuid-cancellations-request-001
X-Request-IDheaderOptionalstringOptional caller correlation identifier. The gateway emits the effective value on the response.
Content-DigestheaderRequiredstringRFC 9530 sha-256 digest of the exact transmitted request-body bytes.
Signature-InputheaderRequiredstringRFC 9421 sig1 input covering @method, @path, content-digest, content-type, and idempotency-key, with created, expires, nonce, keyid, and alg=ed25519.
SignatureheaderRequiredstringRFC 9421 sig1 Ed25519 signature made by an active key registered to the bearer client.
expected_invoice_versionbodyRequiredinteger · ≥1Current invoice version used for optimistic concurrency.Schema range: 0 to unboundedEXAMPLE5
expected_statusbodyRequiredDRAFT | OPEN | PAYMENT_PENDINGLast merchant-visible status. Any authoritative final payment evidence makes cancellation ineligible.EXAMPLEOPEN
reason_codebodyRequiredMERCHANT_CANCELLED | CUSTOMER_REQUEST | ORDER_UNAVAILABLE | COMPLIANCE_HOLDStructured cancellation reason retained with invoice and checkout evidence.EXAMPLEMERCHANT_CANCELLED
reason_detailbodyOptionalstring · 8–500 · nullableOptional non-secret explanation without payment credentials or regulated customer evidence.Explicit null acceptedEXAMPLEThe underlying order is no longer available.
step_up_tokenbodyRequiredpurpose-bound tokenFresh COMMERCE_INVOICE_CANCELLATION authorization bound to invoice version and reason.EXAMPLEhcsu_…
REQUEST
{
"expected_invoice_version": 0,
"expected_status": "example-expected-status",
"reason_code": "example-reason-code",
"reason_detail": "example-reason-detail",
"step_up_token": "example-step-up-token"
}RESPONSES
{}{
"code": "invalid_credentials",
"message": "the supplied Hybrid credential is invalid"
}invalid_credentials{
"code": "invalid_credentials",
"message": "the supplied Hybrid credential is invalid"
}invalid_credentials{
"code": "invalid_credentials",
"message": "the supplied Hybrid credential is invalid"
}invalid_credentials{
"code": "invalid_credentials",
"message": "the supplied Hybrid credential is invalid"
}invalid_credentialsOPERATIONAL NOTES
This route is implemented in canonical gateway source and appears in the production OpenAPI snapshot observed 2026-09-11T06:35:11.572Z. Authentication, tenant, feature, venue, and market policy still apply.
Verify the exact production OpenAPI operation ↗Return to the V2 directory ↗