#KEITH LARD

1 messages · Page 1 of 1 (latest)

lethal rainBOT
terse roost
#

Hi there!

#

Can you share the PaymentIntent ID (pi_xxx)?

ornate mauve
#

Sure, pi_3NH2mwAjtNFaRAYo0EyxsJZZ

terse roost
#

Thanks! Give me a few minutes to look into this.

ornate mauve
#

I think it's something I'm doing wrong now I've looked at it again

#

I've not actually set a tax breakdown 🤦‍♂️

terse roost
#

So is your issue resolved?

ornate mauve
#

No I'm still confused...so I want it to be UK inclusive VAT (20%)

#

I see tax_code as a parameter, is that the same as tax rate?

terse roost
#

Sorry for the delay, Discord got busy.
Can you clarify what you are trying to do? You want to create a PaymentIntent and add VAT to it?

ornate mauve
#

Yes correct, well the price is inclusive of VAT

#

I've attached my tax code now

#

pi_3NH3EgAjtNFaRAYo1QdmEzUq

#

this is my latest attempt (still not showing breakdown)

terse roost
#

What were you expecting to see exactly?

ornate mauve
#

I was expecting to see it like I see on a subscription payment with default_rax_rate

#

so subtotal £50, total excluding tax etc (20%)

#

So there is no way to show VAT on a payment intent receipt?

#

I'm doing it like this.

    return $this->stripe->tax->calculations->create([
        'currency' => 'gbp',
        'customer' => $stripeCustomer->id,
        'line_items' => [
            [
                'amount' => $request->get('price'),
                'reference' => "{$billingReason}_{$request->get('policy_id')}",
                'tax_code' => 'txcd_20030000',
                'tax_behavior' => 'inclusive'
            ],
        ],
        'expand' => ['line_items'],
    ]);
#

Then in the payment intent I set the ->amount_total as the price

rigid rivet
#

Hey! Taking over for my colleague. Let me catch up.

#

I'm seeing that you are using PaymentIntent

#

YOu are specifying the tax rate in metadata

#

that has no impact on the amount calculation

#

You need to use Invoice/Billing APIs

ornate mauve
#

But I thought if i included rax_rate->amount_total it would pass this through?

#

Cool, so I cant use payment intents directly?

rigid rivet
#

yes you can't

#

Follow that guide I shared with you.

fair geyser
#

You can use Stripe Tax with Payment Intents (https://stripe.com/docs/tax/custom). The issue is there's no breakdown of the taxable line items on the payment receipt – which is what you're asking I assume?

#

Payment Intents have no concept of line items, and as such tax isn't reflected on receipt. You're just setting the PI amount to be the amount_total returned from your calculation

#

If you want a tax breakdown, then you'll need an invoice (via either Invoicing directly, or Checkout)

rigid rivet