#dirtyred_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/1346656091978727515
đ Have more to share? Add more 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.
- dirtyred_api, 4 days ago, 19 messages
Hi! You can get the email and phone from the charge.succeeded event (evt_3Qz6cIEjhsTXrKxz0CeUlfVd) or alternatively you can retrieve the Payment Intent and expand the Payment Method [0, 1] to get the billing details [2].
[0] https://docs.stripe.com/api/payment_intents/object#payment_intent_object-payment_method
[1] https://docs.stripe.com/api/expanding_objects
[2] https://docs.stripe.com/api/payment_methods/object#payment_method_object-billing_details
ok great - how do i attach a payment method to a customer?
To attach a new PaymentMethod to a customer for future payments, you can use SetupIntent or PaymentIntent with setup_future_usage.
right i have done that but when i try to chage with the PM token - it says its not attached to a customer
You have not provided a customer object in the Payment Intent.
right - this is an express checkout element
i know NOTHING about the customer at that point - hence the express checkout
they come to my site, and without me knowing anything about them - they click on express checkout - say apple pay - and they finish checkout - and i can retrieve their information via the methods you described above - so how do i attach my PM token to a customer that i create later
"The provided PaymentMethod cannot be attached. To reuse a PaymentMethod, you must attach it to a Customer first."
thats the error i get - so i need to attach the pm token to the customer
"setup_future_usage"=>"off_session" is setup and the initial charge works great - but we offer a post purchse upsell where we use the pm token generated from the express checkout for an additional discounted charge
hence - after the succesful intial charge, i can create a customer in your system and then attach the PM token to that customer so i can charge them later
so - how do i connect the pm token to the customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.