#cory-tax-chargelink

1 messages · Page 1 of 1 (latest)

cerulean tokenBOT
slim fjord
#

Yes, in fact that could even be required on nromal invoices without any extra

#

We offer a way to handle that automatically for your invoice payments:

wicked lotus
#

I am tryihng to handle this all on the backend for PHP. I used to create a payment intent and then send intent back to backend to handle a normal charge. But I need to handle taxes now so I am switching to invoice but want to keep the same flow

wicked lotus
#

So my question is I guess, with a Payment intent and 3DS confirmed, can I create an invoice and charge it?

slim fjord
#

If 3ds were required, there'd already be an invoice (with a payment intent)

wicked lotus
#

That would require chaning my flow though

slim fjord
#

So you could retrieve that and use the payment intent client_secret in your front end to have the customer authenticate using Stripe.js, say

#

But I need to handle taxes now so I am switching to invoice
We have a standalone tax API you can use with payment intents (without invoices) now, if you prefer

#

But up to you

#

with a Payment intent and 3DS confirmed, can I create an invoice and charge it?
Can you share an example of what you mean?

#

I don't think I understand the flow/scenario?

wicked lotus
#

In app

User clicks "buy item" -> goes to backend, creates payment intent, and if it requires action, it sends client secret to front end for 3DS -> after 3DS succeeds, sends intent back to backend, and confirms() the paymentIntent -> then enable flag in DB since we already in backend

#

My goal is basically to add tax collection to this scenerio

slim fjord
#

Ok, that sounds like the manual confirmation flwo for handling 3ds with server side request, sure

#

To do this you'd need to collect a valid tax location from the customer, but with that you can calculate your own tax:

wicked lotus
#

Ok that is fine. How can I then add the tax to the charge?

#

I saw a page about tax calculation but it seemed pretty complex

slim fjord
cerulean tokenBOT
slim fjord
#

Take a look at this guide, it show how you can achieve this and include the tax amount in your payment intent

wicked lotus
#

I see that they throw it in the metadata

#

But how does it end up in the actual charge?

#

From the guide it seems like tax is collected after they charge is made?

#

Unless I am reading it wrong

pearl crystal
#

@wicked lotus there's no link between tax calculation and a Charge in our API today. You mostly track this yourself

#

cory-tax-chargelink

wicked lotus
#

so let me get this straight - you calc tax, add that to total charge amount for Intent, record it in meta data, and then confirm Intent?

pearl crystal
#

We (Stripe) don't care about the link in metadata in any way sothat's really up to you how/when/whether you do that. But otherwise yes

wicked lotus
#

Would there be any way to keep this type of flow but introduce an invoice so it's automatically collected and recorded?

#

If that makes sense

#

basically swap "charge" for "invoice"

#

and everything else the same

pearl crystal
wicked lotus
#

Does that make sense? Sorry if it’s confusing

#

I just don’t want to have to email them anything or use webhooks

pearl crystal
#

Yeah sorry it's tough because you use words like "invoice" that have extremely specific meanings for accounting for example and it's also a core API for us for our Invoicing product and I don't really get what you are after as it's too vague.

If you want a compliant Invoice, with a real email receipt and such, use Invoicing.
If you don't, use our Tax API to make the calculations yourself and then separately create/confirm a PaymentIntent