ZexiPay
Developer platform

Build your UPI checkout

Connect a server-side integration, create a checkout and verify your first payment event.

From credentials to checkout

1. Connect an account

Link your merchant UPI account and verify the connection in your dashboard.

2. Create an order

Send your order ID and amount from your server, then share the checkout URL.

3. Receive confirmation

ZexiPay matches the payment and sends a signed webhook to your endpoint.

Generate an API key and secret under API Keys. Keep both on the server and use sandbox mode during development.

Create an order

cURL · create-order
curl https://zexipay.com/api/create-order \
  -H "X-API-Key: $ZEXIPAY_KEY" \
  -H "X-API-Secret: $ZEXIPAY_SECRET" \
  -H 'Content-Type: application/json' \
  -d '{"order_id":"shop-1042","amount":"499.00",
       "customer_name":"Sample customer"}'

Verify a webhook

Use the signing secret configured for the endpoint. Check the timestamp and signature before parsing JSON.

PHP · webhook receiver
$raw = file_get_contents('php://input');
$stamp = $_SERVER['HTTP_X_ZEXIPAY_TIMESTAMP'] ?? '';
$id = $_SERVER['HTTP_X_ZEXIPAY_EVENT_ID'] ?? '';
$sig = $_SERVER['HTTP_X_ZEXIPAY_SIGNATURE_V2'] ?? '';
$secret = getenv('ZEXIPAY_WEBHOOK_SECRET');
if (!$secret || !$id || !ctype_digit($stamp)
    || abs(time() - (int)$stamp) > 300
    || !hash_equals(hash_hmac('sha256',
        $stamp.'.'.$id.'.'.$raw, $secret), $sig)) {
    http_response_code(401);
    exit;
}
// Persist the event ID and fulfill once in one transaction.
// Acknowledge only after the transaction commits.

HTTP status codes

StatusMeaningNext step
200 / 201Order returned / createdRead data.payment_url
400 / 422Invalid inputCorrect the request fields
401 / 403Access deniedCheck server credentials
404Order not foundCheck order_id
409Order conflictRetry the original payload
429Limit reachedCheck quota and back off
503Service unavailableRetry with bounded backoff

Try the request in Postman

Import the OpenAPI specification, select Create Order and set your server credentials in a private environment.

Open specification