USDReceipt API
Non-custodial USDT and USDC payment verification for merchants, freelancers, and AI agents. Create checkouts and invoices, let buyers pay your Ethereum wallet directly, and get verified on-chain receipts — all through a simple REST API.
Base URL: https://usdreceipt.xyz/api/v1
All requests and responses use JSON. Authenticated endpoints require an API key passed as a Bearer token.
Authentication
Create an API key from your dashboard (API Keys tab). Then pass it in the Authorization header:
Authorization: Bearer usdr_a1b2c3d4e5f6...
Keys created from the dashboard have user scope — they can create checkouts, invoices, list receipts, and verify payments, but they cannot modify wallets, change profile settings, or manage other API keys. Checkouts and invoices must use a wallet address already registered in your account.
This means you can safely hand a key to an agent without worrying about it redirecting payments or changing your identity.
The dashboard itself uses passwordless magic-link login via email, which has full access to all features.
Sandbox Mode
Every API key has a mode: live or test. You can tell from the key prefix:
| Prefix | Mode | Behavior |
|---|---|---|
| usdr_live_ | Live | Full on-chain verification against Ethereum mainnet |
| usdr_test_ | Test | Mock verification — any valid-looking tx hash is accepted instantly. No real transactions needed. |
Test and live data are completely isolated. Checkouts created with a test key only appear when listing with a test key (or via the dashboard's test toggle). Receipts, CSV exports, and payment requests all follow the same isolation.
Use test keys during development and integration testing, then switch to live keys for production.
Quickstart
Accept your first USDT or USDC payment in 3 steps:
Add a wallet — register the Ethereum address where you'll receive USDT or USDC from the dashboard (Wallets tab). Then create a test API key (API Keys tab) to try the flow risk-free.
Create a checkout — a payment link your buyers can use.
curl -X POST https://usdreceipt.xyz/api/v1/checkouts \ -H "Authorization: Bearer usdr_test_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "title": "Premium Plan", "amount_usdt": "49.99", "recipient_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28" }'
The response includes a url — share it with your buyer.
Verify the payment — submit the transaction hash after the buyer pays.
curl -X POST https://usdreceipt.xyz/api/v1/payment-requests/chk_abc123/verify \ -H "Content-Type: application/json" \ -d '{ "tx_hash": "0xabc123..." }'
With a test key, any valid-looking tx hash (0x + 64 hex chars) is accepted instantly. With a live key, the transaction is verified on-chain. A PDF receipt is emailed to the buyer if their email is provided.
Error Handling
All errors return a consistent JSON structure:
{
"ok": false,
"error": "ERROR_CODE",
"message": "Human-readable description"
}
Common error codes:
| Code | Meaning |
|---|---|
| UNAUTHORIZED | Missing or invalid API key |
| INSUFFICIENT_SCOPE | User-scoped key tried to access a full-access-only endpoint (e.g. wallet mutations, profile, key management) |
| WALLET_NOT_REGISTERED | User-scoped key used a recipient address not registered in the account |
| INVALID_INPUT | Missing or malformed request body |
| INVALID_ETH_ADDRESS | Not a valid Ethereum address |
| PAYMENT_REQUEST_NOT_FOUND | Checkout/invoice does not exist |
| TRANSACTION_NOT_FOUND | Tx hash not found on chain |
| PAYMENT_AMOUNT_TOO_LOW | Underpayment beyond 1% tolerance |
| TRANSACTION_ALREADY_USED | This tx hash was already used for a receipt |
| WAITING_FOR_CONFIRMATIONS | Transaction found but needs more block confirmations |
API Keys
Manage API keys for programmatic and agent access. Keys are shown only once at creation — store them securely.
Keys have one of two scopes:
| Scope | Access |
|---|---|
| full | Unrestricted — used by the dashboard session. Can manage wallets, profile, and other keys. |
| user | Restricted — created via the API and dashboard. Can create checkouts/invoices (only with registered wallets), list payment requests, verify payments, view receipts, and export CSV. Cannot add/remove wallets, change profile, or manage keys. |
The key management endpoints below require full scope.
Request body
| Field | Type | Description | |
|---|---|---|---|
| name | string | required | Label for this key (e.g. "My Agent") |
| mode | string | test (default) or live |
Response 201
{
"ok": true,
"api_key": {
"id": "key_abc123",
"name": "My Agent",
"scope": "user",
"mode": "test",
"key": "usdr_test_a1b2c3d4..."
},
"message": "Store this key securely — it will not be shown again."
}
Response 200
{
"ok": true,
"api_keys": [
{
"id": "key_abc123",
"name": "My Agent",
"scope": "user",
"mode": "test",
"is_active": true,
"created_at": "2026-05-10T12:00:00Z",
"last_used_at": "2026-05-10T14:30:00Z"
}
]
}
Immediately invalidates the key. Any agent or service using it will receive 401 UNAUTHORIZED.
Response 200
{ "ok": true }
Wallets
Register the Ethereum addresses where you want to receive USDT and USDC payments. Use ?include=balance to get live token balances.
Request body
| Field | Type | Description | |
|---|---|---|---|
| address | string | required | Ethereum address (0x...) |
| label | string | Optional label |
Response 201
{
"ok": true,
"wallet": {
"id": "wal_abc123",
"address": "0x742d35Cc...",
"network": "ethereum",
"label": "Main wallet",
"is_verified": false
}
}
Returns all wallets registered to your account.
Response 200
{
"ok": true,
"wallets": [ ... ]
}
Removes a wallet. Fails with WALLET_HAS_ACTIVE_REQUESTS if the wallet has open payment requests.
Response 200
{ "ok": true }
Prove you own a wallet by signing a challenge message. Two-step flow:
Step 1: Get the challenge message:
GET /api/v1/wallets/{id}/challenge
// Response: { "ok": true, "message": "Sign this to verify..." }
Step 2: Sign the message with your Ethereum wallet and submit:
| Field | Type | Description | |
|---|---|---|---|
| signature | string | required | The personal_sign signature of the challenge message |
Response 200
{ "ok": true, "wallet": { "is_verified": true, ... } }
Challenges expire after 5 minutes and are single-use.
Queries Ethereum for recent incoming USDT transfers to this wallet. Automatically cross-references against your open payment requests.
| Parameter | In | Type | Description |
|---|---|---|---|
| id | path | string | Wallet ID |
| blocks | query | integer | How many blocks back to scan (default 50000, max 500000) |
Response 200
{
"ok": true,
"wallet_address": "0x742d...",
"blocks_scanned": 50000,
"transfers": [
{
"tx_hash": "0xabc...",
"from_address": "0x123...",
"amount_usdt": "250.0",
"already_used": false,
"matching_request": { "id": "chk_xyz", "title": "Premium Plan" }
}
]
}
Rate limited to 10 requests/minute per user to protect RPC quota.
Checkouts
Reusable payment links that can accept multiple payments — perfect for product pages, donation buttons, or subscriptions.
Request body
| Field | Type | Description | |
|---|---|---|---|
| amount_usdt | string | required | Amount in USDT or USDC |
| recipient_address | string | required | Your wallet address |
| token | string | Token to accept: USDT or USDC (default: USDT) | |
| title | string | Display title | |
| memo | string | Additional notes | |
| collect_buyer_info | boolean | Require buyer name/email | |
| expires_at | datetime | Optional expiration |
Response 201
{
"ok": true,
"checkout": {
"id": "chk_abc123",
"url": "https://usdreceipt.xyz/pay/chk_abc123",
"amount_usdt": "49.99",
"status": "open"
}
}
Returns all verified payment receipts for a checkout.
Response 200
{
"ok": true,
"receipts": [ ... ]
}
Invoices
One-time invoices with line items, sequential numbering, and optional tax calculation.
Request body
| Field | Type | Description | |
|---|---|---|---|
| recipient_address | string | required | Your wallet address |
| line_items | array | required | At least one line item |
| token | string | Token to accept: USDT or USDC (default: USDT) | |
| title | string | Invoice title | |
| client_name | string | Client name for the invoice | |
| client_email | string | Client email (receipt will be sent here) | |
| due_date | date | Payment due date (YYYY-MM-DD) |
Line item format:
{
"description": "Smart contract audit",
"quantity": 1,
"unit_price_usdt": "2500"
}
Response 201
{
"ok": true,
"invoice": {
"id": "inv_abc123",
"invoice_number": "INV-2026-0001",
"url": "https://usdreceipt.xyz/invoice/inv_abc123",
"amount_usdt": "2500",
"status": "open"
}
}
Payments
Look up payment requests, verify on-chain payments, and manage their lifecycle.
Submit an Ethereum transaction hash. USDReceipt verifies on-chain that the correct amount of the selected token (USDT or USDC) was sent to the correct address. Accepts payments within 1% of the requested amount.
No authentication required — this endpoint is public so buyers can submit their own transaction hashes.
Request body
| Field | Type | Description | |
|---|---|---|---|
| tx_hash | string | required | Ethereum transaction hash (0x + 64 hex chars) |
| client_name | string | Buyer name (required if collect_buyer_info is on) | |
| client_email | string | Buyer email (required if collect_buyer_info is on) |
Responses
201 Payment verified — receipt created
202 Transaction found but waiting for block confirmations
400 Verification failed (see error code)
Public endpoint — returns details of a checkout or invoice. Includes line_items for invoices.
Returns all checkouts and invoices for the authenticated user.
Cancels an open checkout or invoice. Cannot void a payment request that's already been paid.
Receipts
On-chain verified payment receipts with downloadable PDFs.
Public endpoint — returns receipt details including tx_hash, block_number, sender/receiver addresses, and amount_usdt.
PDF version available at: /receipt/{id}/pdf
Returns all verified receipts for the authenticated user.
Downloads all receipts as a CSV file. Useful for accounting, tax reporting, or importing into spreadsheets.
curl -O https://usdreceipt.xyz/api/v1/receipts/export/csv \ -H "Authorization: Bearer usdr_YOUR_KEY"
Profile
Configure your business name, address, and tax settings. These appear on invoices and receipts.
Returns your business profile settings.
Request body (all fields optional)
| Field | Type | Description |
|---|---|---|
| business_name | string | Your business name |
| business_address | string | Business address |
| tax_id | string | Tax ID / EIN / VAT number |
| tax_label | string | Label for tax line (e.g. "Sales Tax", "VAT") |
| tax_rate | string | Tax rate as percentage (0–100) |