#mandalorianiv_best-practices
1 messages · Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- mandalorianiv_webhooks, 1 day ago, 35 messages
- mandalorianiv_best-practices, 2 days ago, 27 messages
👋 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/1217809858087227423
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
there is a section called setup_future_usage
there are two enum values, onSession and offSession
I don't understand the definitions of them
when I click save, should I say onSession and if I don't offSession so card is not attached to the customer as payment intent
in order for that checkbox to appear, you should not pass anything for setup_future_usage when creating the PaymentIntent. That way the frontend mobile SDK will allow the customer to pick it instead. Assuming you are specifically building a mobile integration.
if you use setup_future_usage with any value, the card wll be saved to the Customer. The difference is in how it's saved so what's optimised for (off_session for if you will charge the card from your backend server later, on_session for if all payments take place on oyur site/app with the customer there).
so I need to send onSession if I want to save it and use the payment method in the future with app
And if I don't want to save, I should not send any value
it should be null
is this correct
not really
yes. If you do that , it's saved. There's no checkbox in the mobile app, because you already chose it.
if you don't want to save I think the best option is to not pass a customer and ephemeralKey.
if you leave it null, and you set customer and ephemeralKey, the checkbox appears and it's up to the customer if they want to save the card or not.
hmm
react native sdk supports that directly?
I mean I don't know how to implement that,
My payment system works like
create Stripe payment in our backend
show payment sheet
->payment sheet is customized, I have a card field and pay button which is seperated the ready made UI cause I need to make basket valıdation before payment
and I do confirm the payment via confirmPayment function
I want to send a parameter to stripe in confirmPayment so card can be saved
since I use a custom build I'm not sure that premade save button will appear
I explained above when it appears
then I will try to do this