#Niek
1 messages · Page 1 of 1 (latest)
Hi there!
If your goal is to create a subscription, we recommend this flow:
- Create a subscription in the backend
- Retrieve the
subscription.pending_setup_intent.client_secretand send it to your frontend - On the frontend collect the payment details with the client secret and the Payment Element
And the answer your question: you should use this test card instead: 4000002500003155
This card requires authentication for every payment unless you set it up for future payments. After you set it up, it no longer requires authentication.
Hi soma, well, that is how my current flow works, the problem is that a trial subscription is created before the user confirms his card. If the confirmation fails then the subscription is not automatically removed. Ideally it should initially be created in status "incomplete" until the new card gets confirmed, and only transition to "trialing" after the confirmation. Your colleague told me to do the confirmation at the time of collecting the card details