Cancel it before it settles
A void or a reversal keeps the payment out of the batch, so the money never leaves the customer's account.
Your answers so far
Choose one
What to build
Send the cancel the transaction offers: a Void or a Reversal, on the operations endpoint. The platform normally offers one of the two for a given transaction, depending on the merchant's processor. Both change the original transaction rather than creating a new one, and the response confirms the operation was applied, not just queued.
What this means for PCI
This is guidance rather than a compliance determination. Which questionnaire you are eligible for depends on your full environment, so confirm it with your QSA or your acquirer before you rely on it.
Worth knowing
- Confirm the operation is in the transaction's allowedActions list before you send it. The processor, its reversal window, and the merchant's own settings all change that list, and none of them is visible from your side.
- A batch can close between your read and your request. The refusal is a 409 with OPERATION_NOT_ALLOWED_IN_STATE, and it carries the current allowed actions, so read them off the error and send one of those.
- A reversal sends a message to the processor, so it can be refused. Read the transaction back when you need the processor's own answer.