Search code examples
stripe-paymentsbillingrecurring-billing

Payment information for Stripe Billing


I want to use Stripe Billing for recurring payments.

How do I collect payment information for this? I assume I'm supposed to use the Stripe Payments form, but this isn't spelled out anywhere I can see.

How does the flow between the two work? Is there an example implemented anywhere I can see?


Solution

  • There are a few steps involved here:

    1. You collect a customer's credit card information with a form using Checkout, Elements or a mobile SDK, it's securely sent to Stripe. In return you get back a token.

    2. You take this token, pass it off to your backend, where you tell Stripe to save the token to a Customer. https://stripe.com/docs/api#create_customer

    3. You can then start a Subscription with the card that has been saved on this Customer. https://stripe.com/docs/api#create_subscription

    If you want to see all the pieces come together, https://stripe.com/docs/billing/quickstart