Delete match

DEL https://api.invunion.com/api/v1/matches/:id matches:write Idempotency-Key Markdown

Delete a match that does not settle its invoice.

Permanently deletes a match that is pending_review, rejected, or cancelled. This is a delete, not a cancellation: to cancel a payment, use Reverse match. Deleting a rejected row lets matching suggest that pair again. A match.cancelled webhook is emitted. The path is the match UUID from List matches, not from the product.

An active or confirmed match is a payment and cannot be deleted: the call returns 409. Use Reverse match, which keeps the row as cancelled with who, when, and why, and tells integrations. To undo an auto-match from the transaction code alone, use Reconcile transaction unlink_all.

See also

  • Matches . Which call to use for each change.
  • List matches (GET/api/v1/matches). Get the UUID by invoice number and transaction code.
  • Reverse match (POST/api/v1/matches/:id/reverse). Reverse a payment instead of deleting it.
  • Reconcile transaction (POST/api/v1/transactions/:code/reconcile). Cancel live matches on a bank line without a match UUID.

Path parameters

NameTypeRequired
id

Match UUID.

Example: 1c9e6679-7425-40de-944b-e07fc1f90ae7

string

No maximum

Required

Errors

This operation can return the following errors in addition to generic HTTP failures.

Error HTTP code Description
Missing Bearer token 401 The Authorization header is missing or is not a Bearer token.
Invalid or revoked API key 401 The API key is unknown, malformed, expired, or has been revoked.
API key is missing scope matches:write 403 The key does not include matches:write. A write scope does not imply the matching read scope.
Too many requests, please try again later 429 More than 100 requests in one minute from this API key or IP address. Wait for the Retry-After header (seconds) and retry.
Match not found 404 No match with this UUID exists in the authenticated tenant.
This match settles its invoice. Reverse it with POST /matches/:id/reverse so the reversal is kept and integrations are told. 409 The match is active or confirmed. Use Reverse match.
Internal server error 500 Unexpected server error. The JSON body includes correlationId. Retry with backoff.
Idempotency-Key must be 8-255 characters: letters, digits, ".", "_", ":" or "-". 400 The Idempotency-Key header is present but malformed.
A request with this Idempotency-Key is still being processed. 409 The first request with this key has not finished. Retry after it completes. code is idempotency_in_progress.
This Idempotency-Key was already used with a different request body. 422 Send a new key for a different request. code is idempotency_key_reuse.