01 / MERCHANTS
Register
POST /api/merchants/register
{
"business_name": "Northstar Studio",
"email": "billing@example.com",
"wallet_address": "0x…",
"payout_address": "0x…",
"password": "strong-secret",
"webhook_url": "https://example.com/hooks"
}
Returns profile fields including api_key. Errors: 400 duplicate email.
02 / MERCHANTS
Login & profile
POST /api/merchants/login
{ "email": "billing@example.com", "password": "strong-secret" }
GET /api/merchants/me returns the current profile. PATCH /api/merchants/me accepts any subset of email, business_name, wallet_address, payout_address, and webhook_url.
03 / PAYMENTS
Create checkout
POST /api/payments/checkout/create
{
"amount": "49.00",
"currency": "USDT",
"order_id": "ORDER-1048",
"description": "Studio session",
"success_url": "https://shop.example/success",
"cancel_url": "https://shop.example/cart",
"metadata": "source=web"
}
Requires X-API-Key. Returns payment_id, status, checkout_url, amount, currency, merchant wallet, and creation time. Status begins as created.
04 / PAYMENTS
Read & track
GET /api/payments/…
GET /api/payments/ lists the authenticated merchant’s payments, newest first. GET /api/payments/{payment_id} returns a full payment record. GET /api/payments/{payment_id}/status returns:
{
"payment_id": "pay_abc123",
"status": "confirmed",
"amount": "49.00",
"tx_hash": "0x…",
"confirmed_at": "2026-11-07T10:30:00Z"
}
05 / PAYMENTS
Confirm transaction
POST /api/payments/{payment_id}/confirm
Current FastAPI parameters are query parameters, not JSON:
?tx_hash=0x…&customer_wallet=0x…
On success returns {"status":"confirmed","payment":{…}}. Can return 400 for duplicate, expired, or invalid transactions and 404 if payment is missing.
06 / HOSTED CHECKOUT
Customer checkout page
GET /checkout/{payment_id}
Returns the HTML wallet checkout (or an HTML state for invalid, expired, and completed payments). The `checkout_url` from create-payment points to this flow.