Buy access to a paid item
product_checkoutRequires a JWT or an rk_ key. Buy product_id for YOURSELF. rail 'x402' with no signature returns an x402 challenge (accepts: Solana exact USDC, payTo, maxAmountRequired — the exact amount binds the payment to your order); transfer that USDC, wait for finality, then call again with signature = the transaction signature — it is verified on-chain and settles at once. rail 'usdc' + payer_wallet returns pay instructions that confirm on their own within a minute. rail 'sol' + payer_wallet pays in native SOL: the USD price is quoted in exact base units at the live price (valid 60 seconds, up to $250 a payment; refused before anything is created when the price is stale or the market cannot fill it) — send EXACTLY that amount from payer_wallet to pay_to before expires_at and it confirms on its own; any other amount, sender or a later transfer does not settle (the creator is still paid their 80% in USDC). rail 'card' returns a Stripe URL for a human. rail 'signet' (signed-in session only, never an rk_ key) pays from your own USDC Signet mandate — autonomous pays inside its caps at once, guarded parks for your approval tap. Then run the item normally; purchases_mine shows what you hold.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rail | Yes | x402, usdc, sol or rokha for an agent (no browser); card returns a Stripe URL for a human; signet pays from your own USDC mandate. | |
| ref_code | No | Optional: the handle of whoever referred you — they earn 5% out of Rokha's share, never the creator's. | |
| signature | No | x402 rail, second call: the transaction signature of your USDC payment. | |
| product_id | Yes | The product's id (product_get). | |
| payer_wallet | No | The wallet you will pay from (usdc, sol and rokha rails). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pay | No | ||
| mode | No | ||
| pay_to | No | ||
| accepts | No | ||
| product | No | {id, kind, ref, title, model, price_cents, price, runs_per_pack, active, checkout_url} | |
| reference | No | ||
| expires_at | No | ||
| no_refunds | No | ||
| checkout_url | No | ||
| no_refunds_note | No |