{"openapi":"3.0.3","info":{"title":"USDReceipt API","version":"1.0.0","description":"Non-custodial USDT and USDC payment verification API. Create checkouts and invoices, let buyers pay your wallet directly on Ethereum, and get verified on-chain receipts. Designed for merchants, freelancers, and AI agents.","contact":{"name":"USDReceipt","url":"https://usdreceipt.xyz"}},"servers":[{"url":"https://usdreceipt.xyz","description":"Current server"}],"tags":[{"name":"Health","description":"Server health"},{"name":"Auth","description":"Magic link authentication"},{"name":"API Keys","description":"Create and manage API keys for programmatic access"},{"name":"Profile","description":"Business profile and tax settings"},{"name":"Wallets","description":"Manage Ethereum wallets"},{"name":"Checkouts","description":"Reusable payment links that accept multiple payments"},{"name":"Invoices","description":"One-time invoices with line items"},{"name":"Payment Requests","description":"Unified view of checkouts and invoices"},{"name":"Receipts","description":"On-chain verified payment receipts"}],"paths":{"/api/v1/health":{"get":{"tags":["Health"],"summary":"Health check","operationId":"healthCheck","responses":{"200":{"description":"Server is healthy","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"status":{"type":"string","example":"healthy"}}}}}}}}},"/api/v1/auth/magic-link":{"post":{"tags":["Auth"],"summary":"Request a magic link","description":"Sends a passwordless login email. If the email isn't registered, a new account is created automatically. Always returns 200 to prevent email enumeration.","operationId":"requestMagicLink","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","example":"alice@example.com"}}}}}},"responses":{"200":{"description":"Magic link sent","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true}}}}}},"400":{"$ref":"#/components/responses/InvalidInput"}}}},"/api/v1/auth/magic-link/verify":{"post":{"tags":["Auth"],"summary":"Verify a magic link token","description":"Exchanges a magic link token for a session cookie. Tokens expire after 15 minutes and are single-use.","operationId":"verifyMagicLink","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"token":{"type":"string"}}}}}},"responses":{"200":{"description":"Session created","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"}}}}}}}},"401":{"description":"Token invalid or expired"}}}},"/api/v1/auth/me":{"get":{"tags":["Auth"],"summary":"Get current user","operationId":"getCurrentUser","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Current user","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"user":{"type":"object","properties":{"id":{"type":"string","example":"usr_abc123"},"email":{"type":"string","example":"alice@example.com"},"created_at":{"type":"string","format":"date-time"}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/v1/auth/logout":{"post":{"tags":["Auth"],"summary":"Log out","operationId":"logout","responses":{"200":{"description":"Session cleared"}}}},"/api/v1/api-keys":{"get":{"tags":["API Keys"],"summary":"List API keys","operationId":"listApiKeys","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"List of API keys","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"api_keys":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["API Keys"],"summary":"Create an API key","description":"Creates a new API key. The raw key is returned only once — store it securely.","operationId":"createApiKey","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","example":"My Agent","description":"A label to identify this key"},"mode":{"type":"string","enum":["live","test"],"default":"test","description":"Key mode — test keys use mock verification, live keys hit the real chain"}}}}}},"responses":{"201":{"description":"Key created","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"api_key":{"type":"object","properties":{"id":{"type":"string","example":"key_abc123"},"name":{"type":"string","example":"My Agent"},"scope":{"type":"string","enum":["full","user"],"example":"user","description":"Permission scope of the key"},"mode":{"type":"string","enum":["live","test"],"example":"test","description":"Key mode — test or live"},"key":{"type":"string","example":"usdr_test_a1b2c3d4..."}}},"message":{"type":"string","example":"Store this key securely — it will not be shown again."}}}}}},"400":{"$ref":"#/components/responses/InvalidInput"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/v1/api-keys/{id}/revoke":{"post":{"tags":["API Keys"],"summary":"Revoke an API key","description":"Immediately invalidates the key. Any request using it will receive 401.","operationId":"revokeApiKey","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Key revoked","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true}}}}}},"400":{"description":"Already revoked"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Key not found"}}}},"/api/v1/profile":{"get":{"tags":["Profile"],"summary":"Get business profile","operationId":"getProfile","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Profile","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"profile":{"$ref":"#/components/schemas/Profile"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"put":{"tags":["Profile"],"summary":"Update business profile","operationId":"updateProfile","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"business_name":{"type":"string","example":"Acme Labs","nullable":true},"business_address":{"type":"string","example":"123 Main St","nullable":true},"tax_id":{"type":"string","example":"US-EIN-123456","nullable":true},"tax_label":{"type":"string","example":"Sales Tax","nullable":true,"description":"Label for the tax line on receipts"},"tax_rate":{"type":"string","example":"8.5","nullable":true,"description":"Tax rate as a percentage (0–100)"}}}}}},"responses":{"200":{"description":"Profile updated","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"profile":{"$ref":"#/components/schemas/Profile"}}}}}},"400":{"$ref":"#/components/responses/InvalidInput"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/InsufficientScope"}}}},"/api/v1/wallets":{"get":{"tags":["Wallets"],"summary":"List wallets","description":"Returns all wallets. Pass ?include=balance to get live USDT and USDC balances (cached for 60s).","operationId":"listWallets","security":[{"bearerAuth":[]}],"parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string","enum":["balance"]},"description":"Set to 'balance' to include live USDT and USDC balances per wallet"}],"responses":{"200":{"description":"Wallet list","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"wallets":{"type":"array","items":{"$ref":"#/components/schemas/Wallet"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Wallets"],"summary":"Add a wallet","operationId":"addWallet","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address"],"properties":{"address":{"type":"string","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28"},"label":{"type":"string","example":"Main wallet"}}}}}},"responses":{"201":{"description":"Wallet added","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"wallet":{"$ref":"#/components/schemas/Wallet"}}}}}},"400":{"$ref":"#/components/responses/InvalidInput"},"403":{"$ref":"#/components/responses/InsufficientScope"},"409":{"description":"Wallet already added"}}}},"/api/v1/wallets/{id}":{"delete":{"tags":["Wallets"],"summary":"Remove a wallet","description":"Removes a wallet from your account. Fails if the wallet has active (open) payment requests.","operationId":"removeWallet","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Wallet removed"},"400":{"description":"Wallet has active payment requests"},"403":{"$ref":"#/components/responses/InsufficientScope"},"404":{"description":"Wallet not found"}}}},"/api/v1/wallets/{id}/challenge":{"get":{"tags":["Wallets"],"summary":"Get verification challenge","description":"Returns a message to sign with your Ethereum wallet to prove ownership.","operationId":"getWalletChallenge","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Challenge message","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"message":{"type":"string"}}}}}},"404":{"description":"Wallet not found"}}}},"/api/v1/wallets/{id}/verify":{"post":{"tags":["Wallets"],"summary":"Verify wallet ownership","description":"Submit the signed challenge message to verify you own this wallet address.","operationId":"verifyWallet","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["signature"],"properties":{"signature":{"type":"string"}}}}}},"responses":{"200":{"description":"Wallet verified"},"400":{"description":"Invalid signature"},"404":{"description":"Wallet not found"}}}},"/api/v1/wallets/{id}/transactions":{"get":{"tags":["Wallets"],"summary":"Scan on-chain USDT transfers","description":"Queries Ethereum for recent incoming USDT transfers to this wallet. Cross-references against open payment requests.","operationId":"scanWalletTransactions","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"blocks","in":"query","required":false,"schema":{"type":"integer","default":50000,"maximum":500000},"description":"How many blocks back to scan"}],"responses":{"200":{"description":"Transfers found","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"wallet_address":{"type":"string"},"from_block":{"type":"integer"},"to_block":{"type":"integer"},"blocks_scanned":{"type":"integer"},"transfers":{"type":"array","items":{"type":"object","properties":{"tx_hash":{"type":"string"},"from_address":{"type":"string"},"to_address":{"type":"string"},"amount_usdt":{"type":"string"},"block_number":{"type":"integer"},"already_used":{"type":"boolean"},"matching_request":{"type":"object","nullable":true}}}}}}}}},"404":{"description":"Wallet not found"},"502":{"description":"Ethereum RPC error"}}}},"/api/v1/checkouts":{"post":{"tags":["Checkouts"],"summary":"Create a checkout","description":"Creates a reusable payment link. Checkouts can accept multiple payments (e.g. for a product page).","operationId":"createCheckout","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount_usdt","recipient_address"],"properties":{"title":{"type":"string","example":"Premium Plan"},"memo":{"type":"string","example":"Monthly subscription"},"amount_usdt":{"type":"string","example":"49.99"},"recipient_address":{"type":"string","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28"},"collect_buyer_info":{"type":"boolean","default":false,"description":"Require buyer name/email before payment"},"expires_at":{"type":"string","format":"date-time","description":"Optional expiration timestamp"},"token":{"type":"string","enum":["USDT","USDC"],"default":"USDT","description":"Which stablecoin to accept (default: USDT)"}}}}}},"responses":{"201":{"description":"Checkout created","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"checkout":{"$ref":"#/components/schemas/PaymentRequestSummary"}}}}}},"400":{"$ref":"#/components/responses/InvalidInput"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/WalletNotRegistered"}}}},"/api/v1/checkouts/{id}/receipts":{"get":{"tags":["Checkouts"],"summary":"List checkout receipts","description":"Returns all verified payment receipts for a checkout.","operationId":"listCheckoutReceipts","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Receipts","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"receipts":{"type":"array","items":{"$ref":"#/components/schemas/Receipt"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Checkout not found"}}}},"/api/v1/invoices":{"post":{"tags":["Invoices"],"summary":"Create an invoice","description":"Creates a one-time invoice with line items. The total is calculated from the line items plus any tax from your profile.","operationId":"createInvoice","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["recipient_address","line_items"],"properties":{"title":{"type":"string","example":"Smart contract audit"},"memo":{"type":"string","example":"Net 30"},"recipient_address":{"type":"string","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28"},"client_name":{"type":"string","example":"Acme DAO"},"client_email":{"type":"string","format":"email","example":"billing@acme.com"},"due_date":{"type":"string","format":"date","example":"2026-06-15"},"line_items":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/LineItemInput"}},"token":{"type":"string","enum":["USDT","USDC"],"default":"USDT","description":"Which stablecoin to accept (default: USDT)"}}}}}},"responses":{"201":{"description":"Invoice created","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"invoice":{"type":"object","properties":{"id":{"type":"string"},"invoice_number":{"type":"string","example":"INV-2026-0001"},"url":{"type":"string"},"amount_usdt":{"type":"string"},"status":{"type":"string"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"}}}}}}}}},"400":{"$ref":"#/components/responses/InvalidInput"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/WalletNotRegistered"}}}},"/api/v1/payment-requests":{"get":{"tags":["Payment Requests"],"summary":"List payment requests","description":"Returns all checkouts and invoices for the authenticated user.","operationId":"listPaymentRequests","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Payment requests","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"payment_requests":{"type":"array","items":{"$ref":"#/components/schemas/PaymentRequest"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/v1/payment-requests/{id}":{"get":{"tags":["Payment Requests"],"summary":"Get a payment request","description":"Public endpoint — no authentication required. Returns payment request details including line items for invoices.","operationId":"getPaymentRequest","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Payment request","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"payment_request":{"$ref":"#/components/schemas/PaymentRequest"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"},"description":"Present for invoices only"}}}}}},"404":{"description":"Not found"}}}},"/api/v1/payment-requests/{id}/void":{"post":{"tags":["Payment Requests"],"summary":"Void a payment request","description":"Cancels an open payment request. Cannot void a paid request.","operationId":"voidPaymentRequest","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voided"},"400":{"description":"Cannot void (already paid)"},"403":{"description":"Not your payment request"},"404":{"description":"Not found"}}}},"/api/v1/payment-requests/{id}/verify":{"post":{"tags":["Payment Requests"],"summary":"Verify a payment","description":"Submit an Ethereum transaction hash to verify an on-chain payment (USDT or USDC, matching the token selected at creation). If valid, a receipt is created. Accepts payments within 1% of the requested amount.","operationId":"verifyPayment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tx_hash"],"properties":{"tx_hash":{"type":"string","example":"0xabc123...","description":"Ethereum transaction hash (0x + 64 hex chars)"},"client_name":{"type":"string","description":"Buyer name (required if checkout has collect_buyer_info enabled)"},"client_email":{"type":"string","format":"email","description":"Buyer email (required if checkout has collect_buyer_info enabled)"}}}}}},"responses":{"201":{"description":"Payment verified, receipt created","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"status":{"type":"string","example":"paid"},"receipt":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"amount_usdt":{"type":"string"},"tx_hash":{"type":"string"}}}}}}}},"202":{"description":"Waiting for confirmations","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":false},"error":{"type":"string","example":"WAITING_FOR_CONFIRMATIONS"},"confirmations":{"type":"integer"},"confirmations_required":{"type":"integer","example":3}}}}}},"400":{"description":"Verification failed (see error codes)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"tx_not_found":{"value":{"ok":false,"error":"TRANSACTION_NOT_FOUND"}},"underpayment":{"value":{"ok":false,"error":"PAYMENT_AMOUNT_TOO_LOW","required_usdt":"750","received_usdt":"100"}},"already_used":{"value":{"ok":false,"error":"TRANSACTION_ALREADY_USED"}},"expired":{"value":{"ok":false,"error":"PAYMENT_REQUEST_EXPIRED"}}}}}},"404":{"description":"Payment request not found"}}}},"/api/v1/receipts":{"get":{"tags":["Receipts"],"summary":"List receipts","description":"Returns all verified receipts for the authenticated user.","operationId":"listReceipts","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Receipts","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"receipts":{"type":"array","items":{"$ref":"#/components/schemas/Receipt"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/v1/receipts/export/csv":{"get":{"tags":["Receipts"],"summary":"Export receipts as CSV","description":"Downloads all receipts as a CSV file for accounting/compliance.","operationId":"exportReceiptsCsv","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"CSV file","content":{"text/csv":{"schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/v1/receipts/{id}":{"get":{"tags":["Receipts"],"summary":"Get a receipt","description":"Public endpoint — returns a verified on-chain receipt.","operationId":"getReceipt","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Receipt","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"receipt":{"$ref":"#/components/schemas/Receipt"}}}}}},"404":{"description":"Not found"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key from the dashboard. Pass as: Authorization: Bearer usdr_..."}},"schemas":{"Error":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","example":false},"error":{"type":"string","example":"ERROR_CODE"},"message":{"type":"string"}}},"ApiKey":{"type":"object","properties":{"id":{"type":"string","example":"key_abc123"},"name":{"type":"string","example":"My Agent"},"scope":{"type":"string","enum":["full","user"],"example":"user","description":"Permission scope — 'full' has unrestricted access, 'user' is restricted to checkout/invoice operations with registered wallets"},"mode":{"type":"string","enum":["live","test"],"example":"test","description":"Key mode — 'test' uses mock verification (sandbox), 'live' verifies on Ethereum mainnet"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"last_used_at":{"type":"string","format":"date-time","nullable":true}}},"Profile":{"type":"object","properties":{"business_name":{"type":"string","nullable":true},"business_address":{"type":"string","nullable":true},"tax_id":{"type":"string","nullable":true},"tax_label":{"type":"string","nullable":true},"tax_rate":{"type":"string","nullable":true}}},"Wallet":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28"},"network":{"type":"string","example":"ethereum"},"label":{"type":"string","nullable":true},"is_verified":{"type":"boolean"},"verified_at":{"type":"string","format":"date-time","nullable":true},"created_at":{"type":"string","format":"date-time"},"balances":{"type":"object","description":"Present when ?include=balance is passed","properties":{"USDT":{"type":"string","example":"1250.00"},"USDC":{"type":"string","example":"340.50"}}}}},"PaymentRequestSummary":{"type":"object","properties":{"id":{"type":"string","example":"chk_abc123"},"url":{"type":"string","example":"https://usdreceipt.xyz/pay/chk_abc123"},"amount_usdt":{"type":"string","example":"49.99"},"recipient_address":{"type":"string"},"token":{"type":"string","enum":["USDT","USDC"],"example":"USDT"},"status":{"type":"string","enum":["open","pending_confirmation","paid","expired","void"]}}},"PaymentRequest":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["checkout","invoice"]},"amount_usdt":{"type":"string"},"status":{"type":"string","enum":["open","pending_confirmation","paid","expired","void"]},"title":{"type":"string","nullable":true},"memo":{"type":"string","nullable":true},"recipient_address":{"type":"string"},"network":{"type":"string","example":"ethereum"},"currency":{"type":"string","example":"USDT"},"token":{"type":"string","enum":["USDT","USDC"],"example":"USDT","description":"The stablecoin for this payment request"},"client_name":{"type":"string","nullable":true},"due_date":{"type":"string","nullable":true},"expires_at":{"type":"string","nullable":true},"collect_buyer_info":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"paid_at":{"type":"string","format":"date-time","nullable":true},"receipt_id":{"type":"string","nullable":true}}},"LineItemInput":{"type":"object","required":["description","quantity","unit_price_usdt"],"properties":{"description":{"type":"string","example":"Smart contract audit"},"quantity":{"type":"integer","minimum":1,"example":1},"unit_price_usdt":{"type":"string","example":"2500"}}},"LineItem":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"integer"},"unit_price_usdt":{"type":"string"},"total_usdt":{"type":"string"}}},"Receipt":{"type":"object","properties":{"id":{"type":"string","example":"rcpt_abc123"},"receipt_number":{"type":"string","example":"REC-2026-0001"},"payment_request_id":{"type":"string"},"seller_id":{"type":"string"},"client_name":{"type":"string","nullable":true},"client_email":{"type":"string","nullable":true},"network":{"type":"string","example":"ethereum"},"token":{"type":"string","example":"USDT"},"amount_usdt":{"type":"string","example":"49.99"},"amount_base_units":{"type":"string"},"from_address":{"type":"string"},"to_address":{"type":"string"},"tx_hash":{"type":"string"},"block_number":{"type":"integer"},"confirmations_at_verification":{"type":"integer"},"verified_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}}}},"responses":{"InvalidInput":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"ok":false,"error":"INVALID_INPUT","message":"Details"}}}},"Unauthorized":{"description":"Missing or invalid API key / session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"ok":false,"error":"UNAUTHORIZED"}}}},"InsufficientScope":{"description":"User-scoped key lacks permission for this endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"ok":false,"error":"INSUFFICIENT_SCOPE","message":"This endpoint requires full access. User-scoped API keys cannot perform this action."}}}},"WalletNotRegistered":{"description":"User-scoped key tried to use an unregistered wallet address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"ok":false,"error":"WALLET_NOT_REGISTERED","message":"User-scoped keys can only create checkouts with a registered wallet address"}}}}}}}