#raven-a-void_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/1423497308070219880
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there, give me a moment to catch up ๐
Hmm..yes, it is generally possible to save payment methods used on one-time payments for future use, but there are some nuances. Are you collecting payments via PaymentIntent directly, or using Stripe Invoicing?
Currently we're doing neither and looking at the best approach.
We will be using Laravel Cashier for the subscription management.
Ideally we'd be using payment intents for the one-time payments and just be able to provide our users the option to use the previous card or setup a new method in a new intent.
Got it. I can't really provide advise on Laravel Cashier because that's outside of Stripe.
But on Stripe's side, to save payment methods for future use from PaymentIntents, you'd want to ensure that setup_future_usage [0] is explicitly declared as off_session when the PaymentIntents are created. This is the integration doc you can reference: https://docs.stripe.com/payments/save-during-payment?payment-ui=elements
[0] https://docs.stripe.com/api/payment_intents/create#create_payment_intent-setup_future_usage
Literally found that page about 30s ago and was just reading it ๐
Thank you.
This looks good and perfect for the one-of charges, next part of the question is, if we've set this up correctly using off_session can the customer pick that payment method later when starting a subscription? (Assume we'd use stripe checkout for the subscription).
And final part (which doesn't really matter, but would be a nice thing) is can we setup a payment intent against a price from our Product catalogue, or are they for subscriptions only?
Hmm...by "pick that payment method later", I'm assuming you want to Stripe Checkout to display the customer saved payment methods? If yes, this is possible, but you likely need to update the saved payment method's allow_redisplay property. You need to do this because the payment method is saved from PaymentIntent directly, and the PaymentIntent API does not automatically allow payment methods to be redisplayed.
Therefore, Stripe Checkout won't display the saved payment method without you updating the Payment Method allow_redisplay property.
This is the section in Stripe Doc on redisplaying saved payment method on Stripe Checkout: https://docs.stripe.com/payments/existing-customers?platform=web&ui=stripe-hosted#display-additional-saved-payment-methods
[0] https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay
And final part (which doesn't really matter, but would be a nice thing) is can we setup a payment intent against a price from our Product catalogue, or are they for subscriptions only?
- I am understanding this as "can I use a Price object created under Product catalog in PaymentIntents directly" โ if my understanding is correct, then no. The Product and Price objects in your Stripe accounts can only be used for Stripe Checkout, Billing, Invoicing etc: https://docs.stripe.com/products-prices/how-products-and-prices-work
Yep that's exactly what I was after thanks!
Ah gotcha, no worries.
That was more just a nicety for reporting so isn't a big deal.
You've been super helpful, thank you
happy to help, feel free to let us know if you have other questions!