CSQ Docs
    CSQ Docs
    Dummy Product Usage Guide
    • CSQ API Doc
    • Dummy Product Usage Guide
    • Overview on Dummy Products
    • Top-Up Simulation
    • Voucher Purchase Simulation
    • Supermarket Vouchers Purchase Simulation
    • Bill Payment Simulation
    • Location-based products simulation

    Supermarket Vouchers Purchase Simulation

    ๐Ÿ›’ Simulating Supermarket Voucher Purchase with Dummy Product (ID: 9993)#

    This guide explains how to simulate the purchase of supermarket vouchers using the dummy product 9993 in the CSQ API. It is designed for developers testing voucher flows in the Supermarket Vouchers category, using real API methods without triggering actual transactions or contacting external suppliers.

    ๐Ÿ“ฆ Dummy Product Overview#

    Product IDProduct NameBehavior Summary
    9993DummySuperMarketSimulates supermarket voucher purchase in one step
    โœ… This dummy product does not require token retrieval or additional queries. It is ideal for testing simple voucher purchase flows.

    ๐Ÿ›’ Dummy Flow for Supermarket Vouchers#

    The dummy supermarket voucher flow has been deliberately designed for simplicity: it requires just one direct call to the purchase method to simulate a complete transaction. There are no preliminary steps like parameter discovery or dynamic product selection. This streamlined design makes the flow ideal for quick integration testing, allowing developers to validate response handling and success/error scenarios without navigating through multi-step logic.

    Simulate Voucher Purchase#

    Method
    POST /supermarket-vouchers/purchase/{terminalId}/{operatorId}/{localReference}
    Required Payload Fields
    {
      "amountToSendX100": 5000,
      "localDateTime": "2025-07-08T10:00:00Z",
      "documentNumber": "AB00000000"
    }

    ๐Ÿ” Field Descriptions#

    FieldTypeDescription
    amountToSendX100integerAmount in cents (e.g. 500 = 5.00)
    localDateTimestringISO 8601 timestamp of the simulated purchase
    documentNumberstringSimulated ID or passport number.

    ๐Ÿงช Behavior Based on account Suffix#

    Ends WithSimulated Result
    000โœ… Success and returns suppliertoken: FDSAGHJKLREWQTYUIO
    001โœ… Success and returns suppliertoken: POIUYTREWQJHGFDSA
    otherโŒ Error 931 - invalid account
    Use this logic to test different outcomes by modifying the last digits of the documentNumber field.

    ๐Ÿ“ค Response Example#

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

    ๐Ÿง  Developer Notes#

    This dummy product simulates a single-step purchase โ€” no token or query required.
    Use amountToSendX100 to test different denominations.
    The documentNumber field acts as a trigger for specific test results.
    Always log and handle resultcode and resultmessage in the response.

    Modified atย 2025-07-08 13:49:50
    Previous
    Voucher Purchase Simulation
    Next
    Bill Payment Simulation
    Built with