#steve-rector_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1407173673948942400
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi! You can complete the first payment with a successful card. After that you can update the customer's payment methods with one of the cards here: https://docs.stripe.com/testing#declined-payments. Then next invoice paid will use the declined card.
Hey Sam!
Thanks for following up, I think the block we run into there is updating the payment method, because the checkout session uses the payment method that is established during that initial checkout.
The basic idea is create an "off session" checkout session --> then, with flex's api, use that checkout session each time a payment needs to occur so the customer no longer needs to be directly involved.
so, if i used card exampleCard to create the initial checkout session, exampleCard is what is automatically used to charge the customer in followup payments ( as developer, you could set something up like "every 30 days, use the api with this checkout session to automatically charge the customer for x product"
Sorry I am not familiar with Flex's API or an "off-session" checkout session. Stripe's Checkout Session with mode: 'subscription' is customer facing. And then subsequent recurring payments happen automatically.