SovPay REST API
Agents-first API for creating payment links and invoices programmatically. All endpoints live under
https://sovpay.jarvis.kodecast.com/api/v1 and are authenticated
with a Bearer API key (sk_…) from the admin → API keys page.
Authentication
Authorization: Bearer sk_test_…
Missing or invalid keys return 401 {"error":"unauthorized"}.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/payment-links | Create a payment link. Body: title (required), description, amount_type (fixed|custom), amount, currency (default USD), default_chain (ethereum|bsc|tron), allowed_tokens[] (USDT/USDC), expires_at. |
| GET | /api/v1/payment-links | List your payment links (paginated, 50/page). |
| POST | /api/v1/invoices | Create an invoice. Body: amount (fiat, required), currency (default USD), chain (required), token (required), description, metadata{}. Returns the derived deposit address + token amount. |
| GET | /api/v1/invoices | List your invoices (paginated, 50/page). |
| GET | /api/v1/invoices/{id} | Fetch one invoice by uuid or numeric id. Poll this to detect payment. |
Create an invoice
curl -X POST https://sovpay.jarvis.kodecast.com/api/v1/invoices \
-H "Authorization: Bearer $SOVPAY_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 25.00,
"currency": "USD",
"chain": "ethereum",
"token": "USDT",
"metadata": {"order_id": "9812"}
}'
Response 201 includes deposit_address,
token_amount and a hosted checkout_url
you can hand to a human.
Poll for payment
curl https://sovpay.jarvis.kodecast.com/api/v1/invoices/{uuid} \
-H "Authorization: Bearer $SOVPAY_KEY"
status: created → awaiting_payment → paid → confirmed (or expired / cancelled).
Webhooks
Register endpoint URLs in the admin. SovPay POSTs signed JSON for
invoice.paid and
invoice.confirmed, retrying up to 3× with backoff.
// Verify the signature (PHP)
$expected = hash_hmac('sha256', $request->getContent(), $endpointSecret);
hash_equals($expected, $request->header('X-SovPay-Signature')) or abort(401);
Chains & tokens
Ethereum
USDT · USDC
BNB Smart Chain
USDT · USDC
Tron
USDT · USDC