#Rogers-tax
1 messages · Page 1 of 1 (latest)
Yeah sure, what I did is I have created a payment method object where the card details are taken from the customer and then the customer object and have implemented the automatic tax lines for automatic tax support. After that, I have created a payment intenet where the customer is gonna be charged using tha. However, the tax amount is not deducted from customer, I am going to share visuals and code as well so it can be more clear.
I have set the tax to exclusive in the tax registration in the dashboard
As we can see the amount was set to $50 it should charge the tax as well i wanted to do that. If you could guide me further
payment_intent = stripe.PaymentIntent.create(
payment_method_types=['card'],
customer=new_customer.id,
amount=5000,
currency='usd',
application_fee_amount=2,
stripe_account=account.id,
payment_method=payment.stripe_id,
confirm=True,
)
new_customer=stripe.Customer.create(
stripe_account=account.id,
description="a new user",
email="franklin@example.com",
payment_method=payment.id,
expand=["tax"],
tax=
{
"ip_address": "100.1.217.245"
},
)
payment = stripe.PaymentMethod.create(
stripe_account=account.id,
type="card",
card={
"number": "4242424242424242",
"exp_month":1,
"exp_year": 2023,
"cvc": "321",
},
)
Payment method
new_customer
payment_intent
Thank you, taking a look through the information that you've provided.
Do you have an example of a Payment Intent where you saw this behavior that I can pull up on my side?
Oh, actually, I believe you're not seeing tax being added because you're working directly with Payment Intents.
Part of how Stripe Tax functions is by reviewing the category of the product that is being sold, and since Payment Intents work with raw amount values they don't have the capability to reference Product objects and retrieve the necessary values from them.
Alright yeah, that is correct, so I will be doing this using invoicing?
Flow:
payment method
creating customer
creating the product and price
creating the invoice
charging the customer
Is this flow correct?
if not please give me a flow of API's so that i can follow that so the tax is included as well...
That sounds about right, only slight change is creating Invoice Items before creating the Invoice, but this doc should help walk you through the process:
https://stripe.com/docs/tax/invoicing?dashboard-or-api=api