#akzentmayer_api

1 messages ยท Page 1 of 1 (latest)

grim brookBOT
#

๐Ÿ‘‹ 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/1260392323158638602

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

half forum
#

hello! gimme a while to take a look

#

hrm, so that specific PaymentIntent from the Invoice doesn't actually have setup_future_usage set to off_session, that's why you can't save the corresponding PaymentMethod after. Let me think of what options are possible for you

elfin coral
#

thank you! no rush

#

ahhh, is that a configuration thing? i know that when we use confirmPayment from the front end (elements provider or something?) we don't have many config options. also at this point we assume the customer and subscription are already created

#

oh ok, it looks like before we call confirmPayment we pass in some StripeElementsOptions to <Elements> one of which is a payment intent

#

I assume when that's created, this is where I want to add setup_future_usage=on_session

half forum
#

hrm, gimme a while more, it's a bit odd, because my own PaymentIntent (from a Subscription update) does have setup_future_usage=off_session

#

you'll want off_session actually, not on_session

#

try using confirmPayment with setup_future_usage="off_session" and see if that works

elfin coral
#

const { error } = await stripe.confirmPayment({
elements,
confirmParams: {
return_url: ${window.location.origin}/billing/transactions?invoice_id=${invoiceId},
payment_method_data: {
billing_details: billingDetailsForStripe,
},
},
});

#

where in here does setup_future_usage belong? i didn't see it in the documentation

#

we're currently using stripe.SetupIntent.create without specifying usage and it says that's the default ๐Ÿค”

half forum
#

What i suggested previously won't work with confirmPayment

elfin coral
#

gotcha!

#

after more investigation, we're currently using stripe.SetupIntent.create without specifying usage and it says that's the default ๐Ÿค”

half forum
#

SetupIntents and PaymentIntents are two entirely different objects

#

you're attempting to collect payment for an Invoice using it's underlying PaymentIntent

#

you can tell which one it is based off the object id

#

for example a PaymentIntent starts with pi_

elfin coral
#

yes yes got that. sifting through our graphql

#

we can pick this up tomorrow too

#

i can try a couple things and get back to you if needed!

half forum
#

we have coverage close to 24/6 for this channel so we'll still be here ๐Ÿ˜

elfin coral
#

oh wow ๐Ÿ˜ฒ

half forum
#

the thread would be closed after a while of inactivity, but you can always refer back to it when you start a new thread