CSQ Docs
    CSQ Docs
    CSQ API Doc
    • CSQ API Doc
    • Dummy Product Usage Guide
    • Prepaid
    • Supermarket vouchers
    • Supermarket Vouchers Purchase
      POST

      Supermarket Vouchers Purchase

      POST
      /pre-paid/supermarket-vouchers/purchase/{terminalId}/{operatorId}/{localReference}

      šŸ”§ Purchase Supermarket Vouchers#

      Executes the purchase of a supermarket voucher using the provided request body. This method supports flexible delivery options and validates recipient documentation when applicable.

      šŸ” Authentication#

      Authentication is handled via custom header parameters, as defined in the API’s global configuration:
      Header NameTypeRequiredDescription
      UstringYesUsername assigned by CSQ.
      STstringYesUnix timestamp (valid for 30 seconds). Used as a salt for hashing.
      SHstringYesSalted hash. See Headers for more info.
      Refer to the Auth configuration for implementation details.

      šŸ“„ Request Body Parameters#

      ParameterTypeRequiredDescription
      amountToSendX100integerConditionalAmount to send in cents. Cannot be used with destinationAmountX100.
      destinationAmountX100integerConditionalDestination amount in cents. Cannot be used with amountToSendX100.
      localDateTimestringYesLocal timestamp of the transaction (YYYY-MM-DDTHH:mm:ss).
      beneficiaryPhoneNumberstringNoPhone number of the voucher recipient.
      dynamicProductIdstring/nullNoOptional product identifier.
      receiverEmailstring/nullNoEmail address for voucher delivery.
      receiverMessagestring/nullNoCustom message to include with the voucher.
      documentNumberstringYesID number of the recipient.
      documentTypeenum<string>NoType of document: PASSPORT or ID_CARD.
      firstNamestringNoRecipient’s first name.
      surnamestringNoRecipient’s surname.
      secondSurnamestring/nullNoRecipient’s second surname (if applicable).

      šŸ“¤ Response Example#

      {
        "rc": 0,
        "items": [
          {
            "finalstatus": 0,
            "resultcode": "10",
            "resultmessage": "Voucher purchase successful",
            "supplierreference": "SUP-REF-78910",
            "suppliertoken": "ABC123XYZ456TOKEN",
            "destinationcurrency": "DOP",
            "destinationamount": 150000
          }
        ]
      }

      🧾 Response Field Notes#

      rc: 0
      Indicates that the operation was successfully processed.
      finalstatus: 10
      Suggests a successful outcome at the end of the transaction flow. The exact meaning may vary depending on internal status conventions.
      destinationamount
      Value is expressed in cents. For example, 150000 represents DOP 1,500.00.
      supplierreference and suppliertoken
      These fields are used to track the transaction with the external supplier.

      Request

      Path Params

      Header Params

      Body Params application/json

      Example
      {
          "amountToSendX100": 0,
          "destinationAmountX100": 0,
          "localDateTime": "2019-08-24T14:15:22Z",
          "beneficiaryPhoneNumber": "string",
          "dynamicProductId": "string",
          "receiverEmail": "string",
          "receiverMessage": "string",
          "documentNumber": "string",
          "documentType": "PASSPORT",
          "firstName": "string",
          "surname": "string",
          "secondSurname": "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/supermarket-vouchers/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",
          "beneficiaryPhoneNumber": "string",
          "dynamicProductId": "string",
          "receiverEmail": "string",
          "receiverMessage": "string",
          "documentNumber": "string",
          "documentType": "PASSPORT",
          "firstName": "string",
          "surname": "string",
          "secondSurname": "string"
      }'

      Responses

      🟢200OK
      application/json
      Body

      Example
      {
          "rc": 0,
          "items": [
              {
                  "finalstatus": 0,
                  "resultcode": "string",
                  "resultmessage": "string",
                  "supplierreference": "string",
                  "suppliertoken": "string",
                  "destinationcurrency": "string",
                  "destinationamount": 0
              }
          ]
      }
      Modified atĀ 2025-07-28 20:17:26
      Built with