Dismiss transaction
When you create a Payment Link (POST /transactions) and the end customer never pays β abandons the webview, closes the tab, or the payment intent expires β the transaction stays alive in an unpaid state. Dismiss it to close it out explicitly instead of leaving it dangling: it stops being payable and your reconciliation reflects the real outcome.
It is the same endpoint the direct payment API uses in its dismiss step.
POST https://mw.migopayments.com/api/v1/integrations/transactions/{transactionId}/dismiss (Production)
POST https://sb-mw.migopayments.com/api/v1/integrations/transactions/{transactionId}/dismiss (Sandbox)
See the entry in the live spec: POST /api/v1/integrations/transactions/{transactionId}/dismiss.
When to dismissβ
- The customer opened the Payment Link
URLbut closed the webview without completing payment. - The Payment Link reached its own TTL without being paid.
- The merchant-side order was cancelled before the customer paid.
Authentication and hostsβ
Authenticate with your merchant token in the Authorization header (raw token; a Bearer prefix is tolerated and stripped), the same as when creating a Payment Link.
| Environment | Host |
|---|---|
| Sandbox | https://sb-mw.migopayments.com |
| Production | https://mw.migopayments.com |
Requestβ
Use the uid you received when creating the transaction as {transactionId}.
curl -X POST https://sb-mw.migopayments.com/api/v1/integrations/transactions/RULbsGlJRAWFCi6TkuTEa/dismiss \
-H 'Authorization: <merchant-token>' \
-H 'Content-Type: application/json' \
-d '{ "reason": "user_cancelled" }'
The body is optional and its keys are not validated β send free-form metadata for audit purposes.
Behavior matrixβ
| Current state | Result | Response shape |
|---|---|---|
CREATED, USED (unpaid link) | Moves to DISMISSED, no upstream call | 200 OK (plain text OK) |
APPROVED, DENIED, EXPIRED, DISMISSED | Rejected (ineligible state) | 409 con error.code 4020 |
Dismiss is idempotent for unpaid states (CREATED, USED β DISMISSED). For alternative-payment-rail transactions that go through IN_PROGRESS and rely on a processor cancellation hook, see the full matrix in Dismiss transaction (alternative payments).
Errorsβ
| HTTP | error.code | Cause |
|---|---|---|
| 400 | 5000 | Missing transactionId |
| 404 | 2000 | Transaction not found |
| 409 | 4020 | Transaction state is not eligible for dismiss (APPROVED, DENIED, EXPIRED, DISMISSED) |
See the Error catalog for the full description of each ownCode and its retry semantics.
Receiving the resultβ
A dismiss does not trigger a charge, so it does not produce a terminal payment state. The result of paid Payment Links is delivered to your backend through the Merchant Generic Callback.
Relatedβ
- Create a Payment Link β the transaction creation step.
- Direct payment API (PCI required) β direct charge with card data, which also uses this dismiss.
- Voids & refunds β for transactions that have already been paid.
- Dismiss transaction (alternative payments) β the same endpoint for alternative rails, with the
IN_PROGRESSmatrix.