#KEITH LARD
1 messages · Page 1 of 1 (latest)
Sure, pi_3NH2mwAjtNFaRAYo0EyxsJZZ
Thanks! Give me a few minutes to look into this.
I think it's something I'm doing wrong now I've looked at it again
I've not actually set a tax breakdown 🤦♂️
So is your issue resolved?
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?
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?
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)
What were you expecting to see exactly?
Also I don't see any tax set in your request: https://dashboard.stripe.com/test/logs/req_8vebMKnsv9wPj6
You only set a tax in the metadata, which is completely ignored by Stripe.
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
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
But I thought if i included rax_rate->amount_total it would pass this through?
Cool, so I cant use payment intents directly?
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)
That's like passing any other amount at the end