Standard Checkout


Standard Checkout

The user will be redirected on the url returned in the response.


The request will be send with POST method over HTTPS to the https://cunipay-sandbox.twpayz.com/walletServices/WalletCustomerService/checkoutPayment endpoint.


Sample Request

{
  "walletOwnerId": "199",
  "merchantEmail": "peter.thorpe@staonline.com",
  "toTelnocc": "",
  "toMobile": "",
  "merchantTransactionId": "qGTzzkH",
  "amount": "100.00",
  "fromCurrencyCode": "GBP",
  "consumerId": "STU897675",
  "consumerName": "Anjali Desai",
  "consumerCountry": "IND",
  "telnocc": "",
  "fromMobile": "",
  "customerEmail": "anjali.desai@gmail.com",
  "description": "Tuition Fee - Spring Semester 2025",
  "merchantRedirectUrl": "https://cunipay-sandbox.twpayz.com/",
  "notificationUrl": "https://cunipay-sandbox.twpayz.com/walletServices/WalletGatewayNotificationHandler",
  "ip": "192.168.0.1",
  "verificationHash": "12e99366cbafeaa82466f74aad9f7496c067277f2aa03f054c3eac281ee03c82",
  "invoiceDetails": [
    {
      "ref": "56456",
      "description": "Exam",
      "date": "2026-04-03",
      "due_date": "2026-04-10",
      "original_amount": "1000",
      "balance": "500"
    }
  ]
}
    

Sample Response

{
   "responseCode": "1",
    "status": "SUCCESS",
    "url": "https://cunipay-sandbox.twpayz.com/checkout/pay?token=Li3FNvvERZzARp2a6srbuGQpZS9Hsi+X/p+8CeLUOJU=&trackingId=317496"

} 
    

NOTE:

  • verificationHash - <api key> <walletOwnerId> <amount> <fromCurrencyCode> <merchantTransactionId> <merchantRedirectUrl>


How to generate verification Hash?

Verification Hash has to be calculated with following combination using SHA256 algorithm and need to be send along with the authentication parameters in each server-to-server request:
<api key> <walletOwnerId> <amount> <fromCurrencyCode> <merchantTransactionId> <merchantRedirectUrl>

Below is the description of fields used for generating hash:

  • apiKey <Secure Key as shared by TWPayz>
  • walletOwnerId <Wallet Owner ID as shared by TWPayz>
  • amount <Amount of transaction>
  • fromCurrencyCode <Currency of transaction>
  • merchantTransactionId <Unique transaction ID provided by merchant>
  • merchantRedirectUrl <Merchant Redirect url>

Standard Notification

URL provided by the merchant where transaction notifications will be sent.

{
  "amount": "101.20",
  "merchantTransactionId": "qGTzzkH",
  "currency": "GBP",
  "transactionId": "317496",
  "description": "Amount Transferred",
  "timestamp": "2026-04-03 16:41:36.0",
  "transactionStatus": "Success",
  "transactionType": "PURCHASE",
  "transactionSubType": "Card Transfer",
  "paymentReference": "INV-STU897675-qGTzzkH",
  "responseCode": 1,
  "status": "SUCCESS"
}
    

Sample Code