CSQ Docs
    CSQ Docs
    CSQ API Doc
    • CSQ API Doc
    • Dummy Product Usage Guide
    • Postpaid
    • Billpayment
    • Get Parameters
      GET
    • Get Invoices
      POST
    • Payment
      POST

      Payment

      POST
      /post-paid/bill-payment/payment/{terminalId}/{operatorId}/{localReference}

      šŸ’ø Execute Payment – Final Step in Invoice Flow#

      This method allows clients to submit a payment request for a postpaid product after completing Steps 1 and 2 of the invoice workflow. It finalizes the process by confirming the amount, recipient data, and operation details.

      šŸ” Description#

      Once the client has:
      1.
      Retrieved the required input fields via Get Parameters
      2.
      Queried the invoice with those fields and obtained a transaction_code
      ...this endpoint is used to execute the payment.
      The request must include:
      All fields listed in the pay array from Step 1
      Any additionalData returned in Step 2
      The amount to send (in cents)
      A transaction timestamp
      Optionally: a beneficiaryPhoneNumber for SMS confirmation, if enabled

      šŸ“„ Request#

      FieldTypeRequiredDescription
      amountToSendX100integerāœ… YesAmount to send, in cents (e.g., 5000 = €50.00)
      localDateTimestringāœ… YesISO 8601 timestamp representing when the transaction is initiated
      beneficiaryPhoneNumberstringOptionalIf SMS notifications are enabled, use this to inform the end user
      additionalDataarrayāœ… YesKey-value array including all fields from pay (Step 1) and data from Step 2
      invoiceNumbersarrayOptionalList of strings obtained from get invoices (Step 2)

      šŸ“Œ About additionalData#

      The additionalData array must contain:
      All static fields required in the pay array from Step 1 (e.g., card_code, document_number)
      All dynamic values returned in Step 2 (e.g., transaction_code, due_date)

      šŸ“¤ Response#

      {
        "rc": 0,
        "items": [
          {
            "finalstatus": 0,
            "resultcode": "0",
            "resultmessage": "Payment successful",
            "supplierreference": "CSQ-REF-2024-XYZ",
            "suppliertoken": "TXN-987654321",
            "destinationcurrency": "EUR",
            "destinationamount": 5000
          }
        ]
      }

      🧠 Usage Notes#

      Always call this method last, after successfully completing Steps 1 and 2 of the payment flow.
      The additionalData field must include all expected keys and values:
      Static fields required in pay
      Dynamic values returned in the invoice step
      For DISCRETE payment types:
      Include invoiceNumbers client wants to pay.
      The value must be a String list of selected invoice references
      The amount sent (amountToSendX100) must match the logic of the product (TOTAL, DISCRETE, or OPEN)
      The response contains reference information (supplierreference, suppliertoken) useful for audit and reconciliation
      In case of failure, check rc, resultcode, and resultmessage for diagnosis

      šŸ“Ž ← Back to Step 2 – Get Pending Invoices

      Request

      Path Params
      terminalId
      integerĀ <int32>
      required
      operatorId
      integerĀ <int32>
      required
      localReference
      integerĀ <int32>
      required
      Header Params
      U
      stringĀ 
      required
      Default:
      {{U}}
      SH
      stringĀ 
      required
      Default:
      {{SH}}
      ST
      stringĀ 
      required
      Default:
      {{ST}}
      Body Params application/json
      amountToSendX100
      integerĀ <int32>
      required
      localDateTime
      stringĀ <date-time>
      required
      beneficiaryPhoneNumber
      stringĀ 
      optional
      invoiceNumbers
      array[string]
      optional
      additionalData
      array[objectĀ (AdditionalDataDto) {2}]Ā 
      required
      key
      stringĀ 
      optional
      value
      stringĀ 
      optional
      Example
      {
          "amountToSendX100": 0,
          "localDateTime": "2019-08-24T14:15:22Z",
          "beneficiaryPhoneNumber": "string",
          "invoiceNumbers": [
              "string"
          ],
          "additionalData": [
              {
                  "key": "string",
                  "value": "string"
              }
          ]
      }

      Request 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/post-paid/bill-payment/payment///' \
      --header 'U;' \
      --header 'SH;' \
      --header 'ST;' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "amountToSendX100": 0,
          "localDateTime": "2019-08-24T14:15:22Z",
          "beneficiaryPhoneNumber": "string",
          "invoiceNumbers": [
              "string"
          ],
          "additionalData": [
              {
                  "key": "string",
                  "value": "string"
              }
          ]
      }'

      Responses

      🟢200OK
      application/json
      OK
      Body
      rc
      integerĀ <int32>
      optional
      items
      array[objectĀ (SaleReceipt) {7}]Ā 
      optional
      finalstatus
      integerĀ <int32>
      optional
      resultcode
      stringĀ 
      optional
      resultmessage
      stringĀ 
      optional
      supplierreference
      stringĀ 
      optional
      suppliertoken
      stringĀ 
      optional
      destinationcurrency
      stringĀ 
      optional
      destinationamount
      numberĀ 
      optional
      Example
      {
          "rc": 0,
          "items": [
              {
                  "finalstatus": 0,
                  "resultcode": "string",
                  "resultmessage": "string",
                  "supplierreference": "string",
                  "suppliertoken": "string",
                  "destinationcurrency": "string",
                  "destinationamount": 0
              }
          ]
      }
      Modified atĀ 2025-07-04 09:25:54
      Previous
      Get Invoices
      Built with