Skip to main content
Migo Docs

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 URL but 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.

EnvironmentHost
Sandboxhttps://sb-mw.migopayments.com
Productionhttps://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 stateResultResponse shape
CREATED, USED (unpaid link)Moves to DISMISSED, no upstream call200 OK (plain text OK)
APPROVED, DENIED, EXPIRED, DISMISSEDRejected (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​

HTTPerror.codeCause
4005000Missing transactionId
4042000Transaction not found
4094020Transaction 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.