Skip to main content
Migo Docs

Dismiss transaction

Cancel an alternative-payment transaction the customer abandoned, or one whose payment intent expired. Idempotent for unpaid states (CREATED, USED β†’ DISMISSED); for IN_PROGRESS transactions Migo runs the processor's cancel hook when the processor supports one β€” resolving to CANCELLED for processors that run a dedicated cancel hook, or to DISMISSED for processors that support a generic upstream cancel call.

POST https://mw.migopayments.com/api/v1/integrations/transactions/{transactionId}/dismiss

See the live spec entry: POST /api/v1/integrations/transactions/{transactionId}/dismiss.

When to dismiss​

  • Customer closed the merchant tab without paying.
  • The QR / payment button rendered for /payments hit its own TTL.
  • Order on the merchant side was cancelled before the customer paid.
  • A long-running IN_PROGRESS push payment must be force-cancelled and the processor supports an upstream cancel.

Request​

curl -X POST https://mw.migopayments.com/api/v1/integrations/transactions/trx_8f3c2b1d9e7a/dismiss \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{ "reason": "user_cancelled" }'

The body is optional and its keys are not validated β€” supply free-form metadata for audit purposes.

Behaviour matrix​

Current statusOutcomeResponse shape
CREATED, USEDSet to DISMISSED, no upstream call200 OK (plain text OK)
IN_PROGRESS (processor with a dedicated cancel hook)Set to CANCELLED, processor cancel hook executedJSON { message, transaction: { uid, status: "CANCELLED" } }
IN_PROGRESS (processor with a generic upstream cancel)Set to DISMISSED, upstream cancel call executed200 OK (plain text OK)
IN_PROGRESS (processor lacks any cancel hook)Rejected405 ownCode 4021
APPROVED, DENIED, EXPIRED, DISMISSEDRejected (ineligible status)409 ownCode 4020

Errors​

HTTPownCodeCause
4005000Missing transactionId
4042000Transaction not found
4054021Processor does not allow dismiss (no cancel hook) for an IN_PROGRESS transaction
4094020Transaction status not eligible for dismiss (APPROVED, DENIED, EXPIRED, DISMISSED)
500β€”Processor configuration missing or upstream cancel call failed