Crypto Payment State Machine
Pronunciation: KRIP-toh PAY-muhnt STAYT muh-SHEEN
Also known as: Cryptocurrency Payment State Machine
Definition
A crypto payment state machine is a model that defines which states a payment can occupy and which events permit movement between them.
Overview
What it means
A crypto payment state machine is a model that defines which states a payment can occupy and which events permit movement between them. It prevents contradictory outcomes such as an expired invoice suddenly being treated as paid without a rule.
How it works
An implementation might separate created, awaiting payment, detected, confirming, paid, expired, refunded and exception states. It defines valid transitions and their evidence, guards against duplicate and out-of-order events, and stores every transition with an event ID and timestamp. Network observations and business acceptance may use separate state layers.
Understanding the technical details
The first design decision is which states belong to the blockchain observation layer and which belong to the commercial order layer. An included transaction might coexist with an expired invoice; that is not a contradiction if the model represents both dimensions. Use events with explicit guards, and never let an older callback blindly reduce the recorded payment state. A state diagram and transition test suite should include partial payments, retries, refunds and reorganization recovery.
Common failures and limitations
No single state graph is correct for every processor; refunds, partial payments and reorgs differ. A state machine must preserve historical evidence and support idempotent reprocessing. Presentation labels should not replace the underlying rules.
Related concepts
Payment Retry, Crypto Payment Status, Payment Finality Threshold.
Further reading
Example
An invoice changes from awaiting_payment to detected when a transfer appears, then to paid after the configured confirmations. A late transfer after expiry triggers an exception transition rather than simply overwriting expired with paid.
Comparison
A state is a stored condition; a state transition is an allowed change triggered by evidence. A transaction status describes blockchain activity, while the payment state may include business requirements.
Key Takeaway
No single state graph is correct for every processor; refunds, partial payments and reorgs differ.
Sources
- Payment Status Table — OxaPay (2026-08-02)
- Webhook — OxaPay (2026-08-02)
- Payment Information — OxaPay (2026-08-02)