Cancelling an order
When you can cancel, what you get back, and why an order can't be cancelled once a message has arrived.
- Last updated
- Updated
- Reading time
- 1 min read
On this page3
You can cancel an order while it's waiting — the number is assigned and no SMS has arrived yet. Cancelling refunds the full price straight away.
How
- In the web app: open the order in the console and cancel it.
- With the API:
POST /api/v1/orders/{id}/cancel.
Cancelling is safe to retry. Cancelling an order that's already cancelled returns it unchanged, and the refund only ever happens once.
When you can't cancel
| Status | Why |
|---|---|
pending |
The number is still being assigned. Try again in a moment. |
received or completed |
A message already arrived, so the number did its job. |
expired or failed |
It was already refunded automatically. |
The API answers these with invalid_state (HTTP 409) and a message saying which case applies.
Note
We check for a just-arrived message before cancelling. If the SMS lands a moment before you cancel, the order becomes received and can't be cancelled — but your code is waiting for you instead.
Cancel, or wait it out?
If a service hasn't sent its code after a few minutes, cancelling and ordering in another country is usually faster than waiting for the full 20 minutes. Either way, you get your money back.