Skip to content

Pay API

The pay namespace covers three sub-surfaces under /v1/pay. Each one is wired to the nyuchi_pay_db Supabase project, but the database schema is not yet provisioned—data endpoints currently return HTTP 501. Use the status endpoint to discover readiness without triggering a 501.

Sub-namespacePurpose
/v1/pay/walletUser wallets, balances, and transaction history.
/v1/pay/tokensToken types and lifecycle stage (MIT, MXT, NST).
/v1/pay/gatewayFiat on/off-ramps, deposits, withdrawals, third-party processors.

GET /v1/pay/status is always available. It tells the caller whether the gateway has credentials for the pay database and whether the schema is ready.

Terminal window
curl https://api.nyuchi.com/v1/pay/status
{
"configured": true,
"schema_ready": false,
"sections": ["wallet", "tokens", "gateway"]
}

When configured is false, the gateway has no pay-DB credentials in this environment. When configured is true but schema_ready is false, data endpoints return 501 until the schema lands.

MethodPathAuthStatus today
GET/v1/pay/statusPublicAlways live.
GET/v1/pay/wallet/Required501 — schema pending.
GET/v1/pay/wallet/transactionsRequired501 — schema pending.
GET/v1/pay/tokens/Required501 — schema pending.
GET/v1/pay/tokens/{token_symbol}Required501 — schema pending.
GET/v1/pay/gateway/providersRequired501 — schema pending.
POST/v1/pay/gateway/depositRequired501 — schema pending.
POST/v1/pay/gateway/withdrawRequired501 — schema pending.
Terminal window
PAY_SUPABASE_URL=https://<project>.supabase.co
PAY_SUPABASE_PUBLISHABLE_KEY=sb_publishable_...
PAY_SUPABASE_SECRET_KEY=sb_secret_...

If these variables are unset, every pay endpoint—including status—reports configured: false.