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:

PrefixModeBehavior
usdr_live_LiveFull on-chain verification against Ethereum mainnet
usdr_test_TestMock 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:

1

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.

2

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.

3

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:

CodeMeaning
UNAUTHORIZEDMissing or invalid API key
INSUFFICIENT_SCOPEUser-scoped key tried to access a full-access-only endpoint (e.g. wallet mutations, profile, key management)
WALLET_NOT_REGISTEREDUser-scoped key used a recipient address not registered in the account
INVALID_INPUTMissing or malformed request body
INVALID_ETH_ADDRESSNot a valid Ethereum address
PAYMENT_REQUEST_NOT_FOUNDCheckout/invoice does not exist
TRANSACTION_NOT_FOUNDTx hash not found on chain
PAYMENT_AMOUNT_TOO_LOWUnderpayment beyond 1% tolerance
TRANSACTION_ALREADY_USEDThis tx hash was already used for a receipt
WAITING_FOR_CONFIRMATIONSTransaction 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:

ScopeAccess
fullUnrestricted — used by the dashboard session. Can manage wallets, profile, and other keys.
userRestricted — 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.

POST /api/v1/api-keys Create an API key 🔒

Request body

FieldTypeDescription
namestringrequiredLabel for this key (e.g. "My Agent")
modestringtest (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."
}
GET /api/v1/api-keys List API keys 🔒

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"
    }
  ]
}
POST /api/v1/api-keys/{id}/revoke Revoke an API key 🔒

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.

POST /api/v1/wallets Add a wallet 🔒

Request body

FieldTypeDescription
addressstringrequiredEthereum address (0x...)
labelstringOptional label

Response 201

{
  "ok": true,
  "wallet": {
    "id": "wal_abc123",
    "address": "0x742d35Cc...",
    "network": "ethereum",
    "label": "Main wallet",
    "is_verified": false
  }
}
GET /api/v1/wallets List wallets 🔒

Returns all wallets registered to your account.

Response 200

{
  "ok": true,
  "wallets": [ ... ]
}
DELETE /api/v1/wallets/{id} Remove a wallet 🔒

Removes a wallet. Fails with WALLET_HAS_ACTIVE_REQUESTS if the wallet has open payment requests.

Response 200

{ "ok": true }
POST /api/v1/wallets/{id}/verify Verify wallet ownership 🔒

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:

FieldTypeDescription
signaturestringrequiredThe personal_sign signature of the challenge message

Response 200

{ "ok": true, "wallet": { "is_verified": true, ... } }

Challenges expire after 5 minutes and are single-use.

GET /api/v1/wallets/{id}/transactions Scan on-chain USDT transfers 🔒

Queries Ethereum for recent incoming USDT transfers to this wallet. Automatically cross-references against your open payment requests.

ParameterInTypeDescription
idpathstringWallet ID
blocksqueryintegerHow 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.

POST /api/v1/checkouts Create a checkout 🔒

Request body

FieldTypeDescription
amount_usdtstringrequiredAmount in USDT or USDC
recipient_addressstringrequiredYour wallet address
tokenstringToken to accept: USDT or USDC (default: USDT)
titlestringDisplay title
memostringAdditional notes
collect_buyer_infobooleanRequire buyer name/email
expires_atdatetimeOptional expiration

Response 201

{
  "ok": true,
  "checkout": {
    "id": "chk_abc123",
    "url": "https://usdreceipt.xyz/pay/chk_abc123",
    "amount_usdt": "49.99",
    "status": "open"
  }
}
GET /api/v1/checkouts/{id}/receipts List checkout receipts 🔒

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.

POST /api/v1/invoices Create an invoice 🔒

Request body

FieldTypeDescription
recipient_addressstringrequiredYour wallet address
line_itemsarrayrequiredAt least one line item
tokenstringToken to accept: USDT or USDC (default: USDT)
titlestringInvoice title
client_namestringClient name for the invoice
client_emailstringClient email (receipt will be sent here)
due_datedatePayment 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.

POST /api/v1/payment-requests/{id}/verify Verify a payment

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

FieldTypeDescription
tx_hashstringrequiredEthereum transaction hash (0x + 64 hex chars)
client_namestringBuyer name (required if collect_buyer_info is on)
client_emailstringBuyer 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)

GET /api/v1/payment-requests/{id} Get a payment request

Public endpoint — returns details of a checkout or invoice. Includes line_items for invoices.

GET /api/v1/payment-requests List payment requests 🔒

Returns all checkouts and invoices for the authenticated user.

POST /api/v1/payment-requests/{id}/void Void a payment request 🔒

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.

GET /api/v1/receipts/{id} Get a receipt

Public endpoint — returns receipt details including tx_hash, block_number, sender/receiver addresses, and amount_usdt.

PDF version available at: /receipt/{id}/pdf

GET /api/v1/receipts List receipts 🔒

Returns all verified receipts for the authenticated user.

GET /api/v1/receipts/export/csv Export as CSV 🔒

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.

GET /api/v1/profile Get profile 🔒

Returns your business profile settings.

PUT /api/v1/profile Update profile 🔒

Request body (all fields optional)

FieldTypeDescription
business_namestringYour business name
business_addressstringBusiness address
tax_idstringTax ID / EIN / VAT number
tax_labelstringLabel for tax line (e.g. "Sales Tax", "VAT")
tax_ratestringTax rate as percentage (0–100)