> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.clixpesa.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.clixpesa.com/_mcp/server.

# Transaction lifecycle

Onramps and offramps cross payment providers, Clixpesa, and blockchain networks. Treat the initial HTTP
response as acceptance of work, not final settlement.

| Status       | Meaning                                                                        | Integration behavior                                                   |
| ------------ | ------------------------------------------------------------------------------ | ---------------------------------------------------------------------- |
| `pending`    | The transaction exists but needs another action, such as an on-chain transfer. | Display the returned instructions and retain the transaction ID.       |
| `processing` | The provider or blockchain settlement is in progress.                          | Poll status at a measured interval and show a non-final state.         |
| `complete`   | Settlement succeeded.                                                          | Display success and retain the transaction hash or provider reference. |
| `failed`     | Settlement or provider processing failed.                                      | Stop automatic polling and present a recoverable error path.           |
| `cancelled`  | The transaction was cancelled.                                                 | Treat it as final unless Clixpesa support instructs otherwise.         |

## Onramp sequence

1. Your application sends `POST /onramp` with an idempotency key.
2. Clixpesa creates the transaction and initiates fiat collection.
3. The API returns `processing` with customer-facing instructions.
4. Provider and blockchain processing continue asynchronously.
5. Your application checks `POST /onramp/status` until it reaches a final state.

## Offramp sequence

When `POST /offramp` does not include `transaction_hash`, the response is `pending` and contains the
address and network to which the customer should transfer the asset. After the transfer is submitted,
send its hash to `POST /offramp/update`; the payout then moves to `processing`.

> **Tip**
>
> Store Clixpesa transaction IDs separately from blockchain hashes. The transaction ID exists before an
> on-chain settlement hash is available.