Sellers & resources
Accept-side APIs for sellers, priced resources, hosted gates, Stripe Profile (MPP/x402), Express or Standard Connect, withdraw, and recycle. Open-rail Accept credits seller balance; Connect withdraw Transfers that balance to the connected account.
Same flow in MCP: rill_sellers
Auth
Create seller, list sellers, recycle, and owner dashboard routes under /sellers/:id/* (Connect, payments, withdraw, resources) use an owner Supabase JWT. Agent/MCP seller-scoped routes under /sellers/me/* and /resources need Authorization: Bearer rill_sk_*. Send Idempotency-Key on withdraw, recycle, and resource PATCH.
Authorization: Bearer <owner JWT or rill_sk_*>Featured endpoints
Create a seller
POST /sellersCreate an Accept seller and receive a rill_sk_* key. Call this before pay links, Stripe Profile, or Connect. Save the key immediately, it is shown once.
Request body
What to save
Save the rill_sk_* seller key and seller id. Use the key for resources, payments, Connect, and withdraw.
- MCP twin: rill_sellers action=create.
Create a priced resource
POST /resourcesCreate a priced HTTP or MCP SKU. Response includes gate_url (agents pay this) and pay_url (human pay page, same as MCP pay_page_url). Prefer MCP/CLI create-pay-link for the composed Accept response. Agents pay gate_url with pay-url once payments are enabled.
Request body
What to save
Save gate_url for agents (the SKU). pay_url is the human pay page for the same resource (MCP/CLI call it pay_page_url). Also save resource id and short_id.
- List with GET /resources. Update with PATCH /resources/:id (idempotent).
- MCP/CLI twins: rill_create_pay_link / create-pay-link, rill_resources action=create|update|deactivate.
Enable MPP / x402 on gates
PATCH /sellers/me/paymentsEnable MPP/x402 on seller gate URLs so agents can finish pay. Optional stripe_profile_id when attaching a Stripe Profile. Open-rail settlement lands in Stripe and credits seller balance for Connect payout.
Request body
What to save
Confirm mpp_enabled / x402_enabled on the seller. Agents can then pay gate_url with open rails.
- Open-rail pays credit seller balance for Connect payout.
- MCP/CLI twins: rill_enable_payments / enable-payments.
Withdraw seller balance
POST /sellers/me/withdrawTransfer seller balance (open-rail Accept credits and ledger) to Stripe Express after Connect KYC. Complete Connect onboard with your country → sync until payouts_enabled first. Auto payout also runs when Connect is ready and balance meets the minimum.
Request body
What to save
Save the withdrawal id / status from the response. Check GET /sellers/me/balance for Connect readiness flags before retrying.
- Owner recycle into the account wallet: POST /sellers/:id/recycle.
- Connect steps: GET/POST /sellers/me/connect* or MCP rill_connect.
- MCP twins: rill_withdraw, rill_recycle.
All endpoints
Usage notes
- Accept go-live: create seller → gate URL → enable payments → webhook (payment.succeeded) → test with wallet pay-url.
- API pay_url = MCP/CLI pay_page_url (human page). Agents always pay gate_url.
- Dashboard owners can use /sellers/:id/* with JWT; agents keep /me + rill_sk_*.
- Send Connect onboard_url or login_url to a human, never complete KYC inside an agent.
- MCP/CLI twins: rill_sellers / create-seller / sellers list, create-pay-link, enable-payments, webhooks, rill_connect, rill_withdraw.