v2
latestOpenAPI 3.1.02026-08-05267431678.1 KBbilling
Setup Payment Method
Attach a payment method to the user's Stripe customer.
This endpoint:
- Creates a Stripe customer if one doesn't exist
- Attaches the payment method to the customer
- Sets it as the default payment method
- Checks card fingerprint for abuse (same card on too many teams)
- Stores the fingerprint and marks team as card-verified
Rate-limited to 5 attempts per user per hour. Each attempt captures a $1 PaymentIntent (real settled charge) for Stripe Radar fraud scoring, so unbounded retries let a single bot account incinerate Pioneer's Stripe fee budget and Radar reputation. The cap leaves plenty of headroom for legitimate users to retry on declined cards or SCA hiccups while denying bot farms unlimited attempts on the same compromised account.
Args: request: FastAPI request (required by SlowAPI rate limiter). body: Payment method ID from Stripe.js. auth: Authenticated user context.
Returns: Success status and customer ID.
post/billing/setup-payment-method
Request body
Response
Successful Response