#karsh-vat-invoices

1 messages · Page 1 of 1 (latest)

blazing willow
#

Hello 👋
Give me a few to catch up here

#

Are you using Stripe Tax or your own taxing solution for this?

onyx spoke
#

Also using stripe tax yes

blazing willow
#

Gotcha. Looking

onyx spoke
#

Thanks!

dull timber
#

hey @onyx spoke I'm taking over from @blazing willow

#

are your Checkout Sessions for one-time based or recurring payments?

onyx spoke
#

Can be both

dull timber
#

In the case of the recurring payments the invoice would be automatically generated for you, but you can also create an invoice for one time payment

#
onyx spoke
dull timber
#

Can we enable this for Connect accounts as well?
Are you using Direct or Destination Charges?

onyx spoke
#

Good question... I believe Direct. Where was this set up again? Where we create the check out session on our server?

dull timber
#

yes basically it depends on how you're creating the Checkout Session, whether you pass the stripeAccount to the second parameter of the create function

onyx spoke
#

Yeah we are passing the id of the connected account, so I think that makes it direct charges

dull timber
#

ok one more thing to clarify

#

when I said you could create invoices for one-time purchases, this would change it from your current Checkout flow

#

you could use this but you'd have to send the invoice for the user to pay, and it would take them to our Billing Portal where they will pay and receive the invoice afterwards

onyx spoke
#

And one more question, if I understand correctly. Our flow will be:

  1. User pays stripe checkout
  2. Our server receives webhook
  3. Our server creates invoice https://stripe.com/docs/api/invoices/create
    4. Our server sets invoice to paid
  4. stripe returns invoice object
  5. Our server gets invoice_pdf field and sends to client using our email integration

I'm unclear on how to do step 4 at this point. Since it looks like Stripe Checkout and Stripe Invoices don't work together?

#

Ah your comment just now changed the flow above...
I would really like to keep development time to a minimum now and keep the current flow. In that case, all we can do is manually create an invoice? Stripe Tax doesn't generate something for us?

#

With Manually I mean that we have to code something to generate that invoice

dull timber
#

Checkout and one-time purchase Invoices unfortunately don't work together for the moment

#

yes what I would suggest to do is the following

#

when you have a recurring purchase you keep your flow as is

#

but if it's a one-time purchase in that case you create an invoice with a collection_method = send_invoice and in your application you'd ask the customer to go their email and follow the instructions they will receive

#

they will get a link to our Billing Portal (this is similar to the checkout page) where they can pay the invoice

#

and once that's done we will send them the Pdf invoice to their email

onyx spoke
#

So then effectively, for one-time purchases, the customer has to go to their email → click on the invoice link → go to a page where they can pay.

Correct?

If yes, that's not going to work for our product as we want the customer to be able to pay immediately in their browser. Do you have any alternative ideas? Thanks for thinking with me so far

dull timber
#

sorry my bad, it's not the Billing Portal that they will be redirected to but the Hosted Invoice Page

#

just for the sake of accuracy and correctness

#

Do you have any alternative ideas?
Unfortunately today we have this known limitation on the Checkout Sessions

#

there is an alternative but it needs a bit more dev time

#

and it doesn't use Checkout

#

You'd have to work on the Front-End with Stripe.js

#

would that be an issue?

onyx spoke
#

Okay I think it's becoming clear.
So for recurring payments, keep as it is. It already makes invoices ( I haven't tested a recurring payment yet I realised so I'll check it out)

For one time payments: don't create a check out session, but instead create an invoice per https://stripe.com/docs/api/invoices/create (and then I can't redirect them, they go through their email instead)

onyx spoke
dull timber
#

Not sure if this is an issue, can you give the broad idea of it? Then I can see if it's within capabilities
I will give you the necessary steps

#

Just give me a couple of minutes please I'm trying to recreate the steps to make sure that this would work as expected

onyx spoke
#

Sure, appreciate it

onyx spoke
#

I'm wondering if you're still here?

#

@dull timber

dull timber
#

yes I'm still here sorry it's taking me some time and I'm honestly trying to do this as fast as I can please bare with me

onyx spoke
#

No worries, just checking in.
I do need to walk our dog, so I hope but I've been postponing as you're helping me now. I hope it's okay if I step away for 45 mins. I'll be back and check discord as soon as I can

dull timber
#

I'm done 🙂

#

I will send you the steps now but when you come back I would be long gone so please don't hesitate to follow up with my colleagues if you have any further question

#

so the steps are the following:

#

1- Create an invoice, passing pending_invoice_items_behavior = exclude, auto_advance = false and of course passing your customer id

#

2- Create an invoice items with the customer, the invoice and the price

#

3- Finalize your invoice, use the expand field to get the details of the invoice's payment_intent

#

4- send the invoice.payment_intent.client_secret to the front-end to be used with Stripe.js PaymentElement

#

5- listen to the invoice.payment_succeeded webhook event and send the user the invoice you can find in invoice_pdf