#adi_invoice-fees

1 messages ยท Page 1 of 1 (latest)

potent atlasBOT
#

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

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

sage urchin
#

Which Invoice page are you referring to? And what fees specifically do you want it to show?

lost swallow
#

(this is a live, production invoice do not run a payment)

#

how do we a) show the payment processing fee and b) adjust what's shown based on the payment method selected

sage urchin
# lost swallow how do we a) show the payment processing fee and b) adjust what's shown based on...

You can't adjust this dynamically based on the Payment Method type that the customer selects. You would need to know that ahead of time (e.g. before you create the Invoice). As for fees, in order to pass them on to the customer and show them in the Invoice, you would have to create new Invoice Items for each fee you want to charge and attach those to the Invoice at some point before sending the Customer to the hosted invoice page

lost swallow
#

what about the use case of a customer that doesn't have a payment method when the invoice is created?

#

how do we know what fee to attach to the invoice?

#

@sage urchin are you a Stripe developer?

sage urchin
#

Yes

sage urchin
lost swallow
#

That workaround makes sense. So we would only show the link to the hosted invoice page to the end user after a payment method has been selected. We would then create the invoice and then display the hosted invoice page.

#

Assuming we use a separate flow to collect payment method.

stark crater
#

Hey @sage urchin (Adi teammate here), correct me if I'm wrong, but even if a user has a payment method attached to their account, they can still enter a different payment method on the hosted invoice page when we send an invoice, right?

lost swallow
#

so what's the workaround for that case?

sage urchin
lost swallow
#

can we disable the ability to select a payment method on the hosted invoice page?

stark crater
lost swallow
#

@sage urchin how are your other customers doing this? just a quick high-level explaination.

sage urchin
#

Other customers would do something similar, but would likely not use the hosted invoice page. For this flow they would likely code up a custom workflow where they setup a new Payment Method for future payments via the Payment Element, then create and display the Invoice with all of its corresponding Invoice Items to represent the fees.

lost swallow
#

makese sense. @stark crater sounds like we may have to unbundle the hosted invoice page, and build out a custom flow.

#

@sage urchin do you happen to have an example of a customer using this custom flow showing processing fees? would be great for us to view how their invoice flow does this.

sage urchin
#

I don't unfortunately. It's not a workflow that we see very often

pine anchorBOT
hoary spear
#

adi_invoice-fees

lost swallow
#

Still a little unclear on how to handle the case where a customer does not have a payment method upfront but we send them an invoice. Are we able to send out a draft invoice that we can then update after the payment method has been selected (via payment elements)?

#

update the custom fee line item*

hoary spear
#

@lost swallow no that's impossible we don't support something like this. And we often discourage anyone from trying this because it's hard to build right really.
In that case you would have to ask them first what payment method they plan to use and then create the Invoice as a result of that. And if they change their mind you would void that Invoice, create a new one for the other payment method, until they pay

lost swallow
#

@hoary spear so what you are effectively saying is that the payment method has to be collected upfront as a requirement before an invoice can be sent.

hoary spear
#

if you have a hard requirement of adding fees that is specific to the payment method then yes

lost swallow
#

got it. ok.

#

could we do something like: create invoice, send invoice, user selects payment method, void invoice, create new invoice with payment method (all in one session)?

hoary spear
#

yes that would work

lost swallow
#

ok great

#

@stark crater โ˜๏ธ if we did this all in the background, it could work.

stark crater
#

user selects payment method

That would be the tricky part if we use hosted invoices because we wouldn't have a way to know which payment method they selected.

lost swallow
#

we wouldn't use the hosted invoice page

#

we create a custom invoice page, with stripe invoice line items.

hoary spear
#

yeah you have to build it all yourself

lost swallow
#

at the api-level we would be doing all the creating and voiding and then render it on a custom page.

stark crater
#

Maybe we would not even need a stripe invoice when they select their payment method and then void @lost swallow

lost swallow
#

yea, even that would be custom

hoary spear
#

yeah that is a good point, if you don't need an Invoice this becomes drastically easier

stark crater
#

That would be creating a payment intent directly?

hoary spear
#

yes

stark crater
#

Make sense.

lost swallow
#

hmm, we still need an invoice as a record of the service.

hoary spear
#

you can always do your own invoice logic though without Stripe.

lost swallow
#

lol - that's exactly what we were debating internally.

#

before this topic came up

hoary spear
#

We don't have a way to tie an Invoice to a previously paid PaymentIntent. I hope we build this in the future because that's exactly what people like you need but it's unlikely to happen soon ๐Ÿ˜ฆ

lost swallow
#

got it ok. so sounds like the best path is to build the invoicing flow ourselves and directly create payment intents?

#

i.e. not use Stripe Invoicing

hoary spear
#

yes. Or skip the "overcharge" for the payment method. Increase your fees and bundle the Stripe cost into it.
I know it's easier said than done but it's what everyone else does

lost swallow
#

Yes, that alternative is a good suggestion.

stark crater
#

Thanks @hoary spear