AniUPI Developer API Documentation

AniUPI API Documentation

Integrate payments on your website or application. Create a payment order and check its transaction status using your private API token.

Important: Keep your API token private Use the token only from your server-side code. Never place a real token in public JavaScript, mobile app source code, screenshots, or a public repository. The token shown below is a dummy example only.

Quick start

To accept a payment, follow these steps:

  1. Log in to your AniUPI merchant dashboard.
  2. Open Developers and copy your API token.
  3. Send a server-to-server POST request to Create Order API.
  4. Read result.payment_url from the successful response and redirect your customer to it.
  5. After payment, verify the order using Check Order Status API. Do not trust only the customer's browser redirect.

The API examples below use sample values. Replace them with your own order/customer values and your actual token.

Authentication & request format

POST Send parameters using application/x-www-form-urlencoded.

Use the user_token generated in your AniUPI dashboard. The token below is randomly generated sample text, not a working credential.

user_token = 7f3a91c8e2b64d05a9f17c3e8b42d610

1. Create Order API

Create a new payment order. Each order_id should be unique for your merchant account.

POST https://aniupi.in/api/create-order

Order timeout: 30 minutes. According to the supplied API documentation, an unpaid order is automatically marked failed after 30 minutes.

Request parameters

ParameterRequiredDescription
customer_mobileYesCustomer's mobile number.
user_tokenYesYour private AniUPI API token.
amountYesPayment amount, for example 1.
order_idYesYour unique order/reference ID.
redirect_urlYesURL where the customer returns after the payment flow.
remark1NoOptional reference/note.
remark2NoOptional second reference/note.
Form-encoded example
customer_mobile=9876543210&user_token=7f3a91c8e2b64d05a9f17c3e8b42d610&amount=1&order_id=ORD202611100001&redirect_url=https%3A%2F%2Fexample.com%2Fpayment-return&remark1=Website+Order&remark2=Invoice+1001

Create Order API responses

Success response

HTTP response body example
{
  "status": true,
  "message": "Order Created Successfully",
  "result": {
    "orderId": "1234561705047510",
    "payment_url": "https://aniupi.in/payment/pay.php?data=EXAMPLE_TOKEN"
  }
}

When status is true, send the customer to result.payment_url.

Failed response

Example: duplicate order ID
{
  "status": false,
  "message": "Order_id Already Exist"
}

2. Check Order Status API

Check the latest payment status from your server. Use the same merchant token and order ID that you used when creating the order.

POST https://aniupi.in/api/check-order-status

Request parameters

ParameterRequiredDescription
user_tokenYesYour private AniUPI API token.
order_idYesThe order ID generated by your system.
Form-encoded example
user_token=7f3a91c8e2b64d05a9f17c3e8b42d610&order_id=ORD202611100001

Check Order Status API responses

Success / completed response

Example based on supplied response format
{
  "status": "COMPLETED",
  "message": "Transaction Successfully",
  "result": {
    "txnStatus": "COMPLETED",
    "resultInfo": "Transaction Success",
    "orderId": "ORD202611100001",
    "status": "SUCCESS",
    "amount": "1",
    "date": "2026-11-10 13:22:08",
    "utr": "454525454245"
  }
}

Failed / error response

Generic error response example
{
  "status": "ERROR",
  "message": "Error Message"
}

A pending/failed status response may vary by API implementation. Treat only the documented final success status as paid; confirm exact status values with your AniUPI dashboard/provider before going live.

PHP cURL example

Run this code on your server, not in the customer's browser. Replace the sample token and order details.

Create order using PHP
<?php
$apiUrl = "https://aniupi.in/api/create-order";

// Keep the real token in server-side configuration/environment variables.
$userToken = "YOUR_REAL_ANIUPI_API_TOKEN";

$data = [
    "customer_mobile" => "9876543210",
    "user_token"      => $userToken,
    "amount"          => "1",
    "order_id"        => "ORD" . date("YmdHis"),
    "redirect_url"    => "https://example.com/payment-return",
    "remark1"         => "Website Order",
    "remark2"         => "Invoice 1001"
];

$ch = curl_init($apiUrl);
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => http_build_query($data),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => [
        "Content-Type: application/x-www-form-urlencoded"
    ],
    CURLOPT_TIMEOUT        => 30
]);

$response = curl_exec($ch);
if ($response === false) {
    die("API request failed: " . curl_error($ch));
}
curl_close($ch);

$result = json_decode($response, true);

if (!empty($result["status"]) && !empty($result["result"]["payment_url"])) {
    // Redirect customer to AniUPI checkout.
    header("Location: " . $result["result"]["payment_url"]);
    exit;
}

echo "Order could not be created: " .
     htmlspecialchars($result["message"] ?? "Unknown error");
?>

Common errors & integration checklist

  • Order ID already exists: generate a new unique order_id for every new payment attempt.
  • Invalid token: copy the current API token from your AniUPI Developers page; do not use the dummy token in this document.
  • Invalid amount/mobile: send the values in the format accepted by your merchant account.
  • Payment not confirmed: query Check Order Status API from your server before marking an order paid.
  • API timeout: do not create duplicate customer orders blindly; check the original order status first.
Security reminderDo not mark an order as paid based only on the redirect URL or a customer-provided screenshot. Verify the order with the status API on your backend.

This guide documents the endpoints and response examples supplied for AniUPI. Confirm any provider-specific status values, webhook behavior, and required fields with the live API before production use.