#k3davis_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1251179506207686790
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
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.
- k3davis_api, 2 days ago, 5 messages
^ previous conversation was for a different issue, is unrelated to this question
Hi, when you create the payment intent, you need to pass the alreadt saved payment method id: https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method.
On this request, https://dashboard.stripe.com/logs/req_nBQouojBW3r5JO you're passing the payment method details all over again.
This code is coming from your back end so you would want to look into that and pass the pm_ id from the original setup
this request is the first request, i'm creating the payment method with the payment intent by setting setup future usage = off_session. i'm not creating the payment method separately first and resending it here
am i just trying to do too many things in a single request that i should split up?
eg by creating a payment method by using setup_future_usage does that prevent me from getting the mandate id for future use
No, if this is your first request that is fine. On your subsequent request to create a PaymentIntent, you would want to pass that payment method id returned.
When you use setup_future_usage it indicated that you want to use this in the future and the mandate will be handled for multi use.
i don't currently have any subsequent request, because this request is both creating the payment intent and setting up for future usage with mandate data. but i get the payment method id back without the mandate id that corresponds with it.
I think that is expected, here is the mandate id: mandate_1PRZ4iFnSqw89al6lqRcg1Lw
thank you, but how did you determine that? that's what i'm trying to figure out ๐
sorry if i'm not asking the question clearly
You can find the mandate ids here: https://dashboard.stripe.com/customers/cus_P7TDVcC6x7vhd0 after you open the PaymentMethod.
this is an api integration, i need to be able to obtain it from the api somehow, not from the dashboard
In this case, you'd want to listen to mandate.updated event and attain the id that way, https://docs.stripe.com/api/events/types?event_types-invoice.payment_succeeded=#event_types-mandate.updated