#dirtyred_api

1 messages ¡ Page 1 of 1 (latest)

silent robinBOT
#

👋 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.

vivid vigil
warped mantle
#

ok great - how do i attach a payment method to a customer?

vivid vigil
#

To attach a new PaymentMethod to a customer for future payments, you can use SetupIntent or PaymentIntent with setup_future_usage.

warped mantle
#

right i have done that but when i try to chage with the PM token - it says its not attached to a customer

vivid vigil
#

You have not provided a customer object in the Payment Intent.

warped mantle
#

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