#kenneth_paymentmethods-setupfutureusage

1 messages ยท Page 1 of 1 (latest)

obtuse boneBOT
vernal orchidBOT
#

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.

obtuse boneBOT
#

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

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

vernal orchidBOT
tall mountain
#

kenneth_paymentmethods-setupfutureusage

royal tapir
#

i'm trying to do a flow where i don't create the payment intent until after i've collected payment

#

sicne i have the option to add a subscription on my checkotu page and i need to rebuild the elements etc if that box is checked to have the mode be subscription

#

or can i do that server side even if it doesn't match the stripe element creation properties

tall mountain
#

I don't entirely follow your ask. The error you get is because you explicitly pass setup_future_usage top-level and also force Affirm at the same time.

Can you give me a bit more context/details on your exact code and what is triggering that error and where?

royal tapir
#

yes i do that in the options for the payment elements

#

but when i create the payment element i don't yet have a payment intent

#

i'm building the flow to create the payment intent after the card is collected

tall mountain
#

Gotcha, it's impossible in PaymentElement to configure setup_future_usage just for cards unfortunately so there's no way to do this unless you create the intent first

royal tapir
#

can i set that payment_method_options={'card':{'setup_future_usage':'off_session'}}, on the payment element as well?

#

oh no

#

ok

#

that design seems problematic

#

weill it work if i just add that option on the server side when i create the payment intent

#

or will it error because it doesn't match the element?

tall mountain
#

I think it works. Easiest is to try end to end and see!

royal tapir
#

yep about to try

vernal orchidBOT
royal tapir
#

ok yes, excellent, thanks... that did seem to work so i can kinda get where i need to with that.... I asked the other day, but still haven't figured out a way to do one other thing. How can i create an invoice for an affirm payment via api?

#

if i create the invoice via api the pi is automatically created....and there doesn't appear to be away to add affirm as a payment method

#

any work arounds here? some people have been mentioning a beta involving payment elements and checkout, but i can't seem to get a straight answer whether or not there is some solution lurking in there

royal tapir
#

affirm isn't one of those types listed

tall mountain
#

okay then that's just not supported today in that case

royal tapir
#

i've tried to just use the dashboard and not pass the types, but then affirm didn't load

tall mountain
royal tapir
#

i'll do that, but it doesn't really help me now... any other ways to accomplish that?

#

i'd like all my payments to be backed by an invoice with line items

tall mountain
#

I have to run but @dim pollen is going to take over. But what you are trying to do is just impossible for now so you can't, at least not until we build it

royal tapir
#

ok thanks, @dim pollen do you have any idea if there is a way around this in one of the current betas?

dim pollen
#

Hello! Gimme a while to catch up

#

To clarify, do you want to use affirm for a one time payment only? And you want an invoice for that?

royal tapir
#

yea that's the sorta sticky case i'm tryign to work through

#

but my checkout page will have the payment element that will list affirm/cards/wallets/link

#

i'd like an invoice for any of those options

dim pollen
#

Like what koopajah mentioned right now, that's not possible with your current flow. If you use Checkout Sessions instead, it's possible to generate a post payment invoice, but you lose the ability to customize your UI

royal tapir
#

yea, thats why i was wondering about the current checkout beta

#

i thought there may be a way to use sessions but still customize my ui with elements

#

but i haven't been able to find any documentation

dim pollen
#

Unfortunately not ๐Ÿ˜…, there's no beta that I'm aware of. The post payment invoice feature is not a beta, it's already available

royal tapir
#

i believe it is called "Elements with Custom Checkout"

dim pollen
#

i don't really have a lot of info on Elements with Custom Checkout that I can share at the moment, if you want to find out more, I'll recommend reaching out to Stripe Support and the relevant team will get back to you about it

royal tapir
#

heh, a week ahead of you there...but still going back and forth