Log in

Vaultora API

Accept USDT (BEP20) from your server in a few calls. Amounts are always strings, never numbers.

Start

  1. Create an account and a site in the dashboard.
  2. Add your server's public IP to the site's whitelist (Developers tab). Calls from any other IP are refused.
  3. Create a test key (vk_test_…) and try everything without real money. Then a live key (vk_live_…).
  4. Set a webhook URL and keep the webhook secret (whsec_…) on your server.
  5. Set your payout address (Settings tab) to collect your money.

Authentication

Base URL: https://api.vaultorapay.com/v1/. Send the key in the Authorization header, from your server only:

Authorization: Bearer vk_live_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxx
Never put an API key in a web page or a mobile app. A leaked key is useless from another IP, but replace it at once anyway.

Invoices

An invoice asks for a fixed amount, gets its own fresh address and expires. Send the customer to pay_url (our hosted page) or show the address and amount yourself.

POST/v1/invoices

Body: amount, network, asset, order_id; optional customer_id, return_url, expires_in (minutes).

Same order_id again = the same invoice (200), so a retry never makes two. 201 = new.

PHP
<?php
$ch = curl_init('https://api.vaultorapay.com/v1/invoices');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('VAULTORA_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'amount' => '25', 'network' => 'bsc', 'asset' => 'USDT',
        'order_id' => 'A-1001', 'return_url' => 'https://myshop.com/thanks',
    ]),
]);
$invoice = json_decode(curl_exec($ch), true);
header('Location: ' . $invoice['pay_url']);
JSON
{
  "invoice_id": "inv_…", "livemode": true, "order_id": "A-1001", "status": "pending",
  "network": "bsc", "asset": "USDT", "amount": "25", "amount_received": "0",
  "address": "0x…", "pay_url": "https://vaultorapay.com/pay/inv_…",
  "expires_at": "2026-11-23T12:30:00+00:00", "paid_at": null
}
GET/v1/invoices/<invoice_id>

Status: pending → paid | overpaid, or at expiry expired | underpaid. A late payment can still make it paid.

Customer addresses

POST/v1/addresses

A fixed deposit address for one of your customers (for top-ups of any amount). The same customer_id always gets the same address.

JSON
{"customer_id": "user-42", "network": "bsc", "asset": "USDT"}
GET/v1/networks

Networks and coins your site can accept, with their minimum amounts.

Payments and balance

GET/v1/payments?customer_id=&invoice_id=&status=&page=

Every payment received. Status: pending → confirmed (credited), held (sender flagged, waiting for review), rejected, dropped, ignored (below the minimum).

amount_gross = sent by the customer; fee; amount_net = yours.

GET/v1/payments/<payment_id>

One payment.

GET/v1/balance

Per network and coin: available, collecting, collected, pending, held.

Webhooks

We POST JSON to your webhook URL (HTTPS). Answer 2xx within 10 s. Otherwise we retry after 1 min, 5 min, 15 min, 1 h, 3 h and 6 h. Use the event id to handle each event only once.

JSON
POST /your/webhook
X-Vaultora-Event: invoice.paid
X-Vaultora-Event-Id: evt_…
X-Vaultora-Timestamp: 1795000000
X-Vaultora-Signature: sha256=<hex HMAC-SHA256 of "<timestamp>.<raw body>">

{"id": "evt_…", "type": "invoice.paid", "created": "…", "data": { …the invoice… }}

Events: payment.pending, payment.confirmed, payment.held, payment.rejected, payment.dropped, invoice.paid, invoice.overpaid, invoice.underpaid, invoice.expired, collection.completed, collection.failed, test.

Check the signature (always, with the raw body):

PHP
<?php
$secret = getenv('VAULTORA_WEBHOOK_SECRET'); // whsec_…
$body = file_get_contents('php://input');
$ts   = $_SERVER['HTTP_X_VAULTORA_TIMESTAMP'] ?? '';
$sig  = $_SERVER['HTTP_X_VAULTORA_SIGNATURE'] ?? '';

$expected = 'sha256=' . hash_hmac('sha256', $ts . '.' . $body, $secret);
if (!hash_equals($expected, $sig) || abs(time() - (int)$ts) > 300) {
    http_response_code(400);
    exit;
}
$event = json_decode($body, true);
if ($event['type'] === 'invoice.paid') {
    // mark order $event['data']['order_id'] as paid (once: use $event['id'])
}
http_response_code(200);
POST/v1/webhooks/test

Sends a test event to your webhook URL.

Test mode

With a test key (vk_test_…), use network "sandbox" and asset "USDT". Nothing touches a real chain. Every answer has "livemode": false.

POST/v1/sandbox/pay

Simulates a customer paying a sandbox address (test keys only). Webhooks are sent like for real payments.

JSON
{"address": "0x…", "amount": "25"}

The hosted page of a sandbox invoice also has a "Simulate the payment" button, and the dashboard can make a test payment.

Errors and limits

Errors are always {"error": "…"} with a 4xx code: 400 wrong data, 401 bad key, 403 IP not allowed or site blocked, 404 not found, 429 too many calls (300 per minute per site).

Machine-readable schema: /v1/schema (OpenAPI)