#kenneth_paymentmethods-setupfutureusage
1 messages ยท Page 1 of 1 (latest)
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.
- kennethj_api, 5 days ago, 39 messages
๐ 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.
kenneth_paymentmethods-setupfutureusage
@royal tapir you can use https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method_options-card-setup_future_usage which lets you configure the ability to save the card only for card payments. If you pass the "top-level" parameter it applies to all payment methods you're passing in payment_method_types for example
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
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?
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
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
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?
I think it works. Easiest is to try end to end and see!
yep about to try
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
affirm isn't one of those types listed
you can control this in the API or explicitly using https://dashboard.stripe.com/settings/billing/invoice?tab=general to configure the default payment methods on Invoice or subscrption
okay then that's just not supported today in that case
i've tried to just use the dashboard and not pass the types, but then affirm didn't load
it'd be a feature request to our support team: https://support.stripe.com/contact
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
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
ok thanks, @dim pollen do you have any idea if there is a way around this in one of the current betas?
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?
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
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
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
Unfortunately not ๐ , there's no beta that I'm aware of. The post payment invoice feature is not a beta, it's already available
i believe it is called "Elements with Custom Checkout"
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
heh, a week ahead of you there...but still going back and forth