Skip to content

Payment states

CodeNameDescriptionTerminal
NRNot ReadyOrder created without input_currency assigned.No
PEPendingWaiting for the customer to pay.No
ACAwaiting CompletionPayment received, waiting for blockchain confirmation. Check safe.No
IAInsufficient AmountReceived amount lower than expected.Yes
COCompletedPayment successful, confirmed on-chain. Release the product.Yes
CMCompleted by MerchantCompleted manually by the merchant.Yes
CACancelledExpired after more than 24h without payment.Yes
EXExpiredNo receipt within 15 or 60 minutes depending on the network.Yes
OCOut of ConditionPrice moved unfavorably; received amount does not cover the expected value.Yes
FAFailedTransaction unconfirmed or rejected.Yes
DEDeletedOrder deleted.Yes

When an order is in AC, the boolean safe field indicates whether the payment has one blockchain confirmation and it is safe to release the product/service.

  • safe: false → still in mempool / 0 confirmations. Do not release.
  • safe: true → payment is stable, release it.
stateDiagram-v2
[*] --> NR: orden creada sin input_currency
[*] --> PE: orden creada con input_currency
NR --> PE: cliente elige moneda
PE --> AC: se detecta pago en mempool
PE --> EX: timeout sin recepción (15/60 min)
PE --> CA: expiración >24h
AC --> CO: confirmación blockchain
AC --> OC: importe menor que esperado
AC --> IA: importe insuficiente
AC --> FA: fallo de confirmación
CO --> [*]
CA --> [*]
EX --> [*]
OC --> [*]
IA --> [*]
FA --> [*]
DE --> [*]
CM --> [*]

B4bit Pay exposes 11 granular states, but most merchants only need ≤4. Recommended mapping:

B4bit Pay stateMerchant state
NR · PE · AC(safe=false)Pending
CO · AC(safe=true) · CMProcessing (or Paid)
CA · EXCancelled
FA · OC · IAFailed
DEDeleted
  • EX (Expired): triggers after 15 or 60 minutes without receipt, depending on the currency and network.
  • CA (Cancelled): after 24 hours without payment.

Every state change emits a webhook, except IA (insufficient amount), which is sometimes coalesced with the next change. If you need to react to IA, poll GET /orders/info/{identifier} or assume the next webhook carries the final state.

See webhook and webhook-ordering.