Stripe Express Subscription
POST
/api/payments/stripe/express-subscription
const url = 'https://example.com/api/payments/stripe/express-subscription';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/payments/stripe/express-subscriptionCreate a Stripe subscription directly using a PaymentMethod (Payment Request Button flow).
Body: { “package_id”: str, “payment_method_id”: str } Returns: { subscription_id, client_secret?, status }
- client_secret present when further confirmation (SCA) may be required.
- Caller should, if client_secret returned with a status requiring action, invoke stripe.confirmCardPayment on frontend.
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Examplegenerated
example