Endpoint
Overview
Cancel an active number rental and refund the credits charged for it to your balance. A rental can only be cancelled while it is still active — once a verification code has been received, it can no longer be cancelled.Request Body
The transaction ID returned by Rent Number.
Response
true when the rental was cancelled and the charge refunded.Errors
| Status | Error | Meaning |
|---|---|---|
| 400 | Transaction ID is missing | No transaction_id provided |
| 400 | Transaction already cancelled | The rental was already cancelled |
| 400 | Can't cancel a transaction that received a code | A code was already delivered |
| 404 | Transaction not found | Unknown transaction (or it belongs to another account) |
| 502 | Service temporarily unavailable | Upstream failure — retry |