🇮🇳 Made for Indian Merchants • 0% Platform Commission • Instant Direct Bank UPI Settlement
REST API v1.3.0

Developer API Documentation

Complete integration reference for WebPress Pay payment engine.

1. Overview & Architecture

WebPress Pay is a direct-to-bank peer-to-peer UPI payment facilitation engine. It allows merchants to generate dynamic UPI QR codes and 1-tap mobile deep links (PhonePe, Google Pay, Paytm, BHIM, CRED) and reconciles payments in real time using 12-digit bank UTR numbers.

Key Principles:
  • Direct Settlement: Customer payments go directly into your bank account. No funds are pooled on the gateway server.
  • 0% Commissions: You keep 100% of customer payments. Only flat subscription access applies.
  • Instant Webhooks: Automated background workers dispatch instant HTTP POST notifications when an order is verified.

2. Authentication & API Keys

All API requests require authentication via your unique Merchant User Token (`user_token`). You can find or regenerate your secret token inside the Merchant Dashboard under API Credentials.

Finding Your Merchant Token:
  1. Log in to your Merchant Dashboard.
  2. Navigate to API Details in the left sidebar.
  3. Copy your 32-character hexadecimal User Token.
Security Notice: Keep your Merchant User Token secure. Never expose it in client-side HTML, frontend JavaScript, or public Git repositories.

3. Base URLs & Content Types

Parameter Value
Base URL https://webpresspay.com
HTTP Method POST
Content-Type application/x-www-form-urlencoded or multipart/form-data
Response Format application/json

POST

4. Create Payment Order (PayIN)

Initiates a payment session and returns a secure hosted checkout URL.

Endpoint: /api/create-order  (or /payment/create_order.php)
Request Parameters:
Field Type Required Description
user_token String Yes Your 32-character merchant API token.
amount Numeric Yes Amount in INR (e.g. 100.00).
order_id String Yes Unique order reference (alphanumeric, max 100 chars).
customer_mobile String Yes 10-digit Indian mobile number of customer.
redirect_url URL Optional URL where customer is redirected after payment completion.
remark1 String Optional Custom metadata / note (passed back in webhooks).
remark2 String Optional Additional custom reference note.
Success Response (HTTP 201 Created):
{
  "status": true,
  "message": "Order Created Successfully",
  "result": {
    "orderId": "ORDER_1724749200",
    "payment_url": "https://webpresspay.com/payment3/pay_now.php?token=a8f9c2e0b1d3..."
  }
}
Error Response (HTTP 400 / 401 / 403):
{
  "status": false,
  "message": "Invalid or unauthorized Merchant User Token"
}

POST

5. Check Order Status

Query the real-time settlement status of any previously initiated order.

Endpoint: /api/check-order-status  (or /payment/check_order.php)
Request Parameters:
Field Type Required Description
user_token String Yes Your merchant API token.
order_id String Yes The order ID to look up.
Success Response — Paid (HTTP 200 OK):
{
  "status": "COMPLETED",
  "message": "Transaction Successfully",
  "result": {
    "txnStatus": "COMPLETED",
    "resultInfo": "Transaction Success",
    "orderId": "ORDER_1724749200",
    "status": "SUCCESS",
    "amount": "100.00",
    "date": "2026-08-27 14:30:00",
    "utr": "423984719283"
  }
}

6. Connection Diagnostic / Ping

Test whether your server can reach the WebPress Pay platform and confirm that your API token is valid without creating real orders.

Endpoint: /api/check-order-status with order_id = "TEST_PING_1788268062"
{
  "status": true,
  "message": "Connection Successful! Merchant API Token is verified and active.",
  "result": {
    "token_status": "VALID",
    "mode": "LIVE"
  }
}

7. Webhook & Instant Payment Notification (IPN)

When a payment is verified, our automated background worker sends an asynchronous HTTP POST request to your configured Webhook URL.

Webhook Payload (HTTP POST):
{
  "order_id": "ORDER_1724749200",
  "amount": "100.00",
  "status": "SUCCESS",
  "customer_mobile": "9707842047",
  "remark1": "Order Checkout",
  "remark2": ""
}
Sample Webhook Listener (PHP):
<?php
$payload = $_POST;

if (!empty($payload['status']) && $payload['status'] === 'SUCCESS') {
    $orderId = $payload['order_id'];
    $amount  = $payload['amount'];
    
    // Fulfill customer order in your database
    // updateOrderStatus($orderId, 'PROCESSING');
    
    // Always return HTTP 200 JSON
    header('Content-Type: application/json');
    echo json_encode(['status' => true, 'message' => 'Order fulfilled']);
    exit;
}
?>

8. PHP SDK Integration

Download the official PHP SDK v1.3.0 for clean object-oriented integration.

<?php
require_once __DIR__ . '/WebPressPay.php';

$client = new WebPressPay('YOUR_MERCHANT_TOKEN', 'https://webpresspay.com');

// 1. Diagnostic test
$ping = $client->testConnection();
if (!$ping['success']) {
    die("Connection failed: " . $ping['message']);
}

// 2. Create Order
$order = $client->createOrder([
    'amount'          => 250.00,
    'order_id'        => 'INV_' . time(),
    'customer_mobile' => '9707842047',
    'redirect_url'    => 'https://yourwebsite.com/payment-complete'
]);

if (!empty($order['status'])) {
    // Redirect customer
    header('Location: ' . $order['result']['payment_url']);
    exit;
}
?>

9. WordPress WooCommerce Plugin Setup

  1. Download upi-payment-woocommerce.zip from the SDK Files Page.
  2. In your WordPress Admin, go to Plugins → Add New → Upload Plugin and upload the ZIP.
  3. Activate the plugin.
  4. Go to WooCommerce → Settings → Payments → WebPress Pay UPI.
  5. Enter your Base URL (https://webpresspay.com) and Merchant Token.
  6. Click Test Connection to confirm instant communication.
  7. Save changes. Your checkout is now accepting direct UPI payments!

10. cURL Command Example

curl -X POST "https://webpresspay.com/api/create-order" \
  -d "user_token=YOUR_MERCHANT_TOKEN" \
  -d "amount=100.00" \
  -d "order_id=ORDER_12345" \
  -d "customer_mobile=9707842047" \
  -d "redirect_url=https://yourwebsite.com/success"

11. Error Codes & Troubleshooting

HTTP Code Error Message Cause & Solution
401 Invalid or unauthorized Merchant User Token Check that your user_token matches your active token in Merchant Dashboard.
403 Merchant Account is Suspended/Banned Your merchant account has been locked. Contact administrator support.
400 Order ID already exists for this user Pass a fresh, unique order_id for every new payment attempt.
400 Your Subscription Plan has expired Log in to Merchant Dashboard → Subscription and renew your plan.
Chat with Us .wpp-footer-mini-grid { gap: 7px; margin-top: 14px; max-width: 345px; display: flex; flex-flow: wrap; } .wpp-footer-mini-card { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 13px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); transition: all .18s ease; } .wpp-footer-mini-card:hover { background: rgba(255,255,255,.055); border-color: rgba(52,211,153,.16); transform: translateX(2px); } .wpp-footer-mini-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(16,185,129,.10); color: #6ee7b7; font-size: .9rem; } .wpp-footer-mini-card strong { display: block; color: #e2e8f0; font-size: .78rem; line-height: 1.2; margin-bottom: 2px; } .wpp-footer-mini-card span { display: block; color: #64748b; font-size: .7rem; } .wpp-footer-links { gap: 8px; } .wpp-footer-links a { position: relative; padding-left: 0; font-size: .82rem; } .wpp-footer-links a::before { content: ''; width: 0; height: 1px; background: #34d399; position: absolute; left: 0; bottom: -2px; transition: width .18s ease; } .wpp-footer-links a:hover { transform: none; } .wpp-footer-links a:hover::before { width: 18px; } .wpp-footer-status { margin-top: 18px; display: flex; align-items: center; gap: 9px; padding: 10px 11px; border-radius: 12px; border: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.03); } .wpp-footer-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 5px rgba(52,211,153,.08); flex: 0 0 8px; } .wpp-footer-status strong { display: block; color: #cbd5e1; font-size: .72rem; margin-bottom: 1px; } .wpp-footer-status small { display: block; color: #64748b; font-size: .66rem; } .wpp-footer-trust-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 42px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.07); } .wpp-footer-trust-item { display: flex; align-items: center; justify-content: center; gap: 7px; color: #94a3b8; font-size: .74rem; text-align: center; } .wpp-footer-trust-item i { color: #34d399; font-size: .76rem; } .wpp-footer-cta-card { padding: 26px 28px; } @media (max-width: 991.98px) { .wpp-footer-trust-row { grid-template-columns: repeat(2, 1fr); } .wpp-footer-mini-grid { max-width: 100%; grid-template-columns: repeat(3, 1fr); } .wpp-footer-mini-card { align-items: flex-start; } } @media (max-width: 767.98px) { .wpp-footer-mini-grid { grid-template-columns: 1fr; } .wpp-footer-trust-row { grid-template-columns: 1fr 1fr; gap: 14px 8px; } .wpp-footer-trust-item { justify-content: flex-start; text-align: left; } } @media (max-width: 575.98px) { .wpp-footer-trust-row { grid-template-columns: 1fr; } .wpp-footer-cta-card { padding: 22px 18px; } }