Standard Checkout


In a Standard Checkout integration, the merchant submits the initial payment request to the TWPayz hosted checkout page. The customer is then redirected to the secure TWPayz payment page, where they can enter their card or account details to complete the transaction.

Once the payment has been processed and verified, the customer is automatically redirected back to the merchant's configured merchantRedirectUrl, along with the transaction status and relevant payment information.


The initial Standard Checkout request must include all required transaction and authentication details, including:

  • - authentication credentials
  • - mode, brand , type and amount of transaction
  • - merchantTransactionId
  • - merchantRedirectUrl

The Standard Checkout request must be sent to the /transaction/Checkout endpoint using the HTTP POST method.

Once the request is submitted successfully, the customer will be redirected to the TWPayz hosted checkout page to complete the payment process.


For a complete list of supported request parameters and their descriptions, refer to the API Specifications section.


Google Pay as hosted checkout

In order to use Google Pay hosted checkout option you need to adhere to Google Pay and Wallet API's Acceptable Use Policy and accept the terms defined in the Google Pay API Terms of Service in our Merchant Dashboard.


Workflow


1. Post an Initial Payment

The merchant initiates the payment process by sending an initial payment request to the TWPayz hosted checkout page

2. Redirect to TWPayz hosted page

The customer provides their card or account details on the secure TWPayz hosted checkout page to proceed with the transaction.

3. Return to Merchant's Website

After the payment is confirmed, the customer is redirected back to the merchant's website along with the transaction status.


1. Post an Initial Payment

To start the Hosted Payment Page flow, the merchant must submit an initial payment request to the TWPayz server.

Note: The merchantRedirectUrl value must be URL-encoded before sending the request.


Sample Request


2. Redirect to TWPayz hosted page

The account holder is redirected to the TWPayz hosted payment page, where they can enter their card or account details to complete the transaction.


3. Return to Merchant's Website

After the payment is processed, the customer is redirected to the merchantRedirectUrl along with the transaction response in the form of POST parameters.

Merchants can also verify the payment status using the Backoffice Inquiry API.


Sample code for reading the response


Hashing Rule For Request

TWPayz uses MD5 cryptographic hashing to validate the authenticity of payment requests sent to the server.

The hash value must be generated using the prescribed parameters and included in the request for verification.


Below are the description of fields used for generating checksum.
  • memberId <Merchant ID as shared by TWPayz>
  • totype <Name of PSP>
  • amount <Amount of transaction>
  • merchantTransactionId <Unique transaction ID provided by merchant>
  • merchantRedirectUrl <Customer is redirected to this url >
  • secureKey <Secure Key that can be generated through TWPayz's dashboard>

How to generate Checksum for request ?

The checksum must be calculated using the specified parameter combination and sent with the authentication parameters in every server-to-server request.
<memberId>|<totype>|<amount>|<merchantTransactionId>|<merchantRedirectUrl>|<secureKey>


Sample Code


Hashing Rule For Response

TWPayz uses MD5 cryptographic hashing to validate the authenticity of payment responses sent to merchants.


Below are the description of fields used for generating checksum.
  • PaymentId <Payment ID of the transaction>
  • merchantTransactionId <Unique transaction ID provided by merchant>
  • amount <Amount of transaction>
  • status <Status of the transaction>
  • secureKey <Secure Key that can be generated through TWPayz's dashboard>

How to generate Checksum for response ?

Checksum can be calculated with the following combination.
<PaymentId>|<merchantTransactionId>|<amount>|<status>|<secureKey>


Standard Notification/ Callback

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

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


Payment Modes and Brands

Find below the list of payment modes and brands for standard checkout.

Show all modes and brands

ModeBrand