PurpleX

Partner API Documentation

PurpleX Partner Payment API

Version 1.0  |  REST  |  JSON

Authentication

Every API request must include your Bearer token in the Authorization header.

Authorization: Bearer pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Your API token is generated from API Settings. Each token is bound to a specific IP + domain. Keep it secret.
Base URL
https://purplex.io/api/partner
POST

/merchant/validate

POST

/merchant/payment

GET

/payment/{partner_tx_id}

POST
/merchant/validate

Validate a merchant before showing payment confirmation to the user. Call this after user scans a QR.

Request Body
{
    "merchant_transaction_data": "test@paytm",
    "merchant_transaction_type": "upi"
}
FieldTypeRequiredDescription
merchant_transaction_datastringYesUPI ID, account number, or PurpleX merchant code
merchant_transaction_typestringYesupi | IMPS | NEFT | purplex
Success Response 200
{
    "status": true,
    "merchant": {
        "name": null,
        "merchant_id": "test@paytm",
        "merchant_transaction_type": "upi"
    }
}
POST
/merchant/payment

Debit USDT from your pre-deposited wallet and send INR to the merchant's UPI/bank account.

Request Body
{
    "partner_tx_id":               "PARA_TX_001",
    "merchant_transaction_data":  "test@paytm",
    "merchant_transaction_type":  "upi",
    "crypto_symbol":              "USDT",
    "network":                    "TRC20",
    "crypto_amount":              8.5,
    "user_id":                    "USER_123",
    "user_name":                  "Rahul Shah",
    "user_email":                 "rahul@example.com"
}
FieldTypeRequiredDescription
partner_tx_idstringYesYour unique TX ID — prevents duplicates
merchant_transaction_datastringYesUPI ID / account / PurpleX code
merchant_transaction_typestringYesupi | IMPS | NEFT | purplex
crypto_symbolstringYesUSDT
networkstringYesTRC20
crypto_amountnumberYesAmount in USDT
user_idstringYesYour user's ID
user_namestringNoYour user's name
user_emailstringNoYour user's email
Success Response 201
{
    "status":         true,
    "message":        "Payment processed successfully.",
    "purplex_tx_id": "PXKM4KG4HPHIWP",
    "partner_tx_id": "PARA_TX_001",
    "crypto_amount": 8.5,
    "crypto_symbol": "USDT",
    "inr_amount":    853.14,
    "paid_at":       "2026-06-05T10:30:00Z"
}
Error Responses
422 Insufficient balance
422 UPI payout failed
409 Duplicate partner_tx_id
503 Rate temporarily unavailable
GET
/payment/{partner_tx_id}

Check the status of a previously processed payment.

{
    "status":                      true,
    "purplex_tx_id":              "PXKM4KG4HPHIWP",
    "partner_tx_id":              "PARA_TX_001",
    "merchant_transaction_type":  "upi",
    "paid_to":                    "test@paytm",
    "crypto_amount":              8.5,
    "payment_status":             "SUCCESS",
    "paid_at":                    "2026-06-05T10:30:00Z"
}
Webhook Callback

After every successful payment, PurpleX sends a POST to your configured Callback URL.

Set your callback URL in API Settings → Callback URL
Payload
{
    "event":                      "payment.success",
    "purplex_tx_id":              "PXKM4KG4HPHIWP",
    "partner_tx_id":              "PARA_TX_001",
    "merchant_transaction_type":  "upi",
    "paid_to":                    "test@paytm",
    "crypto_amount":              8.5,
    "status":                     "SUCCESS",
    "user_id":                    "USER_123",
    "paid_at":                    "2026-06-05T10:30:00Z",
    "signature":                  "a22efce2d2a927b8b97caafe9ca7e7..."
}
Retries: up to 3 times with 60s gap if your endpoint returns non-2xx.
Error Codes
HTTP StatusMeaning
201Payment created successfully
200Request successful
401Invalid or missing API token
404Resource not found
409Duplicate partner_tx_id
422Validation error or business logic failure
429Rate limit exceeded
503External service temporarily unavailable