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

      Purchase

      POST
      /pre-paid/recharge/purchase/{terminalId}/{operatorId}/{localReference}

      Key Considerations for Purchase Request Fields#

      When making a purchase request, it's important to determine which fields are required based on the product type and operator configuration. This is done by calling the Get Parameters method before performing the actual purchase.
      🤔 Although the majority of prepaid products are mobile top-ups—making it seem like this step could be skipped—this isn't always the case. Therefore, we recommend being aware of this possibility and acting accordingly.
      đź’ˇ Using the Get Parameters method ensures success and prevents future development needs in case of changes from providers by making your implementation resilient to changes.

      🔍 How to Determine Required Fields#

      Before making a purchase, you should call the Get Parameters endpoint:
      Endpoint:
      GET /pre-paid/recharge/parameters/{terminalId}/{operatorId}
      This method will return a list of parameters required for the given operator and terminal. The response indicates whether the product is dynamic (dynamic: true) and provides the list of required fields in the parameters array.

      📌 Field Guidelines#

      dynamicProductId#

      Use only if the product is dynamic, as indicated by the dynamic: true flag in the Get Parameters response.
      A product is dynamic if its details are obtained through the Get Products method.
      If the product is not dynamic, leave this field empty or exclude it from the request.

      receiverEmail and documentNumber#

      These fields are conditionally required, depending on the operator and product type.
      They will appear in the parameters list from the Get Parameters response when required.
      Always refer to this response to determine if receiverEmail or documentNumber must be included.

      🚀 Related Workflows#

      Standard Recharge Workflow (Non-Dynamic Products)#

      1.
      Purchase
      Recharge Purchase

      Dynamic Workflow (For Dynamic Products)#

      1.
      Get Products
      Get Products
      2.
      Purchase
      Recharge Purchase

      Make sure to always use the Get Parameters endpoint to verify which fields to send in your purchase request. This ensures compliance with operator-specific configurations and avoids unnecessary errors.

      Request

      Path Params

      Header Params

      Body Params application/json

      Example
      {
          "amountToSendX100": 0,
          "destinationAmountX100": 0,
          "localDateTime": "2019-08-24T14:15:22Z",
          "account": "string",
          "dynamicProductId": "string",
          "receiverEmail": "string",
          "documentNumber": "string"
      }

      Request Code Samples

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'https://evsb.csqworld.com/pre-paid/recharge/purchase///123456789' \
      --header 'U;' \
      --header 'SH;' \
      --header 'ST;' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "amountToSendX100": 0,
          "destinationAmountX100": 0,
          "localDateTime": "2019-08-24T14:15:22Z",
          "account": "string",
          "dynamicProductId": "string",
          "receiverEmail": "string",
          "documentNumber": "string"
      }'

      Responses

      🟢200OK
      application/json
      Body

      Example
      {
          "rc": 0,
          "items": [
              {
                  "finalstatus": 0,
                  "resultcode": "10",
                  "resultmessage": "OK",
                  "supplierreference": "1234567890",
                  "destinationcurrency": "DOP",
                  "destinationamount": 1
              }
          ]
      }
      Modified at 2025-07-28 20:16:50
      Previous
      Get Products
      Built with