collectPayment opens a hosted Stripe Checkout session for a workspace-defined billing plan. When a user triggers it — typically by clicking a pricing CTA — the runtime calls Stripe on the workspace’s behalf, returns a short-lived checkout_url, and your page redirects the user there. Revenue settles directly into the workspace owner’s Stripe Connect account; the platform holds no funds in transit. By the end of this page you can wire a CTA to charge a customer for a published plan.
Invoke from a CTA
The canonical pattern iscollectPayment on a Cta block’s on_click. Pass success_url and cancel_url as absolute URLs:
cta-pricing.json
checkout_url. The block redirects the browser to that URL — the user lands on Stripe’s hosted page, completes payment, and Stripe sends them to success_url (or cancel_url if they back out).
Inputs
Outputs
Provisioning
The workspace must complete Stripe Connect onboarding beforecollectPayment can dispatch. The Builder walks the workspace owner through the flow. Until onboarding is complete, every call returns stripe_not_connected. The programmatic onboarding endpoints live in the Monetization API.
Error codes
Every error returns the standard envelope:Related
listPlans
Fetch the workspace’s published billing plans to populate a pricing UI.
Accept payments guide
End-to-end walkthrough: Stripe Connect, plan setup, and CTA wiring.