Skip to navigation

Transaction lifecycle

Keep application state aligned with asynchronous payment and blockchain settlement
View as Markdown

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

StatusMeaningIntegration behavior
pendingThe transaction exists but needs another action, such as an on-chain transfer.Display the returned instructions and retain the transaction ID.
processingThe provider or blockchain settlement is in progress.Poll status at a measured interval and show a non-final state.
completeSettlement succeeded.Display success and retain the transaction hash or provider reference.
failedSettlement or provider processing failed.Stop automatic polling and present a recoverable error path.
cancelledThe 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.

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