CSQ Docs
    CSQ Docs
    CSQ API Doc
    • CSQ API Doc
    • Dummy Product Usage Guide
    • Prepaid
    • Recharge
    • Get Parameters
      GET
    • Get Products
      GET
    • Purchase
      POST

    Recharge

    ⚡ Top-up Operation#

    Performs a balance top-up to the specified MSISDN (mobile number) or account. When available, it returns:
    The original transaction reference (authorization code) from the operator
    The top-up amount in the operator's original currency

    🎯 Behavior and Result Handling#

    The top-up operation will return a result code of 10 only if the request was successfully forwarded to the provider.
    ➡️ As a result, CSQ will only charge the user's account if the returned result code is 10.

    🔄 Recharge Flow (Recommended)#

    This is the recommended flow for performing a prepaid recharge. It ensures that all required parameters and product details are retrieved before initiating the purchase.
    1
    1. Get Parameters
    Retrieve the operator configuration and required fields.
    Endpoint: GET /pre-paid/recharge/parameters/{terminalId}/{operatorId}
    Reveals if the operator uses dynamic products (dynamic: true)
    Lists required inputs like account, documentNumber, receiverEmail, etc.
    2
    2. Get Products (if dynamic)
    Fetch available dynamic products for the account. Only needed if dynamic: true.
    Endpoint: GET /pre-paid/recharge/products/{terminalId}/{operatorId}/{account}
    Returns dynamicProductId, description, amount, currency, and optional additionalData
    3
    3. Purchase
    Execute the recharge using required fields and (if applicable) the selected dynamic product.
    Endpoint: POST /pre-paid/recharge/purchase/{terminalId}/{operatorId}/{localReference}

    ⚡ Direct Purchase (Advanced Use)#

    If the client is 100% sure that:
    The operator does not require dynamic products, and
    There are no additional fields required beyond the basics (e.g., account, amountToSendX100),
    …it is possible to skip Get Parameters and Get Products and go directly to the purchase endpoint.
    ⚠️ This shortcut is only recommended if the operator’s configuration is already known. Otherwise, skipping Get Parameters may lead to failed or invalid transactions.
    Modified at 2025-07-03 09:57:02
    Built with