PhonePe Business API Documentation

Complete documentation for standalone endpoints with embedded AES/RSA checksum generation.

Live Testing Console (test.php)

Overview & Dynamic Base URL

Welcome to the PhonePe Business API suite. Every endpoint is engineered as a 100% Standalone PHP script with its own embedded checksum logic. All endpoints automatically resolve against your current domain, localhost, or IP address.

Active Base URL (Auto-Detected)
BASE https://fastgetway.shop/

Device fingerprints, token, and merchantId automatically propagate from Step 1 & 2 into subsequent calls.

1. Request OTP POST

POST https://fastgetway.shop/request-otp.php?mobile_number={mobile}

Sends an OTP to the merchant's registered mobile number and returns pre-computed device fingerprinting tokens required for Step 2.

Request Parameters (POST / JSON Body)
ParameterTypeRequiredDescription
mobile_numberStringYes10-digit registered Indian mobile number (e.g. 9876543210).
Success Response (200 OK)
{ "status": "success", "message": "OTP Sent Successfully", "data": { "token": "43924729472947...", "fingerprint": "a1b2c3d4...", "device_fingerprint": "e5f6g7h8...", "ip": "103.21.244.2" } }

2. Validate OTP POST

POST https://fastgetway.shop/validate-otp.php?token={token}&otp={otp}&fingerprint={fp}&device_fingerprint={dfp}&ip={ip}

Validates the SMS OTP and generates the merchant's primary token, refresh_token, and merchant_id.

Request Parameters (POST / JSON Body)
ParameterTypeRequiredDescription
tokenStringYesRequest token from Step 1.
otpStringYesSMS OTP received on mobile.
fingerprintStringYesFingerprint from Step 1.
device_fingerprintStringYesDevice fingerprint from Step 1.
ipStringYesIP address from Step 1.
Success Response (200 OK)
{ "status": "success", "message": "Login Successful", "data": { "userId": "U1234567890", "name": "MERCHANT STORE", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "groupName": "STORE NAME", "merchant_id": "M230123456789", "groupId": "G123456", "roleName": "MERCHANT_ADMIN", "status": "ACTIVE" } }

3. PhonePe Groups POST

POST https://fastgetway.shop/phonepe-group.php?token={token}&refresh_token={rtoken}&fingerprint={fp}&device_fingerprint={dfp}&ip={ip}

Fetches all business accounts and sub-merchant groups associated with the authenticated user profile.

Success Response (200 OK)
{ "status": "success", "message": "User is Active", "data": [ { "userGroupNamespace": { "active": true, "merchantId": "M230123456789", "groupId": "G123456" } } ] }

4. Update Session POST

POST https://fastgetway.shop/update-session.php?token={token}&refresh_token={rtoken}&merchant_id={mid}&fingerprint={fp}&device_fingerprint={dfp}&ip={ip}

Switches the active merchant context when multiple stores/groups exist under a single PhonePe profile.

5. Get QR Codes / Terminals POST

POST https://fastgetway.shop/get-qrcode.php?token={token}&refresh_token={rtoken}&merchant_id={mid}&fingerprint={fp}&device_fingerprint={dfp}&ip={ip}

Retrieves active merchant payment QR codes, terminal mappings, and UPI VPA handles.

Success Response (200 OK)
{ "status": "success", "message": "QR Code Fetched Successfully", "data": { "MAIN": { "vpa": "merchant@ybl", "qrData": "upi://pay?pa=merchant@ybl&pn=STORE", "storeId": "STORE123", "terminal": "MAIN" } } }

6. Refresh Auth Token POST

POST https://fastgetway.shop/refresh-token.php?token={token}&refresh_token={rtoken}&fingerprint={fp}&device_fingerprint={dfp}&ip={ip}

Renews an expired authentication token using the long-lived refresh token.

7. Fetch Transactions POST

POST https://fastgetway.shop/transaction.php?token={token}&merchantId={mid}&fingerprint={fp}&device_fingerprint={dfp}&ip={ip}

Fetches recent customer payments received on the PhonePe merchant account with amount, UTR, payer name, and status.

Success Response (200 OK)
{ "status": "success", "message": "Transactions Fetched Successfully", "data": [ { "amount": 10000, "bankTransactionId": "431209876543", "payerName": "CUSTOMER NAME", "paymentState": "COMPLETED", "merchantOrderId": "ORD2026110501", "transactionDate": 1730789000000 } ] }

8. Validate UTR POST

POST https://fastgetway.shop/validate-utr.php?token={token}&merchantId={mid}&utr={utr}&fingerprint={fp}&device_fingerprint={dfp}&ip={ip}

Verifies an individual payment by searching recent transactions for the 12-digit UPI UTR / RRN.

Success Response (200 OK)
{ "status": "success", "message": "Transaction Successful", "data": { "amount": 100.0, "bankTransactionId": "431209876543", "payerName": "CUSTOMER NAME", "paymentState": "COMPLETED", "merchantOrderId": "ORD2026110501" } }

9. Check Order Status POST POST

POST https://fastgetway.shop/check-status.php?token={token}&merchantId={mid}&order_id={orderId}&fingerprint={fp}&device_fingerprint={dfp}&ip={ip}

Verifies payment status for an existing order ID by matching against PhonePe merchant transaction records. Accepts parameters via GET query string or POST JSON payload.

Success Response (200 OK)
{ "status": "success", "message": "Transaction Successful", "data": { "amount": 100.0, "bankTransactionId": "431209876543", "payerName": "CUSTOMER NAME", "paymentState": "COMPLETED", "merchantOrderId": "ORD2026110501" } }