#ashtray-wasp_api

1 messages Β· Page 1 of 1 (latest)

calm torrentBOT
#

πŸ‘‹ 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/1308731388752695336

πŸ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

shut fiber
#

πŸ‘‹ happy to help

#

could you try

{
  payment_method: "pm_1QJdIBF9R6Nkg8pofOT9znbz",
  off_session: true,
}

instead of your current request body??

sturdy pivot
#

Checking that

#

You cannot confirm with off_session=true when setup_future_usage is also set on the PaymentIntent. The customer needs to be on-session to perform the steps which may be required to set up the PaymentMethod for future usage. Please confirm this PaymentIntent with your customer on-session.

req_R5qL5oBQ3UnqS1

shut fiber
#

this is because you've already created the PaymentIntent with setup_future_usage

#

which you shouldn't do when you want to charge an existing payment method

#

try to create a new PaymentIntent

#

this time don't set setup_future_usage

sturdy pivot
#

This payment intent was created along with a subscription – is there any way I can prevent setup_future_usage being set?

shut fiber
#

oh this is the PaymentIntent of the subscription?

sturdy pivot
#

yes

shut fiber
#

the latest_invoice.payment_intent

#

in that case you should pass default_payment_method when you create the subscription

#

instead of trying to confirm the subscription's latest_invoice.payment_intent

sturdy pivot
#

I'm trying that out

#

Woah, it worked! So my setup was overly complicated for no reason. Thanks a lot!

shut fiber
#

at first I thought you were only creating a one-off payment (using the PaymentIntent) after saving the ACSS on a subscription

#

but for subsequent subscriptions you don't need to do all of that πŸ™‚

#

I'm glad we've got to resolve this

sturdy pivot
#

Yeah, I had one-off payments figured out but got confused about subscriptions πŸ˜„

Thanks for your time

shut fiber
#

sure let me know if you need any more help

sturdy pivot
#

I think I'm fine from now on, thanks