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
/paymentshit its own TTL. - Order on the merchant side was cancelled before the customer paid.
- A long-running
IN_PROGRESSpush 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 status | Outcome | Response shape |
|---|---|---|
CREATED, USED | Set to DISMISSED, no upstream call | 200 OK (plain text OK) |
IN_PROGRESS (processor with a dedicated cancel hook) | Set to CANCELLED, processor cancel hook executed | JSON { message, transaction: { uid, status: "CANCELLED" } } |
IN_PROGRESS (processor with a generic upstream cancel) | Set to DISMISSED, upstream cancel call executed | 200 OK (plain text OK) |
IN_PROGRESS (processor lacks any cancel hook) | Rejected | 405 ownCode 4021 |
APPROVED, DENIED, EXPIRED, DISMISSED | Rejected (ineligible status) | 409 ownCode 4020 |
Errorsβ
| HTTP | ownCode | Cause |
|---|---|---|
| 400 | 5000 | Missing transactionId |
| 404 | 2000 | Transaction not found |
| 405 | 4021 | Processor does not allow dismiss (no cancel hook) for an IN_PROGRESS transaction |
| 409 | 4020 | Transaction status not eligible for dismiss (APPROVED, DENIED, EXPIRED, DISMISSED) |
| 500 | β | Processor configuration missing or upstream cancel call failed |