Synchronous


   Merchants must be PCI DSS compliant to perform synchronous payment transactions involving direct handling of cardholder data.

In a synchronous workflow, payment details are sent directly to the TWPayz server along with the initial payment request, allowing the transaction to be processed immediately and the result returned in real time.

Your request has to include the following information:

  • - Authentication Credentials
  • - Type and amount of transactions
  • - Payment information like card details, Payment Mode and Payment Brand

For our Synchronous Workflow REST API you can use the following types of initial payments:


Preauthorization (PA):

Send a POST request to /transactionServices/REST/v1/payments with paymentType=PA to create a preauthorization transaction.

After a successful preauthorization, the transaction can be captured later using the TWPayz Backoffice APIs


Debit (DB):

A Debit transaction authorizes and captures the payment amount in a single step, enabling immediate processing and settlement of the transaction.

To initiate a debit transaction, send a POST request to the following REST API endpoint: /transactionServices/REST/v1/payments

For debit transactions, the paymentType parameter must be set to DB.

With a successful Debit (DB) request, the transaction is authorized and captured immediately, eliminating the need for a separate capture operation.



In our API Specifications you can find a full list of parameters that can be sent in the initial request.


   A valid Authentication Token must be included in the request header when calling TWPayz REST APIs.
To obtain the token, refer to the Auth Token API documentation.

Sample Request


Sample Response


Hashing Rule

TWPayz uses MD5 cryptographic hashing to validate the authenticity of payment requests sent to the server. The generated hash value must be included in the request for verification.


Below is the description of fields use for generating checksum.

  • memberId <Merchant ID as shared by TWPayz >
  • secureKey <Secure Key that can be generated through TWPayz's dashboard>
  • merchantTransactionId <Unique transaction ID prived by merchant>
  • amount <Amount of transaction>

How to generate Checksum ?

Checksum has to be calculated with following combination and need to be send along with the authentication parameters in each server-to-server request:
<memberId>|<secureKey>|<merchantTransactionId>|<amount>


Standard Notification/ Callback

Checksum has to be calculated with following combination.
<paymentId>|<merchantTransactionId>|<amount>|<short status of transaction>|<secret key>

Example :
77251|011E1D8A5C034|156.00|N|<merchant secret key>


Sample Code


Payment Modes and Brands

Find below the list of payment modes and brands for synchronous workflow.

Show all modes & brands

ModeBrand