API reference
The merchant API, version 2.0.0: 20 operations on one gateway account. This page is generated from the API's own contract, so it cannot fall behind it.
The file is the whole contract in OpenAPI 3.1. Any generator that reads OpenAPI can make a client from it in your language, and every sample below is plain HTTP with nothing to install.
A key belongs to one gateway account, so no path names an account or a provider. Every request carriesAuthorization: Bearer aqk_…, every POST carries an Idempotency-Key, and every answer carries AquaPay-Request-Id. Start here covers what the operations have in common; the errors page covers every code they can answer with.
| Operation | What it does | Scope |
|---|---|---|
GET /account | The gateway account, its capabilities, limits and fees, and the calling key. | read |
GET /balance | What the account can pay out now, and what payouts in flight hold. | read |
GET /ledger | The balance journal, newest first. | read |
POST /payins | Open a pay-in and get what to show the payer. | payins:write |
GET /payins | Pay-ins, newest first. Filter by status or by your reference. | read |
GET /payins/{payinId} | One pay-in, as AquaPay has it recorded. | read |
POST /payins/{payinId}/refresh | Ask the provider about the pay-in now, and apply what it says. | read |
POST /payins/{payinId}/bind-utr | Give the provider the UTR the payer reports, so it can match the payment. | payins:write |
GET /payouts/quote | The fee and total debit for a payout amount, and whether the balance covers it now. | read |
POST /payouts | Send money to a bank account, a UPI VPA or a UPay wallet. | payouts:write and the payment password |
GET /payouts | Payouts, newest first. Filter by status or by your reference. | read |
GET /payouts/{payoutId} | One payout, as AquaPay has it recorded. | read |
POST /payouts/{payoutId}/refresh | Ask the provider about the payout now, and apply what it says. | read |
GET /payout-attempts/{attemptKey} | What became of a payout attempt key. | read |
POST /payout-attempts/{attemptKey}/close | Retire an attempt key that created nothing, so it never can. | payouts:write |
GET /events | The account's events, oldest first, for polling. | read |
GET /webhook-endpoints | The account's webhook endpoints (at most three). | read |
POST /webhook-endpoints | Add an HTTPS endpoint. The signing secret is in this answer only. | webhooks:write and the payment password |
DELETE /webhook-endpoints/{endpointId} | Stop delivering to an endpoint. | webhooks:write and the payment password |
POST /webhook-endpoints/{endpointId}/rotate-secret | Replace an endpoint's signing secret, with 24 hours of overlap. | webhooks:write and the payment password |
Account, balance and ledger
The gateway account the key belongs to, its balance and its ledger.
The gateway account, its capabilities, limits and fees, and the calling key.
GET/account
Everything an integration needs to decide what to offer: whether pay-ins and payouts are enabled, the payout
methods, limits and fees in force, whether amounts must be whole, whether UTR binding works, and whether
this key must send the payment password. Scope read.
Answers
curl https://api.bhimpay.online/api/v2/account \
-H "Authorization: Bearer $AQUAPAY_API_KEY"const response = await fetch("https://api.bhimpay.online/api/v2/account", {
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
},
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import requests
response = requests.get(
"https://api.bhimpay.online/api/v2/account",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/account");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}req, err := http.NewRequest("GET", "https://api.bhimpay.online/api/v2/account", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/account"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"id": "ga_3k9d2m7q1x8vb",
"name": "Example Store · COWPAY",
"mode": "live",
"status": "active",
"provider": "cowpay",
"currency": "INR",
"wholeUnitsOnly": true,
"payins": {
"enabled": true,
"limits": {
"min": "100.00",
"max": "50000.00"
},
"fee": {
"percent": "2.5",
"fixed": "0.00"
},
"utrBinding": true,
"payerIpRequired": true
},
"payouts": {
"enabled": true,
"methods": [
"bank",
"upi"
],
"limits": {
"min": "100.00",
"max": "25000.00"
},
"fee": {
"percent": "1",
"fixed": "0.00"
},
"paymentPasswordRequired": true
},
"key": {
"id": "kid_p9w3k7e1y5t2r",
"name": "store-backend",
"scopes": [
"read",
"payins:write",
"payouts:write",
"webhooks:write"
],
"ipAllowlist": [
"13.234.10.21/32"
],
"expiresAt": null
}
}What the account can pay out now, and what payouts in flight hold.
GET/balance
Scope read.
Answers
curl https://api.bhimpay.online/api/v2/balance \
-H "Authorization: Bearer $AQUAPAY_API_KEY"const response = await fetch("https://api.bhimpay.online/api/v2/balance", {
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
},
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import requests
response = requests.get(
"https://api.bhimpay.online/api/v2/balance",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/balance");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}req, err := http.NewRequest("GET", "https://api.bhimpay.online/api/v2/balance", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/balance"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"currency": "INR",
"available": "184250.00",
"held": "15150.00",
"asOf": "2026-12-03T09:20:00Z"
}The balance journal, newest first.
GET/ledger
Every change to the balance, signed. The balance is the sum of the entries. Scope read.
Parameters
cursorstringin queryThenextCursorof the previous page. Opaque.limitintegerin queryDefault 25.
Answers
curl https://api.bhimpay.online/api/v2/ledger \
-H "Authorization: Bearer $AQUAPAY_API_KEY"const response = await fetch("https://api.bhimpay.online/api/v2/ledger", {
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
},
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import requests
response = requests.get(
"https://api.bhimpay.online/api/v2/ledger",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/ledger");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}req, err := http.NewRequest("GET", "https://api.bhimpay.online/api/v2/ledger", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/ledger"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"items": [
{
"id": "entry_m5n1b7v3c9x2z",
"type": "payout_hold",
"amount": "-1515.00",
"balanceAfter": "184250.00",
"paymentId": "payout_c8n4r2v6y0jd5",
"note": null,
"createdAt": "2026-12-03T09:18:41Z"
},
{
"id": "entry_k2j8h4g6f1d3s",
"type": "fee",
"amount": "-12.50",
"balanceAfter": "185765.00",
"paymentId": "payin_7h2kq9w3m1zt4",
"note": null,
"createdAt": "2026-12-03T09:15:07Z"
},
{
"id": "entry_w9e3r7t1y5q2a",
"type": "payin_credit",
"amount": "500.00",
"balanceAfter": "185777.50",
"paymentId": "payin_7h2kq9w3m1zt4",
"note": null,
"createdAt": "2026-12-03T09:15:07Z"
}
],
"nextCursor": "c1.eyJ0IjoiMjAyNi0xMi0wM1QwOToxNTowN1oiLCJpIjo4ODQxMn0"
}Pay-ins
Money in from a payer.
Open a pay-in and get what to show the payer.
POST/payins
AquaPay records the pay-in, then asks the provider for an order. On success the pay-in is pending and
nextAction holds the payment page URL and, where the provider gives one, a UPI intent URI. Scope
payins:write.
amountmust lie withinpayins.limits, and be whole whenwholeUnitsOnlyis true (PAYME, COWPAY).currencymust equal the account’s currency.payer.ipis required whenpayins.payerIpRequiredis true (COWPAY).
A provider refusal (422 provider_refused) or a request that never reached the provider
(424 provider_unreachable) leaves the pay-in failed. An unclear provider answer
(502 provider_outcome_unknown) leaves it pending with no nextAction; it expires on its own, and opening a
new pay-in with a new key is safe because the payer was shown nothing. Each of these bodies carries the pay-in
as details.payin.
Parameters
Idempotency-Keystringin headerrequiredMakes a retry safe. OnPOST /payoutsit is also the payout’s permanent attempt key.
Body: CreatePayinRequest
amountstring (money)requiredA positive amount with at most two decimals.currencystringrequiredISO 4217, the currency of the account’s gateway. Every account isINRtoday. One ofINR,USD.referencestringrequiredYour id for the order. Not unique: a retried order may reuse it.payerobjectrequiredidstringrequiredYour id for the payer. Providers use it for risk checks.ipstringThe payer’s public IPv4 or IPv6 address. Required whenpayins.payerIpRequired.
returnUrlstring (URL)requiredWhere the payment page sends the payer afterwards.
Answers
- 201PayinThe pay-in,
pending. - 400
validation_failed - 401
api_key_invalidpayment_password_requiredpayment_password_invalid - 403
ip_not_allowedscope_missingaccount_suspended - 409
idempotency_conflictidempotency_key_busyduplicate_referenceattempt_closedbalance_insufficientwrong_stateutr_in_use - 422
unsupported_by_providerprovider_refused - 424
provider_unreachable - 429
too_many_requests - 500
server_error - 502
provider_outcome_unknown - 503
service_unavailable
curl -X POST https://api.bhimpay.online/api/v2/payins \
-H "Authorization: Bearer $AQUAPAY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"amount": "500",
"currency": "INR",
"reference": "DEP-20261203-0042",
"payer": {
"id": "player-88123",
"ip": "103.21.4.9"
},
"returnUrl": "https://store.example/deposit/return"
}'const response = await fetch("https://api.bhimpay.online/api/v2/payins", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"amount": "500",
"currency": "INR",
"reference": "DEP-20261203-0042",
"payer": {
"id": "player-88123",
"ip": "103.21.4.9"
},
"returnUrl": "https://store.example/deposit/return"
}),
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import uuid
import requests
response = requests.post(
"https://api.bhimpay.online/api/v2/payins",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"amount": "500",
"currency": "INR",
"reference": "DEP-20261203-0042",
"payer": {
"id": "player-88123",
"ip": "103.21.4.9",
},
"returnUrl": "https://store.example/deposit/return",
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/payins");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
"Idempotency-Key: " . bin2hex(random_bytes(16)),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"amount" => "500",
"currency" => "INR",
"reference" => "DEP-20261203-0042",
"payer" => [
"id" => "player-88123",
"ip" => "103.21.4.9",
],
"returnUrl" => "https://store.example/deposit/return",
]),
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}body := strings.NewReader(`{
"amount": "500",
"currency": "INR",
"reference": "DEP-20261203-0042",
"payer": {
"id": "player-88123",
"ip": "103.21.4.9"
},
"returnUrl": "https://store.example/deposit/return"
}`)
req, err := http.NewRequest("POST", "https://api.bhimpay.online/api/v2/payins", body)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
key := make([]byte, 16)
rand.Read(key) // crypto/rand
req.Header.Set("Idempotency-Key", hex.EncodeToString(key))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/payins"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.header("Idempotency-Key", UUID.randomUUID().toString())
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"amount": "500",
"currency": "INR",
"reference": "DEP-20261203-0042",
"payer": {
"id": "player-88123",
"ip": "103.21.4.9"
},
"returnUrl": "https://store.example/deposit/return"
}"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"id": "payin_7h2kq9w3m1zt4",
"reference": "DEP-20261203-0042",
"status": "pending",
"amount": "500.00",
"paidAmount": null,
"currency": "INR",
"fee": "12.50",
"net": "487.50",
"utr": null,
"orderId": "AQD2612030915000042",
"providerOrderId": "CP88123409",
"nextAction": {
"redirectUrl": "https://pay.cowpay.example/c/CP88123409",
"upiUri": "upi://pay?pa=cowpay.col@ybl&pn=COWPAY&am=500.00&tr=CP88123409&cu=INR"
},
"expiresAt": "2026-12-03T11:15:00Z",
"failure": null,
"version": 1,
"createdAt": "2026-12-03T09:15:00Z",
"updatedAt": "2026-12-03T09:15:00Z"
}Pay-ins, newest first. Filter by status or by your reference.
GET/payins
reference finds every pay-in opened with that reference, newest first: this is the lookup by merchant
reference. Answers come from AquaPay’s records; use POST /payins/{payinId}/refresh to ask the provider.
Scope read.
Parameters
cursorstringin queryThenextCursorof the previous page. Opaque.limitintegerin queryDefault 25.statusstringin querypending(waiting for the payer) →succeeded|failed|expired|needs_review.failedandexpiredcan still becomesucceeded(orneeds_review) on the provider’s proof of a late payment.needs_reviewis resolved by AquaPay staff tosucceededorfailed.succeededis final.referencestringin queryYour reference, matched exactly.
Answers
curl https://api.bhimpay.online/api/v2/payins \
-H "Authorization: Bearer $AQUAPAY_API_KEY"const response = await fetch("https://api.bhimpay.online/api/v2/payins", {
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
},
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import requests
response = requests.get(
"https://api.bhimpay.online/api/v2/payins",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/payins");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}req, err := http.NewRequest("GET", "https://api.bhimpay.online/api/v2/payins", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/payins"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"items": [
{
"id": "payin_7h2kq9w3m1zt4",
"reference": "DEP-20261203-0042",
"status": "succeeded",
"amount": "500.00",
"paidAmount": "500.00",
"currency": "INR",
"fee": "12.50",
"net": "487.50",
"utr": "416512345678",
"orderId": "AQD2612030915000042",
"providerOrderId": "CP88123409",
"nextAction": null,
"expiresAt": "2026-12-03T11:15:00Z",
"failure": null,
"version": 3,
"createdAt": "2026-12-03T09:15:00Z",
"updatedAt": "2026-12-03T09:15:07Z"
}
],
"nextCursor": null
}One pay-in, as AquaPay has it recorded.
GET/payins/{payinId}
Scope read.
Parameters
payinIdstringin pathrequired
Answers
curl https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4 \
-H "Authorization: Bearer $AQUAPAY_API_KEY"const response = await fetch("https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4", {
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
},
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import requests
response = requests.get(
"https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}req, err := http.NewRequest("GET", "https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"id": "payin_7h2kq9w3m1zt4",
"reference": "DEP-20261203-0042",
"status": "succeeded",
"amount": "500.00",
"paidAmount": "500.00",
"currency": "INR",
"fee": "12.50",
"net": "487.50",
"utr": "416512345678",
"orderId": "AQD2612030915000042",
"providerOrderId": "CP88123409",
"nextAction": null,
"expiresAt": "2026-12-03T11:15:00Z",
"failure": null,
"version": 3,
"createdAt": "2026-12-03T09:15:00Z",
"updatedAt": "2026-12-03T09:15:07Z"
}Ask the provider about the pay-in now, and apply what it says.
POST/payins/{payinId}/refresh
Applies the provider’s answer under the same rules as a provider callback, and sends the webhook if the status
changed. A pay-in checked with the provider in the last 10 seconds is answered from the record without a new
provider call. Works on expired pay-ins too, which is how a late payment is found. Scope read.
A provider that cannot be asked answers 424 provider_unreachable with retry: same_key; nothing changed.
Parameters
payinIdstringin pathrequiredIdempotency-Keystringin headerrequiredMakes a retry safe. OnPOST /payoutsit is also the payout’s permanent attempt key.
Answers
- 200PayinThe pay-in after the check.
- 400
validation_failed - 401
api_key_invalidpayment_password_requiredpayment_password_invalid - 403
ip_not_allowedscope_missingaccount_suspended - 404
resource_not_found - 409
idempotency_conflictidempotency_key_busyduplicate_referenceattempt_closedbalance_insufficientwrong_stateutr_in_use - 424
provider_unreachable - 429
too_many_requests - 500
server_error
curl -X POST https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4/refresh \
-H "Authorization: Bearer $AQUAPAY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"const response = await fetch("https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4/refresh", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
},
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import uuid
import requests
response = requests.post(
"https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4/refresh",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4/refresh");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
"Idempotency-Key: " . bin2hex(random_bytes(16)),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}req, err := http.NewRequest("POST", "https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4/refresh", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
key := make([]byte, 16)
rand.Read(key) // crypto/rand
req.Header.Set("Idempotency-Key", hex.EncodeToString(key))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4/refresh"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.header("Idempotency-Key", UUID.randomUUID().toString())
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"id": "payin_7h2kq9w3m1zt4",
"reference": "DEP-20261203-0042",
"status": "succeeded",
"amount": "500.00",
"paidAmount": "500.00",
"currency": "INR",
"fee": "12.50",
"net": "487.50",
"utr": "416512345678",
"orderId": "AQD2612030915000042",
"providerOrderId": "CP88123409",
"nextAction": null,
"expiresAt": "2026-12-03T11:15:00Z",
"failure": null,
"version": 3,
"createdAt": "2026-12-03T09:15:00Z",
"updatedAt": "2026-12-03T09:15:07Z"
}Give the provider the UTR the payer reports, so it can match the payment.
POST/payins/{payinId}/bind-utr
For a pending, failed or expired pay-in on a provider with payins.utrBinding (PAYME, COWPAY). AquaPay
sends the UTR to the provider, then refreshes the pay-in. A UTR is bound to at most one pay-in of the account,
ever (409 utr_in_use). A provider that refuses the UTR answers 422 provider_refused with the pay-in
unchanged in details.payin. Scope payins:write.
Parameters
payinIdstringin pathrequiredIdempotency-Keystringin headerrequiredMakes a retry safe. OnPOST /payoutsit is also the payout’s permanent attempt key.
Body: BindUtrRequest
utrstringrequiredThe 12-digit UTR from the payer’s bank or UPI app.
Answers
- 200PayinThe pay-in after binding and the follow-up check.
- 400
validation_failed - 401
api_key_invalidpayment_password_requiredpayment_password_invalid - 403
ip_not_allowedscope_missingaccount_suspended - 404
resource_not_found - 409
idempotency_conflictidempotency_key_busyduplicate_referenceattempt_closedbalance_insufficientwrong_stateutr_in_use - 422
unsupported_by_providerprovider_refused - 424
provider_unreachable - 429
too_many_requests - 500
server_error
curl -X POST https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4/bind-utr \
-H "Authorization: Bearer $AQUAPAY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"utr": "416512345678"
}'const response = await fetch("https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4/bind-utr", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"utr": "416512345678"
}),
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import uuid
import requests
response = requests.post(
"https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4/bind-utr",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"utr": "416512345678",
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4/bind-utr");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
"Idempotency-Key: " . bin2hex(random_bytes(16)),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"utr" => "416512345678",
]),
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}body := strings.NewReader(`{
"utr": "416512345678"
}`)
req, err := http.NewRequest("POST", "https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4/bind-utr", body)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
key := make([]byte, 16)
rand.Read(key) // crypto/rand
req.Header.Set("Idempotency-Key", hex.EncodeToString(key))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/payins/payin_7h2kq9w3m1zt4/bind-utr"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.header("Idempotency-Key", UUID.randomUUID().toString())
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"utr": "416512345678"
}"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"id": "payin_7h2kq9w3m1zt4",
"reference": "DEP-20261203-0042",
"status": "succeeded",
"amount": "500.00",
"paidAmount": "500.00",
"currency": "INR",
"fee": "12.50",
"net": "487.50",
"utr": "416512345678",
"orderId": "AQD2612030915000042",
"providerOrderId": "CP88123409",
"nextAction": null,
"expiresAt": "2026-12-03T11:15:00Z",
"failure": null,
"version": 3,
"createdAt": "2026-12-03T09:15:00Z",
"updatedAt": "2026-12-03T09:15:07Z"
}Payouts
Money out to a beneficiary.
The fee and total debit for a payout amount, and whether the balance covers it now.
GET/payouts/quote
Pure arithmetic on the account’s fees and balance; nothing is reserved. total is what creation would debit
(amount + fee). An amount outside payouts.limits or not whole where it must be is 400 validation_failed.
Scope read.
Parameters
amountstring (money)in queryrequiredA positive amount with at most two decimals.
Answers
curl "https://api.bhimpay.online/api/v2/payouts/quote?amount=1500" \
-H "Authorization: Bearer $AQUAPAY_API_KEY"const response = await fetch("https://api.bhimpay.online/api/v2/payouts/quote?amount=1500", {
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
},
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import requests
response = requests.get(
"https://api.bhimpay.online/api/v2/payouts/quote?amount=1500",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/payouts/quote?amount=1500");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}req, err := http.NewRequest("GET", "https://api.bhimpay.online/api/v2/payouts/quote?amount=1500", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/payouts/quote?amount=1500"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"amount": "1500.00",
"fee": "15.00",
"total": "1515.00",
"currency": "INR",
"sufficientBalance": true
}Send money to a bank account, a UPI VPA or a UPay wallet.
POST/payouts
Money safety, in order:
- Under the account’s lock, AquaPay checks the balance, the reference and the attempt key, and writes the
payout
processing, holdingtotal, before anything is sent. - Then it calls the provider once. The
Idempotency-Keyis the payout’s attempt key: it reaches a provider at most once, ever. - A definite refusal fails the payout and releases the hold:
422 provider_refused, or424 provider_unreachablewhen the request provably never left. Send a corrected payout with a new key. - Anything unclear (a timeout, a
5xx, an unreadable answer) keeps the payoutprocessingwith the amount held:502 provider_outcome_unknown,retry: refresh. Never create it again; refresh it or wait for its webhook.
Each of these bodies carries the payout as details.payout. Needs scope payouts:write and the payment
password.
beneficiary.type must be one of payouts.methods. reference must not be held by another payout that is
still processing, succeeded or needs_review (409 duplicate_reference); a failed payout’s reference may
be reused.
Parameters
Idempotency-Keystringin headerrequiredMakes a retry safe. OnPOST /payoutsit is also the payout’s permanent attempt key.AquaPay-Payment-Passwordstringin headerThe gateway account’s payment password, typed by the person approving the action. Required on payout creation and on webhook endpoint changes; checked whenever it is sent. Never logged or stored by AquaPay.
Body: CreatePayoutRequest
amountstring (money)requiredWhat the beneficiary receives. The fee is debited on top.currencystringrequiredISO 4217, the currency of the account’s gateway. Every account isINRtoday. One ofINR,USD.referencestringrequiredYour id for the withdrawal.beneficiaryBankBeneficiary, UpiBeneficiary or UpayWalletBeneficiaryrequiredWhere a payout goes.typemust be one of the account’spayouts.methods.narrationstringThe remark sent to the provider. Defaults to “Payout”.
Answers
- 200PayoutA repeat of a payout request whose stored answer has expired (after 24 hours); the payout as it stands now.
- 201PayoutThe payout,
processing(rarely alreadysucceeded). - 400
validation_failed - 401
api_key_invalidpayment_password_requiredpayment_password_invalid - 403
ip_not_allowedscope_missingaccount_suspended - 409
idempotency_conflictidempotency_key_busyduplicate_referenceattempt_closedbalance_insufficientwrong_stateutr_in_use - 422
unsupported_by_providerprovider_refused - 423
payment_password_locked - 424
provider_unreachable - 429
too_many_requests - 500
server_error - 502
provider_outcome_unknown - 503
service_unavailable
curl -X POST https://api.bhimpay.online/api/v2/payouts \
-H "Authorization: Bearer $AQUAPAY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "AquaPay-Payment-Password: $AQUAPAY_PAYMENT_PASSWORD" \
-H "Content-Type: application/json" \
-d '{
"amount": "1500",
"currency": "INR",
"reference": "WD-20261203-7781",
"beneficiary": {
"type": "bank",
"name": "Ravi Kumar",
"accountNumber": "50100123456789",
"ifsc": "HDFC0001234"
},
"narration": "Payout from Example Store"
}'const response = await fetch("https://api.bhimpay.online/api/v2/payouts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"AquaPay-Payment-Password": process.env.AQUAPAY_PAYMENT_PASSWORD,
"Content-Type": "application/json",
},
body: JSON.stringify({
"amount": "1500",
"currency": "INR",
"reference": "WD-20261203-7781",
"beneficiary": {
"type": "bank",
"name": "Ravi Kumar",
"accountNumber": "50100123456789",
"ifsc": "HDFC0001234"
},
"narration": "Payout from Example Store"
}),
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import uuid
import requests
response = requests.post(
"https://api.bhimpay.online/api/v2/payouts",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
"AquaPay-Payment-Password": os.environ["AQUAPAY_PAYMENT_PASSWORD"],
},
json={
"amount": "1500",
"currency": "INR",
"reference": "WD-20261203-7781",
"beneficiary": {
"type": "bank",
"name": "Ravi Kumar",
"accountNumber": "50100123456789",
"ifsc": "HDFC0001234",
},
"narration": "Payout from Example Store",
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/payouts");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
"Idempotency-Key: " . bin2hex(random_bytes(16)),
"AquaPay-Payment-Password: " . getenv("AQUAPAY_PAYMENT_PASSWORD"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"amount" => "1500",
"currency" => "INR",
"reference" => "WD-20261203-7781",
"beneficiary" => [
"type" => "bank",
"name" => "Ravi Kumar",
"accountNumber" => "50100123456789",
"ifsc" => "HDFC0001234",
],
"narration" => "Payout from Example Store",
]),
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}body := strings.NewReader(`{
"amount": "1500",
"currency": "INR",
"reference": "WD-20261203-7781",
"beneficiary": {
"type": "bank",
"name": "Ravi Kumar",
"accountNumber": "50100123456789",
"ifsc": "HDFC0001234"
},
"narration": "Payout from Example Store"
}`)
req, err := http.NewRequest("POST", "https://api.bhimpay.online/api/v2/payouts", body)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
key := make([]byte, 16)
rand.Read(key) // crypto/rand
req.Header.Set("Idempotency-Key", hex.EncodeToString(key))
req.Header.Set("AquaPay-Payment-Password", os.Getenv("AQUAPAY_PAYMENT_PASSWORD"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/payouts"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.header("Idempotency-Key", UUID.randomUUID().toString())
.header("AquaPay-Payment-Password", System.getenv("AQUAPAY_PAYMENT_PASSWORD"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"amount": "1500",
"currency": "INR",
"reference": "WD-20261203-7781",
"beneficiary": {
"type": "bank",
"name": "Ravi Kumar",
"accountNumber": "50100123456789",
"ifsc": "HDFC0001234"
},
"narration": "Payout from Example Store"
}"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"id": "payout_c8n4r2v6y0jd5",
"reference": "WD-20261203-7781",
"attemptKey": "9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70",
"status": "succeeded",
"amount": "1500.00",
"fee": "15.00",
"total": "1515.00",
"currency": "INR",
"beneficiary": {
"type": "bank",
"name": "Ravi Kumar",
"masked": "••••6789"
},
"utr": "633712004455",
"orderId": "AQW2612030918000781",
"providerOrderId": "CPW55012",
"failure": null,
"version": 3,
"createdAt": "2026-12-03T09:18:41Z",
"updatedAt": "2026-12-03T09:19:55Z"
}Payouts, newest first. Filter by status or by your reference.
GET/payouts
Answers come from AquaPay’s records. Scope read.
Parameters
cursorstringin queryThenextCursorof the previous page. Opaque.limitintegerin queryDefault 25.statusstringin queryprocessing(recorded, amount held, at or on its way to the provider) →succeeded|failed|needs_review.succeeded→reversedonly on the provider’s own word.needs_review(still held) is resolved by AquaPay staff tosucceeded,failedorreversed.failedandreversedare final.referencestringin queryYour reference, matched exactly.
Answers
curl https://api.bhimpay.online/api/v2/payouts \
-H "Authorization: Bearer $AQUAPAY_API_KEY"const response = await fetch("https://api.bhimpay.online/api/v2/payouts", {
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
},
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import requests
response = requests.get(
"https://api.bhimpay.online/api/v2/payouts",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/payouts");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}req, err := http.NewRequest("GET", "https://api.bhimpay.online/api/v2/payouts", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/payouts"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"items": [
{
"id": "payout_c8n4r2v6y0jd5",
"reference": "WD-20261203-7781",
"attemptKey": "9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70",
"status": "processing",
"amount": "1500.00",
"fee": "15.00",
"total": "1515.00",
"currency": "INR",
"beneficiary": {
"type": "bank",
"name": "Ravi Kumar",
"masked": "••••6789"
},
"utr": null,
"orderId": "AQW2612030918000781",
"providerOrderId": "CPW55012",
"failure": null,
"version": 2,
"createdAt": "2026-12-03T09:18:41Z",
"updatedAt": "2026-12-03T09:18:42Z"
}
],
"nextCursor": "c1.eyJ0IjoiMjAyNi0xMi0wM1QwOToxODo0MVoiLCJpIjo0MjE3fQ"
}One payout, as AquaPay has it recorded.
GET/payouts/{payoutId}
Scope read.
Parameters
payoutIdstringin pathrequired
Answers
curl https://api.bhimpay.online/api/v2/payouts/payout_c8n4r2v6y0jd5 \
-H "Authorization: Bearer $AQUAPAY_API_KEY"const response = await fetch("https://api.bhimpay.online/api/v2/payouts/payout_c8n4r2v6y0jd5", {
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
},
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import requests
response = requests.get(
"https://api.bhimpay.online/api/v2/payouts/payout_c8n4r2v6y0jd5",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/payouts/payout_c8n4r2v6y0jd5");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}req, err := http.NewRequest("GET", "https://api.bhimpay.online/api/v2/payouts/payout_c8n4r2v6y0jd5", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/payouts/payout_c8n4r2v6y0jd5"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"id": "payout_c8n4r2v6y0jd5",
"reference": "WD-20261203-7781",
"attemptKey": "9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70",
"status": "succeeded",
"amount": "1500.00",
"fee": "15.00",
"total": "1515.00",
"currency": "INR",
"beneficiary": {
"type": "bank",
"name": "Ravi Kumar",
"masked": "••••6789"
},
"utr": "633712004455",
"orderId": "AQW2612030918000781",
"providerOrderId": "CPW55012",
"failure": null,
"version": 3,
"createdAt": "2026-12-03T09:18:41Z",
"updatedAt": "2026-12-03T09:19:55Z"
}Ask the provider about the payout now, and apply what it says.
POST/payouts/{payoutId}/refresh
Applies only the provider’s evidence about this exact order: an answer that names another order, or no order,
changes nothing. A paid payout is reversed only by the provider’s own word about it. A payout checked in the
last 10 seconds is answered from the record. Scope read.
Parameters
payoutIdstringin pathrequiredIdempotency-Keystringin headerrequiredMakes a retry safe. OnPOST /payoutsit is also the payout’s permanent attempt key.
Answers
- 200PayoutThe payout after the check.
- 400
validation_failed - 401
api_key_invalidpayment_password_requiredpayment_password_invalid - 403
ip_not_allowedscope_missingaccount_suspended - 404
resource_not_found - 409
idempotency_conflictidempotency_key_busyduplicate_referenceattempt_closedbalance_insufficientwrong_stateutr_in_use - 424
provider_unreachable - 429
too_many_requests - 500
server_error
curl -X POST https://api.bhimpay.online/api/v2/payouts/payout_c8n4r2v6y0jd5/refresh \
-H "Authorization: Bearer $AQUAPAY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"const response = await fetch("https://api.bhimpay.online/api/v2/payouts/payout_c8n4r2v6y0jd5/refresh", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
},
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import uuid
import requests
response = requests.post(
"https://api.bhimpay.online/api/v2/payouts/payout_c8n4r2v6y0jd5/refresh",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/payouts/payout_c8n4r2v6y0jd5/refresh");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
"Idempotency-Key: " . bin2hex(random_bytes(16)),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}req, err := http.NewRequest("POST", "https://api.bhimpay.online/api/v2/payouts/payout_c8n4r2v6y0jd5/refresh", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
key := make([]byte, 16)
rand.Read(key) // crypto/rand
req.Header.Set("Idempotency-Key", hex.EncodeToString(key))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/payouts/payout_c8n4r2v6y0jd5/refresh"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.header("Idempotency-Key", UUID.randomUUID().toString())
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"id": "payout_c8n4r2v6y0jd5",
"reference": "WD-20261203-7781",
"attemptKey": "9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70",
"status": "succeeded",
"amount": "1500.00",
"fee": "15.00",
"total": "1515.00",
"currency": "INR",
"beneficiary": {
"type": "bank",
"name": "Ravi Kumar",
"masked": "••••6789"
},
"utr": "633712004455",
"orderId": "AQW2612030918000781",
"providerOrderId": "CPW55012",
"failure": null,
"version": 3,
"createdAt": "2026-12-03T09:18:41Z",
"updatedAt": "2026-12-03T09:19:55Z"
}What became of a payout attempt key.
GET/payout-attempts/{attemptKey}
used with its payout, closed (retired; it can never create a payout) or unused (AquaPay never saw it).
The answer after a lost or timed-out create call. Scope read.
Parameters
attemptKeystringin pathrequiredTheIdempotency-Keya payout was (or would be) created with.
Answers
curl https://api.bhimpay.online/api/v2/payout-attempts/9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70 \
-H "Authorization: Bearer $AQUAPAY_API_KEY"const response = await fetch("https://api.bhimpay.online/api/v2/payout-attempts/9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70", {
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
},
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import requests
response = requests.get(
"https://api.bhimpay.online/api/v2/payout-attempts/9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/payout-attempts/9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}req, err := http.NewRequest("GET", "https://api.bhimpay.online/api/v2/payout-attempts/9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/payout-attempts/9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"key": "9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70",
"state": "used",
"payout": {
"id": "payout_c8n4r2v6y0jd5",
"reference": "WD-20261203-7781",
"attemptKey": "9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70",
"status": "processing",
"amount": "1500.00",
"fee": "15.00",
"total": "1515.00",
"currency": "INR",
"beneficiary": {
"type": "bank",
"name": "Ravi Kumar",
"masked": "••••6789"
},
"utr": null,
"orderId": "AQW2612030918000781",
"providerOrderId": "CPW55012",
"failure": null,
"version": 2,
"createdAt": "2026-12-03T09:18:41Z",
"updatedAt": "2026-12-03T09:18:42Z"
}
}Retire an attempt key that created nothing, so it never can.
POST/payout-attempts/{attemptKey}/close
Under the same lock payout creation takes: if the key already created a payout, the answer is used with that
payout and nothing changes; otherwise the key is retired for good and the answer is closed. A later create
with it is 409 attempt_closed. Closing is how a client that lost a create call proves that no payout will
appear, before it tries again with a new key. Scope payouts:write.
Parameters
attemptKeystringin pathrequiredTheIdempotency-Keya payout was (or would be) created with.Idempotency-Keystringin headerrequiredMakes a retry safe. OnPOST /payoutsit is also the payout’s permanent attempt key.
Answers
- 200PayoutAttemptThe attempt after closing.
- 400
validation_failed - 401
api_key_invalidpayment_password_requiredpayment_password_invalid - 403
ip_not_allowedscope_missingaccount_suspended - 409
idempotency_conflictidempotency_key_busyduplicate_referenceattempt_closedbalance_insufficientwrong_stateutr_in_use - 429
too_many_requests - 500
server_error - 503
service_unavailable
curl -X POST https://api.bhimpay.online/api/v2/payout-attempts/9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70/close \
-H "Authorization: Bearer $AQUAPAY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"const response = await fetch("https://api.bhimpay.online/api/v2/payout-attempts/9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70/close", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
},
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import uuid
import requests
response = requests.post(
"https://api.bhimpay.online/api/v2/payout-attempts/9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70/close",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/payout-attempts/9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70/close");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
"Idempotency-Key: " . bin2hex(random_bytes(16)),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}req, err := http.NewRequest("POST", "https://api.bhimpay.online/api/v2/payout-attempts/9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70/close", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
key := make([]byte, 16)
rand.Read(key) // crypto/rand
req.Header.Set("Idempotency-Key", hex.EncodeToString(key))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/payout-attempts/9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70/close"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.header("Idempotency-Key", UUID.randomUUID().toString())
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"key": "9b2f61c4-7d0e-4a8b-b3f5-2c6e8a1d4f70",
"state": "closed",
"payout": null
}Events
The webhook stream, for polling.
The account's events, oldest first, for polling.
GET/events
The same events the webhooks deliver, kept for 30 days. Unlike the other lists this one runs oldest first,
and nextCursor is never null: store it and poll again with it to get only newer events. Without a cursor the
list starts at the oldest event kept. Scope read.
With wait, a page that would be empty is held open until an event arrives or wait seconds pass: a long
poll, which follows the stream as it happens without a public endpoint.
Parameters
cursorstringin queryThenextCursorof the previous page. Opaque.limitintegerin queryDefault 25.waitintegerin querySeconds to hold an empty page open for the next event (0 to 30; 0 answers at once). Default 0.
Answers
curl https://api.bhimpay.online/api/v2/events \
-H "Authorization: Bearer $AQUAPAY_API_KEY"const response = await fetch("https://api.bhimpay.online/api/v2/events", {
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
},
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import requests
response = requests.get(
"https://api.bhimpay.online/api/v2/events",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/events");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}req, err := http.NewRequest("GET", "https://api.bhimpay.online/api/v2/events", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/events"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"items": [
{
"id": "event_q2w8e5r1t7y3v",
"type": "payin.succeeded",
"mode": "live",
"account": "ga_3k9d2m7q1x8vb",
"createdAt": "2026-12-03T09:15:07Z",
"data": {
"id": "payin_7h2kq9w3m1zt4",
"reference": "DEP-20261203-0042",
"status": "succeeded",
"amount": "500.00",
"paidAmount": "500.00",
"currency": "INR",
"fee": "12.50",
"net": "487.50",
"utr": "416512345678",
"orderId": "AQD2612030915000042",
"providerOrderId": "CP88123409",
"nextAction": null,
"expiresAt": "2026-12-03T11:15:00Z",
"failure": null,
"version": 3,
"createdAt": "2026-12-03T09:15:00Z",
"updatedAt": "2026-12-03T09:15:07Z"
}
}
],
"nextCursor": "e1.88412"
}Webhook endpoints
Where events are delivered.
The account's webhook endpoints (at most three).
GET/webhook-endpoints
Scope read. Signing secrets are never returned here.
Answers
curl https://api.bhimpay.online/api/v2/webhook-endpoints \
-H "Authorization: Bearer $AQUAPAY_API_KEY"const response = await fetch("https://api.bhimpay.online/api/v2/webhook-endpoints", {
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
},
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import requests
response = requests.get(
"https://api.bhimpay.online/api/v2/webhook-endpoints",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/webhook-endpoints");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}req, err := http.NewRequest("GET", "https://api.bhimpay.online/api/v2/webhook-endpoints", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/webhook-endpoints"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"items": [
{
"id": "hook_a4s8d2f6g0h3j",
"url": "https://api.store.example/aquapay/webhooks/COWPAY_MAIN",
"description": "Example Store backend",
"eventTypes": [],
"createdAt": "2026-12-03T08:00:00Z",
"secretRotatedAt": null
}
]
}Add an HTTPS endpoint. The signing secret is in this answer only.
POST/webhook-endpoints
An endpoint receives every event of the account, or only the eventTypes it names. The URL must be https,
public, without credentials or a fragment, and not already registered on the account; an account has at most
three. Needs scope webhooks:write and the payment password.
Parameters
Idempotency-Keystringin headerrequiredMakes a retry safe. OnPOST /payoutsit is also the payout’s permanent attempt key.AquaPay-Payment-Passwordstringin headerThe gateway account’s payment password, typed by the person approving the action. Required on payout creation and on webhook endpoint changes; checked whenever it is sent. Never logged or stored by AquaPay.
Body: CreateWebhookEndpointRequest
urlstring (URL)requireddescriptionstringeventTypesarray of stringThe event types to receive; empty or absent is every type. One ofpayin.succeeded,payin.failed,payin.expired,payin.needs_review,payout.succeeded,payout.failed,payout.needs_review,payout.reversed.
Answers
- 201WebhookEndpointWithSecretThe endpoint and its signing secret, shown once.
- 400
validation_faileduniquemax - 401
api_key_invalidpayment_password_requiredpayment_password_invalid - 403
ip_not_allowedscope_missingaccount_suspended - 409
idempotency_conflictidempotency_key_busyduplicate_referenceattempt_closedbalance_insufficientwrong_stateutr_in_use - 423
payment_password_locked - 429
too_many_requests - 500
server_error
curl -X POST https://api.bhimpay.online/api/v2/webhook-endpoints \
-H "Authorization: Bearer $AQUAPAY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "AquaPay-Payment-Password: $AQUAPAY_PAYMENT_PASSWORD" \
-H "Content-Type: application/json" \
-d '{
"url": "https://api.store.example/aquapay/webhooks/COWPAY_MAIN",
"description": "Example Store backend"
}'const response = await fetch("https://api.bhimpay.online/api/v2/webhook-endpoints", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"AquaPay-Payment-Password": process.env.AQUAPAY_PAYMENT_PASSWORD,
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://api.store.example/aquapay/webhooks/COWPAY_MAIN",
"description": "Example Store backend"
}),
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import uuid
import requests
response = requests.post(
"https://api.bhimpay.online/api/v2/webhook-endpoints",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
"AquaPay-Payment-Password": os.environ["AQUAPAY_PAYMENT_PASSWORD"],
},
json={
"url": "https://api.store.example/aquapay/webhooks/COWPAY_MAIN",
"description": "Example Store backend",
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/webhook-endpoints");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
"Idempotency-Key: " . bin2hex(random_bytes(16)),
"AquaPay-Payment-Password: " . getenv("AQUAPAY_PAYMENT_PASSWORD"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"url" => "https://api.store.example/aquapay/webhooks/COWPAY_MAIN",
"description" => "Example Store backend",
]),
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}body := strings.NewReader(`{
"url": "https://api.store.example/aquapay/webhooks/COWPAY_MAIN",
"description": "Example Store backend"
}`)
req, err := http.NewRequest("POST", "https://api.bhimpay.online/api/v2/webhook-endpoints", body)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
key := make([]byte, 16)
rand.Read(key) // crypto/rand
req.Header.Set("Idempotency-Key", hex.EncodeToString(key))
req.Header.Set("AquaPay-Payment-Password", os.Getenv("AQUAPAY_PAYMENT_PASSWORD"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/webhook-endpoints"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.header("Idempotency-Key", UUID.randomUUID().toString())
.header("AquaPay-Payment-Password", System.getenv("AQUAPAY_PAYMENT_PASSWORD"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"url": "https://api.store.example/aquapay/webhooks/COWPAY_MAIN",
"description": "Example Store backend"
}"""))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"id": "hook_a4s8d2f6g0h3j",
"url": "https://api.store.example/aquapay/webhooks/COWPAY_MAIN",
"description": "Example Store backend",
"eventTypes": [],
"createdAt": "2026-12-03T08:00:00Z",
"secretRotatedAt": null,
"secret": "aqwh_Zt8kP3vQ9mW2xR6nB1cY7hJ4gF0sD5aL8eT3uK6q",
"previousSecretExpiresAt": null
}Stop delivering to an endpoint.
DELETE/webhook-endpoints/{endpointId}
Pending deliveries to it are dropped; the events stay in /events. Deleting an endpoint this account already
deleted answers 204 again, so a retry is safe without an Idempotency-Key. Needs scope webhooks:write and
the payment password.
Parameters
endpointIdstringin pathrequiredAquaPay-Payment-Passwordstringin headerThe gateway account’s payment password, typed by the person approving the action. Required on payout creation and on webhook endpoint changes; checked whenever it is sent. Never logged or stored by AquaPay.
Answers
curl -X DELETE https://api.bhimpay.online/api/v2/webhook-endpoints/hook_a4s8d2f6g0h3j \
-H "Authorization: Bearer $AQUAPAY_API_KEY" \
-H "AquaPay-Payment-Password: $AQUAPAY_PAYMENT_PASSWORD"const response = await fetch("https://api.bhimpay.online/api/v2/webhook-endpoints/hook_a4s8d2f6g0h3j", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
"AquaPay-Payment-Password": process.env.AQUAPAY_PAYMENT_PASSWORD,
},
});
if (!response.ok) throw new Error((await response.json()).code);import os
import requests
response = requests.delete(
"https://api.bhimpay.online/api/v2/webhook-endpoints/hook_a4s8d2f6g0h3j",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
"AquaPay-Payment-Password": os.environ["AQUAPAY_PAYMENT_PASSWORD"],
},
timeout=30,
)
if not response.ok:
raise RuntimeError(response.json()["code"])<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/webhook-endpoints/hook_a4s8d2f6g0h3j");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
"AquaPay-Payment-Password: " . getenv("AQUAPAY_PAYMENT_PASSWORD"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}
// A success has no body.req, err := http.NewRequest("DELETE", "https://api.bhimpay.online/api/v2/webhook-endpoints/hook_a4s8d2f6g0h3j", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
req.Header.Set("AquaPay-Payment-Password", os.Getenv("AQUAPAY_PAYMENT_PASSWORD"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/webhook-endpoints/hook_a4s8d2f6g0h3j"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.header("AquaPay-Payment-Password", System.getenv("AQUAPAY_PAYMENT_PASSWORD"))
.DELETE()
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());Replace an endpoint's signing secret, with 24 hours of overlap.
POST/webhook-endpoints/{endpointId}/rotate-secret
For 24 hours every delivery to the endpoint carries two sha256 signatures, one per secret, so a receiver that
holds either secret keeps verifying while it switches. Needs scope webhooks:write and the payment password.
Parameters
endpointIdstringin pathrequiredIdempotency-Keystringin headerrequiredMakes a retry safe. OnPOST /payoutsit is also the payout’s permanent attempt key.AquaPay-Payment-Passwordstringin headerThe gateway account’s payment password, typed by the person approving the action. Required on payout creation and on webhook endpoint changes; checked whenever it is sent. Never logged or stored by AquaPay.
Answers
- 200WebhookEndpointWithSecretThe endpoint and its new secret, shown once.
- 400
validation_failed - 401
api_key_invalidpayment_password_requiredpayment_password_invalid - 403
ip_not_allowedscope_missingaccount_suspended - 404
resource_not_found - 423
payment_password_locked - 429
too_many_requests - 500
server_error
curl -X POST https://api.bhimpay.online/api/v2/webhook-endpoints/hook_a4s8d2f6g0h3j/rotate-secret \
-H "Authorization: Bearer $AQUAPAY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "AquaPay-Payment-Password: $AQUAPAY_PAYMENT_PASSWORD"const response = await fetch("https://api.bhimpay.online/api/v2/webhook-endpoints/hook_a4s8d2f6g0h3j/rotate-secret", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AQUAPAY_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"AquaPay-Payment-Password": process.env.AQUAPAY_PAYMENT_PASSWORD,
},
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.code}: ${data.message}`);import os
import uuid
import requests
response = requests.post(
"https://api.bhimpay.online/api/v2/webhook-endpoints/hook_a4s8d2f6g0h3j/rotate-secret",
headers={
"Authorization": f"Bearer {os.environ['AQUAPAY_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
"AquaPay-Payment-Password": os.environ["AQUAPAY_PAYMENT_PASSWORD"],
},
timeout=30,
)
data = response.json()
if not response.ok:
raise RuntimeError(f"{data['code']}: {data['message']}")<?php
$ch = curl_init("https://api.bhimpay.online/api/v2/webhook-endpoints/hook_a4s8d2f6g0h3j/rotate-secret");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AQUAPAY_API_KEY"),
"Idempotency-Key: " . bin2hex(random_bytes(16)),
"AquaPay-Payment-Password: " . getenv("AQUAPAY_PAYMENT_PASSWORD"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($data["code"] . ": " . $data["message"]);
}req, err := http.NewRequest("POST", "https://api.bhimpay.online/api/v2/webhook-endpoints/hook_a4s8d2f6g0h3j/rotate-secret", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AQUAPAY_API_KEY"))
key := make([]byte, 16)
rand.Read(key) // crypto/rand
req.Header.Set("Idempotency-Key", hex.EncodeToString(key))
req.Header.Set("AquaPay-Payment-Password", os.Getenv("AQUAPAY_PAYMENT_PASSWORD"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
answer, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(answer))HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.bhimpay.online/api/v2/webhook-endpoints/hook_a4s8d2f6g0h3j/rotate-secret"))
.header("Authorization", "Bearer " + System.getenv("AQUAPAY_API_KEY"))
.header("Idempotency-Key", UUID.randomUUID().toString())
.header("AquaPay-Payment-Password", System.getenv("AQUAPAY_PAYMENT_PASSWORD"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());{
"id": "hook_a4s8d2f6g0h3j",
"url": "https://api.store.example/aquapay/webhooks/COWPAY_MAIN",
"description": "Example Store backend",
"eventTypes": [],
"createdAt": "2026-12-03T08:00:00Z",
"secretRotatedAt": "2026-12-10T08:00:00Z",
"secret": "aqwh_Qm4nX8bV2cZ6aS0dF3gH7jK1lP5oW9eR2tY4uI8o",
"previousSecretExpiresAt": "2026-12-11T08:00:00Z"
}Webhook events
AquaPay posts these to your webhook endpoints, signed. Each carries the whole pay-in or payout as it was when the event was made. The webhooks guide covers signatures, retries and ordering.
| Type | Sent when | What to do |
|---|---|---|
payin.succeeded | The payer paid and the amount matches, including a late payment on a failed or expired pay-in. | The payer paid, the amount matches, and net was credited. Credit the payer paidAmount. Also sent for a late payment on a failed or expired pay-in. |
payin.failed | The provider refused or failed the pay-in. Nothing was credited. | The provider refused or failed the pay-in. Nothing was credited. |
payin.expired | The pay-in was still unpaid two hours after it was opened. | Nobody paid before expiresAt. A later payment still arrives as payin.succeeded. |
payin.needs_review | The evidence does not settle it, such as a paid amount that differs. | The provider’s evidence does not settle the pay-in (a different amount, a partial payment). Nothing was credited; AquaPay staff resolve it. |
payout.succeeded | The provider confirmed the payout for exactly its amount. | The provider confirmed the beneficiary was paid exactly amount. |
payout.failed | The payout failed, at creation or later. Its hold is released. | The payout failed and its hold was released. Nothing reached the beneficiary. |
payout.needs_review | The evidence is contradictory. The amount stays held. | The provider’s evidence is contradictory (a different amount, partial, frozen). The amount stays held; AquaPay staff resolve it. |
payout.reversed | The payout was paid, then returned. Its hold is released. | The provider returned a paid payout. total is back in the balance. |
{
"id": "event_q2w8e5r1t7y3v",
"type": "payin.succeeded",
"mode": "live",
"account": "ga_3k9d2m7q1x8vb",
"createdAt": "2026-12-03T09:15:07Z",
"data": {
"id": "payin_7h2kq9w3m1zt4",
"reference": "DEP-20261203-0042",
"status": "succeeded",
"amount": "500.00",
"paidAmount": "500.00",
"currency": "INR",
"fee": "12.50",
"net": "487.50",
"utr": "416512345678",
"orderId": "AQD2612030915000042",
"providerOrderId": "CP88123409",
"nextAction": null,
"expiresAt": "2026-12-03T11:15:00Z",
"failure": null,
"version": 3,
"createdAt": "2026-12-03T09:15:00Z",
"updatedAt": "2026-12-03T09:15:07Z"
}
}Objects
Every object the API sends or takes. A type in the operations above links to its entry here.
FailureWhy a payment failed or was reversed; null otherwise.
reasonstringbeneficiary_invalidandbeneficiary_bank_unsupported: fix the beneficiary.amount_not_allowed: the provider will not take this amount.provider_balance_insufficient: the gateway’s own float at the provider is short; tell AquaPay.provider_refused: refused for another reason.provider_unreachable: never sent.provider_failed: accepted, then failed by the provider (for a pay-in, the payer did not complete).provider_reversed: paid, then returned.resolved_by_aquapay: AquaPay staff closed it after review. One ofbeneficiary_invalid,beneficiary_bank_unsupported,amount_not_allowed,provider_balance_insufficient,provider_refused,provider_unreachable,provider_failed,provider_reversed,resolved_by_aquapay.messagestringThe provider’s words where it gave any, else AquaPay’s.
LimitsThe limits in force (provider floors, the gateway’s and the account’s own, combined). null is no limit.
minstring (money) or nullmaxstring (money) or null
FeeThe fee is amount × percent / 100 + fixed, each part rounded half away from zero to two decimals.
percentstring (percent)A percentage as a decimal string ("2.5"is 2.5 %).fixedstring (money)A non-negative amount in canonical form (two to six decimals, no trailing zero after the second).
Account
idstringnamestringThe account’s display name.modestringOne oflive,test.statusstringOne ofactive,suspended.providerstringThe provider the account’s gateway uses. Atestaccount reports the provider its sandbox imitates. One ofpayme,upayrpl,cowpay,rspay.currencystringISO 4217, the currency of the account’s gateway. Every account isINRtoday. One ofINR,USD.wholeUnitsOnlybooleanAmounts must be whole (PAYME, COWPAY);"100.50"is refused.payinsobjectpayoutsobjectkeyobjectThe key that made this request.idstringnamestringscopesarray of stringOne ofread,payins:write,payouts:write,webhooks:write.ipAllowlistarray of stringexpiresAtstring (date and time) or nullSet while the key is being rolled out of use.
Balance
currencystringISO 4217, the currency of the account’s gateway. Every account isINRtoday. One ofINR,USD.availablestring (money)What payouts may spend now: the sum of the ledger, holds already taken off.heldstring (money)Whatprocessingandneeds_reviewpayouts hold, included in the ledger as holds.asOfstring (date and time)
LedgerEntry
idstringtypestringOne ofpayin_credit,fee,payout_hold,payout_release,payout_settle,adjustment.amountstring (money)A signed amount in canonical form.balanceAfterstring (money)A signed amount in canonical form.paymentIdstring or nullThe pay-in or payout the entry belongs to; null for an adjustment.notestring or nullAn adjustment’s reason.createdAtstring (date and time)
LedgerPage
itemsarray of LedgerEntrynextCursorstring or nullnull on the last page.
CreatePayinRequest
amountstring (money)A positive amount with at most two decimals.currencystringISO 4217, the currency of the account’s gateway. Every account isINRtoday. One ofINR,USD.referencestringYour id for the order. Not unique: a retried order may reuse it.payerobjectidstringYour id for the payer. Providers use it for risk checks.ipstringThe payer’s public IPv4 or IPv6 address. Required whenpayins.payerIpRequired.
returnUrlstring (URL)Where the payment page sends the payer afterwards.
NextActionWhat to show the payer, while the pay-in is pending; null otherwise. Redirect to redirectUrl, or, where
upiUri is set, open it on a phone (UPI intent) or render it as a QR code on a desktop.
redirectUrlstring (URL)upiUristring or nullAupi://pay?…URI (COWPAY).
Payin
idstringreferencestringstatusstringpending(waiting for the payer) →succeeded|failed|expired|needs_review.failedandexpiredcan still becomesucceeded(orneeds_review) on the provider’s proof of a late payment.needs_reviewis resolved by AquaPay staff tosucceededorfailed.succeededis final.amountstring (money)The order amount.paidAmountstring (money) or nullWhat the provider reports was paid; null until it reports. Onsucceededit is what was credited, before the fee.currencystringISO 4217, the currency of the account’s gateway. Every account isINRtoday. One ofINR,USD.feestring (money)The fee on this pay-in (onpaidAmountonce succeeded).netstring (money)What the balance gains when it succeeds:paidAmount(oramount) minusfee.utrstring or nullThe bank’s reference for the payment.orderIdstringThe order number AquaPay sent the provider. The same value v1 calledorderId.providerOrderIdstring or nullThe provider’s own id for the order.nextActionNextActionexpiresAtstring (date and time)Two hours after creation. A pay-in stillpendingthen is checked with the provider once and, if still unpaid, becomesexpired.failureFailureversionintegerGrows by one on every change. Apply a webhook only if its version is newer than the one you hold.createdAtstring (date and time)updatedAtstring (date and time)
PayinPage
itemsarray of PayinnextCursorstring or nullnull on the last page.
BindUtrRequest
utrstringThe 12-digit UTR from the payer’s bank or UPI app.
BankBeneficiary
type"bank"namestringaccountNumberstringifscstring
UpiBeneficiary
type"upi"namestringvpastring
UpayWalletBeneficiary
type"upay_wallet"addressstring
BeneficiarySummaryThe beneficiary, masked.
typestringbank(account number and IFSC),upi(a VPA),upay_wallet(a UPay wallet, paid in RPL at ₹1 each). One ofbank,upi,upay_wallet.namestring or nullmaskedstringThe last characters only:••••6789,ra•••@okhdfcbank,UPW•••7n4v1.
CreatePayoutRequest
amountstring (money)What the beneficiary receives. The fee is debited on top.currencystringISO 4217, the currency of the account’s gateway. Every account isINRtoday. One ofINR,USD.referencestringYour id for the withdrawal.beneficiaryBankBeneficiary, UpiBeneficiary or UpayWalletBeneficiaryWhere a payout goes.typemust be one of the account’spayouts.methods.narrationstringThe remark sent to the provider. Defaults to “Payout”.
Payout
idstringreferencestringattemptKeystringTheIdempotency-Keythat created it.statusstringprocessing(recorded, amount held, at or on its way to the provider) →succeeded|failed|needs_review.succeeded→reversedonly on the provider’s own word.needs_review(still held) is resolved by AquaPay staff tosucceeded,failedorreversed.failedandreversedare final.amountstring (money)What the beneficiary receives. Onsucceededthe provider confirmed exactly this.feestring (money)A non-negative amount in canonical form (two to six decimals, no trailing zero after the second).totalstring (money)amount + fee: held whileprocessingorneeds_review, debited onsucceeded, released onfailedorreversed.currencystringISO 4217, the currency of the account’s gateway. Every account isINRtoday. One ofINR,USD.beneficiaryBeneficiarySummaryutrstring or nullThe bank’s reference for the transfer, once the provider gives one.orderIdstringThe order number AquaPay sent the provider. The same value v1 calledorderId.providerOrderIdstring or nullfailureFailureversionintegerGrows by one on every change. Apply a webhook only if its version is newer than the one you hold.createdAtstring (date and time)updatedAtstring (date and time)
PayoutPage
itemsarray of PayoutnextCursorstring or nullnull on the last page.
PayoutQuote
amountstring (money)A non-negative amount in canonical form (two to six decimals, no trailing zero after the second).feestring (money)A non-negative amount in canonical form (two to six decimals, no trailing zero after the second).totalstring (money)A non-negative amount in canonical form (two to six decimals, no trailing zero after the second).currencystringISO 4217, the currency of the account’s gateway. Every account isINRtoday. One ofINR,USD.sufficientBalancebooleanWhetheravailablecoverstotalat this moment.
PayoutAttempt
keystringstatestringOne ofunused,used,closed.payoutPayout or nullThe payout whenused.
EventEnvelope
idstringDeduplicate on it. Delivery is at least once.modestringNever credit anyone for atestevent. One oflive,test.accountstringcreatedAtstring (date and time)
PayinEvent
idstringDeduplicate on it. Delivery is at least once.modestringNever credit anyone for atestevent. One oflive,test.accountstringcreatedAtstring (date and time)typestringOne ofpayin.succeeded,payin.failed,payin.expired,payin.needs_review.dataPayinThe pay-in as it was when the event was made.
PayoutEvent
idstringDeduplicate on it. Delivery is at least once.modestringNever credit anyone for atestevent. One oflive,test.accountstringcreatedAtstring (date and time)typestringOne ofpayout.succeeded,payout.failed,payout.needs_review,payout.reversed.dataPayoutThe payout as it was when the event was made.
EventPage
itemsarray of PayinEvent or PayoutEventnextCursorstringNever null: poll again with it. Before the first event it ise1.0.
WebhookEndpoint
idstringurlstring (URL)descriptionstringeventTypesarray of stringThe event types it receives; empty is every type. One ofpayin.succeeded,payin.failed,payin.expired,payin.needs_review,payout.succeeded,payout.failed,payout.needs_review,payout.reversed.createdAtstring (date and time)secretRotatedAtstring (date and time) or null
WebhookEndpointWithSecret
idstringurlstring (URL)descriptionstringeventTypesarray of stringThe event types it receives; empty is every type. One ofpayin.succeeded,payin.failed,payin.expired,payin.needs_review,payout.succeeded,payout.failed,payout.needs_review,payout.reversed.createdAtstring (date and time)secretRotatedAtstring (date and time) or nullsecretstringThe signing secret. Shown only in this answer.previousSecretExpiresAtstring (date and time) or nullUntil when the replaced secret also signs; null on creation.
WebhookEndpointList
itemsarray of WebhookEndpoint
CreateWebhookEndpointRequest
urlstring (URL)descriptionstringeventTypesarray of stringThe event types to receive; empty or absent is every type. One ofpayin.succeeded,payin.failed,payin.expired,payin.needs_review,payout.succeeded,payout.failed,payout.needs_review,payout.reversed.
ProviderDetailThe provider’s side of a provider error; null for errors AquaPay raised itself.
namestringThe provider the account’s gateway uses. Atestaccount reports the provider its sandbox imitates. One ofpayme,upayrpl,cowpay,rspay.stagestringOne ofcreate,query,bind_utr.reasonstring or nullWhy it refused; null when the outcome is unknown.codestring or nullThe provider’s own code, as text.messagestringThe provider’s own words, trimmed.
FieldErrorOne refused field. rule is what it broke, for example required, format, type, unknown, min, max,
whole_units, decimals, account_currency, method, url, or for a webhook endpoint unique (the URL is
already an endpoint of the account) and max (the account already has three endpoints).
fieldstringrulestringmessagestringlimitstring (money)The limit an amount broke (min,max).
Error
statusfalseAlways false, as in every AquaPay error body.codestringcode HTTP retry validation_failed400 noapi_key_invalid401 nopayment_password_required401 nopayment_password_invalid401 noip_not_allowed403 noscope_missing403 noaccount_suspended403 noresource_not_found404 noidempotency_conflict409 new_keyidempotency_key_busy409 same_keyduplicate_reference409 noattempt_closed409 new_keybalance_insufficient409 nowrong_state409 noutr_in_use409 nounsupported_by_provider422 noprovider_refused422 new_keypayment_password_locked423 same_keyafterRetry-Afterprovider_unreachable424 new_keyon create,same_keyon refresh and bindtoo_many_requests429 same_keyafterRetry-Afterserver_error500 same_keyprovider_outcome_unknown502 refreshfor a payout,new_keyfor a pay-inservice_unavailable503 same_keyafterRetry-AftermessagestringFor people. May be reworded.requestIdstring (UUID)Same as theAquaPay-Request-Idheader.retrystringOne ofsame_key,new_key,refresh,no.providerProviderDetaildocUrlstring (URL)The code’s page in the docs:https://aquapay.bhimpay.online/docs/errors#<code>.detailsobjectPer code:validation_failed{fields: [{field, rule, message, limit?}]}(at most 10);scope_missing{scope};payment_password_invalid{remaining};payment_password_locked{lockedUntil};resource_not_found{resource};duplicate_reference{payout};attempt_closed{key};balance_insufficient{available, required};wrong_state{status};utr_in_use{payinId};provider_refused,provider_unreachableandprovider_outcome_unknown{payin}or{payout}when the error is about one.fieldsarray of FieldError