Back to Login

API Documentation

Base URL: https://pgm.tourquest.travel

Authentication – Login

JWT token for API access (valid for 2 hours).

Endpoint: POST https://pgm.tourquest.travel/api/Auth/login

Request headers:

Content-Type: application/json

Request body (JSON):

{
  "username": "test",
  "password": "123456"
}

Example (cURL):

curl --location 'https://pgm.tourquest.travel/api/Auth/login' \
--header 'Content-Type: application/json' \
--data '{
  "username": "test",
  "password": "123456"
}'

Success response (200):

{
  "token": "<JWT token>"
}

Error response (400):

{
  "errorMsg": "Invalid login details"
}

Use the returned token in the Authorization: Bearer <token> header for protected API requests.

Global Payment – Initiate (PG router)

This is the single fixed public API for merchants. It uses the API JWT (from https://pgm.tourquest.travel/api/Auth/login) to identify the merchant (AgentId), reads payment_gateway_code from api_setting, and routes the request to the configured Payment Gateway.

Endpoint: POST https://pgm.tourquest.travel/api/v2/PaymentGateway/Initiate

Request headers:

Content-Type: application/json
Authorization: Bearer <your JWT token>

Request body (JSON):

{
  "payAmount": 100,
  "mobile": "9876543210",
  "merchantOrderId": "YOUR_ORDER_REF_123"
}

Example (cURL):

curl --location 'https://pgm.tourquest.travel/api/v2/PaymentGateway/Initiate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_JWT_TOKEN' \
--data '{
  "payAmount": 100,
  "mobile": "9876543210",
  "merchantOrderId": "YOUR_ORDER_REF_123"
}'

Success response (200) – NIMBBL example:

{
  "status": "TXN",
  "payment_gateway_code": "NIMBBL",
  "ref_num": "<internal transaction reference>",
  "order_id": "<Nimbbl order_id>",
  "transaction_id": "<Nimbbl transaction_id>",
  "payment_mode": "<payment_mode>",
  "upi_link": "<UPI Intent Link>"
}

ISERVEU (Yellow96): response includes upi_link. merchantOrderId must start with 14-digit yyyyMMddHHmmss.

ISERVEUVOYANTRA: response includes upi_link. merchantOrderId must be 1–50 alphanumeric characters.

TPPayTmUPI / PAYSWIFFUPI / PAYUINTENT: response includes upi_link (UPI intent URL).

Error responses (400/401):

{ "status": "ERR", "ErrorMsg": "Request body required" }
{ "status": "ERR", "ErrorMsg": "merchantOrderId is required" }
{ "status": "ERR", "ErrorMsg": "mobile is required" }
{ "status": "ERR", "ErrorMsg": "payAmount must be greater than 0" }
{ "status": "ERR", "ErrorMsg": "API user mapping not found." }
{ "status": "ERR", "ErrorMsg": "Unsupported gateway" }
{ "status": "ERR", "ErrorMsg": "Failed to save payment" }
{ "status": "ERR", "ErrorMsg": "Nimbbl failed" }
{ "status": "ERR", "ErrorMsg": "ISERVEU failed" }
{ "status": "ERR", "ErrorMsg": "Invalid token - AgentId not found" }
Global Payment – Status (by merchantOrderId)

Check status for a payment initiated via /api/v2/PaymentGateway/Initiate.

Endpoint: POST https://pgm.tourquest.travel/api/v2/PaymentGateway/Status

Request headers:

Content-Type: application/json
Authorization: Bearer <your JWT token>

Request body (JSON):

{
  "merchantOrderId": "YOUR_ORDER_REF_123"
}

Example (cURL):

curl --location 'https://pgm.tourquest.travel/api/v2/PaymentGateway/Status' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_JWT_TOKEN' \
--data '{
  "merchantOrderId": "YOUR_ORDER_REF_123"
}'

Success response (200):

{
  "status": "TXN",
  "payment_gateway_code": "NIMBBL",
  "merchantOrderId": "YOUR_ORDER_REF_123",
  "ref_num": "<internal transaction reference>",
  "txn_status": "Success",
  "payment_bank": "Nimbbl",
  "amount": "100"
}

Error responses (400/401):

{ "status": "ERR", "ErrorMsg": "merchantOrderId is required" }
{ "status": "ERR", "ErrorMsg": "Invalid token" }
{ "status": "ERR", "ErrorMsg": "Transaction not found" }
Global Payment – Callback data
  1. When the payment gateway sends a callback (webhook), our system processes it and may forward a normalized payload to your webhook URL (configured in API Setting).
  2. If the webhook is missed or not received, you can verify the transaction status using the Status API.
  3. In case of missed webhooks, both merchant and admin can manually trigger/resend the webhook from the system.

Forwarded callback body (fixed JSON shape) — same structure for gateways that support merchant forwarding (e.g. ISERVEU, ISERVEUVOYANTRA, TPPayTmUPI, PAYSWIFFUPI, PAYUINTENT). Field meanings:

  • collect_ref — merchant order id (your merchantOrderId).
  • crn — bank / gateway customer reference (identifies the customer or order at PG side when applicable).
  • bankref — RRN or bank reference number.
  • status — normalized outcome: typically success, fail, or pending (may reflect intermediate / request states depending on PG).
  • amount — numeric amount.
  • payer_vpa — payer UPI VPA when available.
  • upi_transaction_id — UPI / gateway transaction reference (often same as bank RRN where applicable).
  • timestamp — time string (e.g. 10:22:34 AM).

Example (illustrative):

{
  "collect_ref": "<Merchant_order_id>",
  "crn": "<Bank CRN to identify customer>",
  "bankref": "<RRN NO>",
  "status": "success",
  "amount": 500,
  "payer_vpa": "example@ybl",
  "upi_transaction_id": "<UPI Transaction Id>",
  "timestamp": "10:22:34 AM"
}

Possible status values include success, fail, and pending / request-style states depending on the gateway.

Webhook test URL: set webhook_url to https://pgm.tourquest.travel/test51/MerchantWebhookTest while integrating. It accepts GET/POST (JSON or form), logs the payload, and returns { "status": "received", "message": "Webhook logged" }.

Public Payout – Payout (Payfin)

Endpoint: POST https://pgm.tourquest.travel/api/PublicPayout/Payout

Request headers:

Content-Type: application/json
Authorization: Bearer <your JWT token>

Request body (JSON):

{
  "description": "Payment",
  "amount": "100",
  "txnMode": "PA", // PA for IMPS and NE for NEFT
  "clientTxnId": "YOUR_UNIQUE_TXN_REF_123",
  "beneName": "Beneficiary Name",
  "beneAccNum": "1234567890123456",
  "beneIfscCode": "HDFC0001234",
  "beneEmail": "bene@example.com",
  "beneMobile": "9876543210",
  "bankName": "HDFC Bank"
}

Example (cURL):

curl --location 'https://pgm.tourquest.travel/api/PublicPayout/Payout' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_JWT_TOKEN' \
--data '{
  "description": "Payment",
  "amount": "100",
  "txnMode": "IMPS",
  "clientTxnId": "YOUR_UNIQUE_TXN_REF_123",
  "beneName": "Beneficiary Name",
  "beneAccNum": "1234567890123456",
  "beneIfscCode": "HDFC0001234",
  "beneEmail": "bene@example.com",
  "beneMobile": "9876543210",
  "bankName": "HDFC Bank"
}'

Success response (200):

{
  "status": "TXN",
  "ErrorMsg": "",
  "payfin": { ... }
}

Error responses (400/401):

{ "status": "ERR", "ErrorMsg": "Missing required fields: ..." }
{ "status": "ERR", "ErrorMsg": "payout_gateway_code not configured for this API user." }
{ "status": "ERR", "ErrorMsg": "API user mapping not found in api_setting." }
{ "status": "ERR", "ErrorMsg": "Invalid token - AgentId not found" }
Public Payout – Status

Endpoint: POST https://pgm.tourquest.travel/api/PublicPayout/Status

Request headers:

Content-Type: application/json
Authorization: Bearer <your JWT token>

Request body (JSON):

{
  "clientTxnId": "YOUR_UNIQUE_TXN_REF_123"
}

Example (cURL):

curl --location 'https://pgm.tourquest.travel/api/PublicPayout/Status' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_JWT_TOKEN' \
--data '{
  "clientTxnId": "TXNREF001"
}'

Success response (200):

{
    "status": "TXN",
    "ErrorMsg": "",
    "payfin": {
        "status": "SUCCESS", // This is request status
        "message": "Payment status Fetched : Success",
        "timestamp": "7-Apr-2026 07:55:36 Tuesday",
        "data": [
            {
                "transactionStatus": "PROCESSING", // This is Final Status of the Payout Transaction
                "utr": "",
                "clientTxnId": "PAYFIN1234627875424545", // this is the client transaction id of the payout request
                "statusDescription": "To Be Authorized", // this is the status description of the payout request
                "batchId": "WLFTS93S4GiX1N2rXJrN",
                "amount": "300.0"
            }
        ],
        "requestId": "|d932f9052f96e8863829fc9792dc8eda.75cd39afdf6a4e43."
    }
}

Error responses (400/401/403/404):

{ "status": "ERR", "ErrorMsg": "clientTxnId is required." }
{ "status": "ERR", "ErrorMsg": "Transaction not found" }
{ "status": "ERR", "ErrorMsg": "Transaction does not belong to this account." }
{ "status": "ERR", "ErrorMsg": "Invalid token - AgentId not found" }
Payout Callback Data

When Payfin sends a payout status update to your server, the callback body is JSON with a data array (one object per payout line) and a signature for verification. Typical fields in each data[] item: transactionStatus, utr, clientTxnId, statusDescription, batchId, amount.

Processed (intermediate / authorization step)

{
  "data": [
    {
      "transactionStatus": "Processed",
      "utr": "",
      "clientTxnId": "PAYFIN1234627875424545",
      "statusDescription": "Authorization Done !",
      "batchId": "WLFTS93S4GiX1N2rXJrN",
      "amount": "300.0"
    }
  ],
  "signature": "igG9BzWq8vKJlMQNP9zqf0kiCusO+oqqm7yUrnJFTMC1kpMydGb/biq5whvqSfsuJpxT2Emyaee2SFJVVwcHUgV6nA5xkyy0R3NrD8UZLXFg6pSH+ECo9jPs1afDY7tJ9aD1mnr8QYW9YcDfYHN17mxiDFYmHKC/m4UhzViig+zGmaHdVzj7fKfzptuQlcGf65ZC96Ln4xOe628ypSKjdg=="
}

FAILED

{
  "data": [
    {
      "transactionStatus": "FAILED",
      "utr": "",
      "clientTxnId": "20260406220125TXN1775493085340",
      "statusDescription": "Transaction amounts outside the range of ₹300.0 to ₹50000.0 are not permitted.",
      "batchId": "WLFTS1775493086058Gf",
      "amount": "100.0"
    }
  ],
  "signature": "igG9BzWq8vKJlMQNP9zqf2o34nUkAFnBEanQZw6a5d375ncLYWnqp9UiJ0thUsH5GNg0HTqL6mFA1w/K4GqUBKGQQSk7h2xe5b2ybDjCiXAXwlmYMb1F+ds7Npptdl32HajfPagvqnhbHq4ZEZBWpe9G5uO6TdMod5OfhK/T/frjntrjXT8QPYmFLcn5rEOshT9KbbZetjmRVC6vL2DvV4aAruVi1pu8GchLz6/eZ6LUNGFyqNgjCFrvi6nPOlTOHzAsSwUxtncN110xliocfFNlQM4oIDNYTpV9U6/MrUU="
}

SUCCESS

{
  "data": [
    {
      "transactionStatus": "SUCCESS",
      "utr": "609216479246",
      "clientTxnId": "PAYFIN12346998",
      "statusDescription": "Transaction Success",
      "batchId": "WL9FcDIkkc",
      "amount": "300.0"
    }
  ],
  "signature": "igG9BzWq8vKJlMQNP9zqfxYl03v7hYYxhGz+EzbHHLAmkszZ/6+RaXgyMN1pZyPh9V29eIt4/mlu9yosKzmCteu1rYGLI8d1Q0mfhM7Ognr2PC8yCT4CbdXKc7iSiN++ZCnSV6ABE3izzGtlw113OpfJEYv8aTQL/acCVfn867WnANDZRIt9VriGVfw8wSwY97070PItxS2C5Ha8g16wBg=="
}
© 2026 PGMASTER PRIVATE LIMITED