QBitFlow Documentation

    Complete guide to integrating cryptocurrency payments with QBitFlow

    Transaction Statuses

    Understanding transaction statuses is crucial for properly handling payments and subscriptions in your application.

    Status Values

    Transactions go through various states during their lifecycle. Here are all possible transaction statuses:

    created

    Initial

    The transaction has been created and acknowledged by the backend. It's being prepared to be sent to the blockchain.

    waitingConfirmation

    In Progress

    The transaction has been sent to the blockchain and is waiting for confirmations. This is a normal state during blockchain processing.

    pending

    In Progress

    The transaction is pending additional processing or actions. Continue monitoring until status changes.

    completed

    Final

    The transaction has been successfully completed and confirmed on the blockchain. This is a final, successful state.

    failed

    Final

    The transaction has failed. This could be due to insufficient funds, network issues, or other errors. This is a final state.

    expired

    Final

    The transaction couldn't be processed within the time limit and has expired. A new transaction needs to be created.

    cancelled

    Final

    An error occurred and the transaction was cancelled. It was not processed successfully.

    Transaction Types

    Transaction statuses apply to different types of transactions:

    payment

    One-time payment transaction

    createSubscription

    Creating a new subscription

    cancelSubscription

    Cancelling an existing subscription

    executeSubscription

    Executing a subscription billing cycle

    createPAYGSubscription

    Creating a pay-as-you-go subscription

    cancelPAYGSubscription

    Cancelling a PAYG subscription

    increaseAllowance

    Increasing subscription allowance

    updateMaxAmount

    Updating subscription max amount

    Checking Transaction Status

    Get Transaction Status
    Query the current status of any transaction
    # Check status of a one-time payment
    status = client.transaction_status.get(
    transaction_uuid="transaction-uuid",
    transaction_type=TransactionType.ONE_TIME_PAYMENT
    )
    print(f"Type: {status.type.value}")
    print(f"Status: {status.status.value}")
    # Handle different statuses
    # ... your business logic here ...

    💡 Best Practice: In your webhook and success URL handlers, always check the transaction status and handle each state appropriately. Final states (completed, failed, expired, cancelled) won't change, but in-progress states (created, waitingConfirmation, pending) may transition to final states.