API Suite

Getting Started

Welcome

Welcome to the TouchPay API Suite — your gateway to fast, reliable, and secure digital transactions. Our APIs enable effortless integration for both Payin (money collection) and Payout (fund transfer) workflows, designed to simplify financial automation for businesses of any scale.

Before You Begin

  • Use the /generate-token endpoint to obtain an authentication token. Provide your registered email and password in the request body.
  • Ensure your server IP address is whitelisted before accessing any API endpoints.
  • For Payin transactions, configure a webhook endpoint to receive real-time payment status updates.
  • The generated token must be sent in the Authorization header for all subsequent API requests.
  • Tokens issued by the system do not expire automatically. You only need to regenerate a new token if you update your login credentials or wish to invalidate the previous one.

Webhook Notifications

TouchPay supports webhook callbacks to automatically notify your application about transaction status updates in real time:

  • Payin Webhook — Triggered whenever a customer payment is successful or failed.
  • Payout Webhook — Triggered when a disbursement is processed, completed, or rejected.

These event-driven notifications ensure your backend stays perfectly in sync with TouchPay’s systems, allowing instant status updates and business logic execution without manual intervention.

Request Headers

All API calls to the TouchPay Payin and Payout services must include specific HTTP headers. These headers ensure that each request is properly authenticated and processed by our system.

Required Headers:
Header Name Description Example Value
Content-Type Specifies the format of the request payload. Always set to JSON. application/json
Authorization Used to authenticate every API request. Pass the token obtained from the /generate-token endpoint as a Bearer token. Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6...
Accept Specifies the expected format of the response payload from the server. Typically set to JSON. application/json

Payin Methods

TouchPay supports multiple payment methods that allow users to complete transactions seamlessly through cards, net banking, or UPI. Each payin method is securely processed and instantly verified through our APIs.

Card Payments

Accept payments via all major debit and credit cards (Visa, Mastercard, RuPay, etc.). Transactions are processed through secure payment gateways with instant authorization.

  • Supports debit & credit cards
  • Instant confirmation
  • PCI DSS compliant processing
Net Banking

Enable customers to pay directly from their bank accounts using Internet banking from over 50+ supported banks.

  • Supports major Indian banks
  • Secure bank redirection flow
  • Instant settlement confirmation
UPI Payments

Accept payments through popular UPI apps like Google Pay, PhonePe, Paytm, and BHIM. Fast, secure, and user-friendly transactions with auto-status updates.

  • Supports all UPI handles
  • QR-based or intent-based payment
  • Real-time status notifications

Payout Methods

TouchPay supports fast and reliable payout options to transfer funds directly to beneficiaries via UPI or Bank Account (Account Number & IFSC). Choose the method that best fits your business workflow for instant or same-day settlements.

Bank Account Payout

Send payouts directly to a beneficiary’s bank account using their Account Number and IFSC Code. This method is secure, widely supported, and suitable for all bank transfers.

  • Supports only IMPS mode
  • Reliable for large-value transfers
  • 24x7 availability for IMPS and instant settlement

Required Parameters:

  • account_number – Beneficiary account number
  • ifsc – Bank IFSC code
  • recipient_name – Name of the beneficiary
  • amount – Transfer amount

APIs

Introduction

The Payin and Payout APIs offer complete control and transparency over your transactions, enabling seamless automation, enhanced efficiency, and reduced manual effort. With real-time tracking and secure integrations, you can easily manage payments at scale. These APIs are designed to simplify financial operations and ensure a smooth, reliable payment experience for your business.

Every request to the Payin & Payout REST APIs must include specific HTTP headers to ensure secure and valid communication.

API Status Codes:
Status Code Description
401 Unauthorized.
422 Unprocessable content or Validation errors.
201 Transaction has been created or initiated.
200 Transaction Fetched.
404 Transaction not found.
400 Bad Request.
500 Internal Server Error.

Generate Token

The Generate Token API provides a secure way to authenticate your requests by generating a unique Bearer Token. This token must be included in the header of all subsequent API calls to ensure authorized and encrypted communication between your application and the TouchPay system. It helps safeguard sensitive data, prevent unauthorized access, and maintain the integrity of every transaction request.

Request Requirements:
You will get the API URI from us.
Method POST
Endpoint /api/generate-token
Headers Accept: 'application-json' Content-Type: 'application-json'
IP Address IP Address must be whitelist with us.
Request Body:
Name Description Example Value
email Required Your Registered Email merchant@company.com
password Required Your Touchpay Login Passsword ************
Request Body Structure:

{
  "email": "merchant@company.com",
  "password": "************"
}
Response Structure:

{
  "status":1,
  "message": "The Token is generated successfully.",
  "token" : "eyJaOeaadjgkAbwtCdEfGhIjKlMnOpQrStUvWxYz************************"
}

Fetch Wallet Balance

The Fetch Wallet Balance API allows you to securely retrieve the current wallet balance associated with your account in real time. By using the authorized Bearer Token in the request header, this API ensures that only authenticated users can access wallet information. It provides accurate and up-to-date balance details, enabling your application to display or validate available funds before initiating transactions, while maintaining data integrity and system security.

Request Requirements:
You will get the API URI from us.
Method GET
Endpoint /api/user/get-wallet
Headers Accept: 'application-json' Content-Type: 'application-json' Authorization: 'Bearee eyJaOeaadjgkAbw********'
IP Address IP Address must be whitelist with us.
Response Structure:

{
  "status": 1,
  "message": "Wallet balance fetched successfully",
  "data": {
        "wallet_balance": "4999.78"
       }
}
              

Initiate Payout

Payout is a service that allows businesses to send payments directly to the accounts of their customers, vendors, or service providers and handles outgoing transactions. They are essential for businesses that need to disburse funds regularly, such as payroll for employees, commissions for affiliates, or payments to freelancers.

Request Requirements:
You will get the API URI from us.
Method POST
Endpoint /api/payout/transaction
Headers Accept: 'application-json' Content-Type: 'application-json' Authorization: 'Bearee eyJaOeaadjgkAbw********'
IP Address IP Address must be whitelist with us.
Status Codes

Every API response includes a status that indicates the outcome of the request. Refer to the table below for possible values and their meanings.

status Description Example Message
0 Failure — The request failed due to a general or business logic error. The message field explains the reason. Insufficient balance.
1 Success — The request was successfully processed and the response contains valid data. Transaction completed successfully.
2 Processing — The request has been accepted and is currently being processed. The final status will be updated asynchronously. Payout is under processing.
3 Rejected — The request has been rejected. Payout is rejected.
Request Body:
Name Description Example Value
service_provider_id Required Will be provided by Touchpay. 14
payment_mode Required This is a fixed value. 1
transaction_id Unique & Required Your unique transaction id. TXN12893353
amount Required Beneficiary transfer amount. 100
recipient_name Required Beneficiary Name. John Doe
account_type Required This is a fixed value. 1
account Required Beneficiary Account Number. 102759398573
ifsc Required Beneficiary's Account IFSC. AQC023433
sender_name Required Name of the individual or business initiating the payout AQC023433
mobile_no Required Beneficiary's Mobile Number (10 digits) 92840*****
remarks Required Description or purpose of the transaction Vendor Payment for September
Request Body Structure:
{
  "service_provider_id": "14",
  "payment_mode": 1,
  "transaction_id": "TXN12893353",
  "amount": "100",
  "recipient_name": "John Doe",
  "account_type": 1,
  "account": "102759398573",
  "ifsc": "AQC023433",
  "sender_name": "AQC023433",
  "remarks": "Vendor Payment for September",
  "mobile_no": 92840*****
}
Response Structure:
{
    "status": 1,
    "message": "fundTransfer successfully processed",
    "data": {
        "transaction_id": "TXN12893353",
        "amount": "100",
        "txn_status": "success",
        "utr_number": "528615922252"
    }
}

Payout Status

The Payout Status API lets you verify the current state of a payout request. Using the unique transaction reference (such as transaction_id), you can check whether a payout is Pending, Approved, Rejected.

Request Requirements:
You will get the API URI from us.
Method POST
Path /api/payout/status
Headers Required All the mention headers.
IP Address IP Address must be whitelist with us.
Request Body:
Name Description Example Value
service_provider_id Required Will be provided by Touchpay. 14
transaction_id Unique & Required Your unique transaction id. TXN12893353
Request Body Structure:

{
  "service_provider_id": 14,
  "transaction_id": "TXN12893353"
}
              
Response Structure:

{
  "status": 1,
  "message": "Record Fetch Success",
  "data": {
      "transaction_id": "TXN12893353",
      "amount": 10,
      "txn_status": "success",
      "reference_id": "ENAN1000131598443",
      "utr_number": "528615922255"
  }
}
              

Note: You will be notify as well using webhook for the Payout Approved or Rejected.

Payin Status

The Payin Status API lets you verify the current state of a payment request. Using the unique transaction reference (such as transaction_id), you can check whether a payment is Pending, Approved, Rejected.

Request Requirements:
You will get the API URI from us.
Method POST
Path /api/payin/status
Headers Required All the mention headers.
IP Address IP Address must be whitelist with us.
Request Body:
Name Description Example Value
order_id Required Get Specific payment status using your unique order_id. adsd-ewerz-23sdsd-ad234
Request Body Structure:

{
  "service_provider_id": 14,
  "transaction_id": "TXN12893353"
}
              
Response Structure:

{
  "status": 1,
  "message": "Record fetched successfully.",
  "data": {
      "transaction_id": "TXN12893353",
      "amount": 100,
      "txn_status": "success",
      "reference_id": null,
      "utr_number": "o_BLYvmD2NmvJ9nKNY-5K6zn"
     }
}


            

Note: You will be notify as well using webhook for the Payin Approved or Rejected.

Webhooks

Webhooks allow your application to receive real-time updates from our system whenever specific events occur — such as payment success, failure, or refund. Instead of continuously polling our APIs, you can configure a webhook endpoint to automatically get notified with structured event data, ensuring instant synchronization between our platform and your system.

Payin Webhook

The Payin Webhook allows you to receive real-time notifications whenever the status of a payin transaction is updated. Once a payin is processed, the system will send a request to your configured webhook URL containing details such as Transaction ID, amount, status. Use this to automatically update your system without polling the status API.

Payin Webhook Response:
{
  "status" : 1,
  "message" : "Payment Success",
  "event_type" : "payment_success",
  "data" :{
        "transaction_id" : "TXN12893353",
        "amount" : 100,
        "txn_status" : "success",
        "utr_number" : "o_G1LvGrE5BlMpyOg5-oJ6X7",
  }
}

Payout Webhook

The Payout Webhook allows you to receive real-time notifications whenever the status of a payout transaction is updated. Once a payout is processed, the system will send a request to your configured webhook URL containing details such as order ID, transaction ID, amount, status, and timestamp. Use this to automatically update your system without polling the status API.

Payout Webhook Response:
{
  "status": 1,
  "message": "Transaction processed successfully",
  "data": {
    "transaction_id": "TXN123456789",
    "amount": 500.00,
    "txn_status": "success",
    "reference_id": "RPT987654321",
    "utr_number": "AXISN12345"
  }
}