Flows

Checkout & accounts

Open in app

Sell prop-trading challenges with Stripe. Create a PaymentIntent, collect payment with Stripe Elements, and a funded prop account is provisioned automatically when the payment succeeds.

How it works

  1. Call POST /v2/payments/checkout to create a PaymentIntent.
  2. Confirm payment in the browser with the returned client_secret + Stripe Elements.
  3. Stripe fires payment_intent.succeeded → the API provisions a prop account.
  4. Poll GET /v2/payments/prop-accounts until the new account appears.

Provisioning is async

The account is created by the webhook, not the checkout call. Poll (this app waits up to ~30s) or listen for the payment.succeeded webhook before redirecting the user.

Create a checkout (PaymentIntent)

POST/v2/payments/checkout
User session
Request body
tier_idstring
required
Challenge tier identifier
marketstring
required
e.g. "crypto"
asset_classstring
required
e.g. "crypto" / "forex"
account_sizenumber
required
Funded account size in USD
amount_centsnumber
required
Price charged, in cents
currencystringoptionalDefaults to "usd"
curl
curl -X POST http://localhost:8000/v2/payments/checkout \
  -H "Authorization: Bearer <app_access_token>" \
  -H "X-Session-Token: <user_session_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "tier_id": "tier_25k",
    "market": "crypto",
    "asset_class": "crypto",
    "account_size": 25000,
    "amount_cents": 19900,
    "currency": "usd"
  }'
200 OK
{
  "payment_id": "pay_...",
  "stripe_payment_intent_id": "pi_...",
  "client_secret": "pi_..._secret_...",
  "amount_cents": 19900,
  "currency": "usd",
  "status": "requires_payment_method"
}
confirm in the browser
import { loadStripe } from "@stripe/stripe-js";

const stripe = await loadStripe(process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!);
// render <Elements options={{ clientSecret }}> with <PaymentElement />, then:
await stripe.confirmPayment({ elements, redirect: "if_required" });

Create a free account

Provision a no-charge account (e.g. for demos or comped traders) without Stripe.

POST/v2/payments/free
User session
Request body
{ "tier_id": "tier_demo", "asset_class": "crypto", "account_size": 10000 }

List prop accounts

GET/v2/payments/prop-accounts
User session
200 OK
[
  {
    "id": "prop_...",
    "tier_id": "tier_25k",
    "asset_class": "crypto",
    "account_size": 25000,
    "status": "active",
    "subaccount_id": 42,
    "subaccount_uuid": "9c1...",
    "synthetic_hotkey": "5F...",
    "stripe_payment_intent_id": "pi_..."
  }
]
GET
/v2/payments/prop-accounts

Runs live against your environment using the app's server-side credentials and your session. Sign in to the dashboard first for authenticated reads.

Fetch one by id with GET /v2/payments/prop-accounts/{id}.