#vibelizard_api
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/1217473088204308512
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Stripe acct id: acct_1740fFKhVBWG4doE
Customer id: cus_PjKhg48kM8gBEm
Payment Method: pm_1Ots1dKhVBWG4doE6wp70o5w
Let me know if any other info is needed!
I don't think the payment method was set up correctly to be used for future charges
Can you clarify what you're trying to do?
i.e. what's your ideal flow?
We have an integration with Stripe to salesforce where customers redirect to Stripe Checkout to enter their payment method info. The PM is getting created through Stripe checkout. Then webhooks create the PM information in salesforce, ideally that payment method can be charged again through the payment intents API
the last step is where we are hitting the error.
Ideally when you want to create the PaymentMethod which can be used for future charges using PaymentIntents API, you need to set setup_future_usage parameter to off_session when you create the checkout session
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage
My team is not familiar with how salesforce integration is built exactly so can't say what you need to modify here
Does Stripe Checkout not set that parameter automatically to off_session? All we are doing in this case is redirecting to Stripe Checkout.
It does not.
Got it- is that configurable or no?
Not something my team on discord would know
If you're using the Stripe Connector for Stripe: https://docs.stripe.com/plugins/stripe-connector-for-salesforce/installation-guide
Then I would suggest you reach out to our support about that
https://support.stripe.com/?contact=true
Ok thank you! It looks like we may need to send an extra parameter when creating the session https://docs.stripe.com/payments/checkout/how-checkout-works#:~:text=Single payment—If your Checkout Session uses payment mode%2C set the payment_intent_data.setup_future_usage parameter.
Yep that is the parameter that hanzo linked to earlier. If you are writing the code that makes this API call, setting that parameter will tell Checkout to save the payment method that the user puts in.
Ok thanks guys that answers my question