#Mytras

1 messages · Page 1 of 1 (latest)

lament coveBOT
zinc wigeon
#

Hi there!

drifting orbit
#

hi

zinc wigeon
#

Can you share the two invoice ID (in_xxx) where you see this?

drifting orbit
#

I deleted the one that showed the amount because was a test invoice

#

the one that does not show the breakdown of the taxes is in_1MUQZyKavdtumQQGuYKvhlgO

#

shall I create a new invoice to do a comparison?

zinc wigeon
#

If possible, yes, that would make things easier to understand.

drifting orbit
#

on it

#

this one shows the breakdown: in_1MUTVcKavdtumQQGmykKwTOk

#

Am I missing a paramenter when creating the Invoice with the API?

#

I really do not understand

signal yoke
#

👋 taking over for my colleague. Let me catch up.

drifting orbit
#

sure

signal yoke
#

taking a look at both invoices, will be with you shortly

drifting orbit
#

Any news?

signal yoke
#

still looking sorry

#

I'm trying to understand both invoices

drifting orbit
#

should I add, to the API body:
"automatic_tax": {
"enabled": "true"
cause I see that is the main difference in the body regarding taxes

signal yoke
#

yes that might be it, sorry I'm still looking into this while also handling other threads at the same time, terribly sorry for the delay

#

just give me a few minutes to verify and get back to you

drifting orbit
#

thank you

signal yoke
#

sorry it's taking a bit more than expected, but I'm unable to find the real difference between those two invoices using the same inclusive tax price

#

I'm asking help from some colleagues

drifting orbit
#

sure

#

Seems to work

#

I will test it and fix it

#

thank you anyway

signal yoke
#

apparently the problem is on the customer object rather than the invoice itself

drifting orbit
#

what do you mean?

signal yoke
#

if you try to do the invoice creation from the API with the same customer id

#

I think you will find that the results are the same

drifting orbit
#

Well unfortunately I cannot do that

#

But I tested with customer Nevio Vapnar

#

and It showed the breakdown in the invoice

#

If the problem is the customer, what it is missing in the customer profile?

signal yoke
#

ok I have some new findings as well so let me share all of my thoughts at once

#

so you need to add the

    "enabled": "true"
}```
to your API call
drifting orbit
#

Add this when creating an invoice API, right?

signal yoke
#

yes

drifting orbit
#

ok

#

is there anything else?

signal yoke
#

yes the other thing might be coming from the Customer Object

#

in order to automatically calculate the tax for a Customer we need to have a valid billing address

drifting orbit
#

they do have addresses

signal yoke
drifting orbit
#

in the API create a subscription, if collection method is set to send_invoice, should I add automatic_tax in that API call as well?

signal yoke
#

there are some address formats that you need to abide by to have the Tax being calculated automatically

drifting orbit
#

but wait a second, if i put in the API call automatic_tax set to true, and the customer has an invalid address the invoice will not be send and it will stay in the draft?

signal yoke
#

I'm not sure to be honest, was that the case?

drifting orbit
#

no all the invoice went to customer but the API cal DID NOT contained the parameter automatic_tax

#

what is the default if the aprameter is not specified?

#

parameter*

signal yoke
#

sorry I don't follow

drifting orbit
#

the invoices that I sent so far, DID NOT HAVE the parameter automatic_tax in the API call, and these invoices all reached the custoemrs and got paid

#

if the parameter automatic_tax is not specified in the API call it is set anyway or is not necessary?

signal yoke
#

it is necessary for tax calculation

drifting orbit
#

but is not a mandatory parameter since all the other invoice where created without issue

#

what is the difference between these 2 customers than?
cus_N7BDyzMw5GLLWI <-Address is not recognised
cus_NEBReb0AKZADuW <- Address is recognised
They have the same address

#

I am not understanding this

#

Is there a way I can set a 20% tax to all and have it visible on the invoices?

signal yoke
#

one has country United Kingdom and one has GB (which is the correct one to use as per the link I sent you earlier)

drifting orbit
#

I dont see any difference on the platform

signal yoke
#

actually you can look on your dashboard

drifting orbit
signal yoke
#

one has the union jack while the other doesn't

drifting orbit
#

yes, why is that?

signal yoke
#

I think it's because the way the customer was created

drifting orbit
#

now i wrote GB while looking for the country and it changed

signal yoke
#

in the address the country was set to "United Kingdom" which should have been GB

drifting orbit
#

ok than now if the customer with recognised address receives the invoice it will show correctly the taxes

signal yoke
#

if you add the automatic_tax.enabled = true

drifting orbit
#

yes

#

just one last thing to check

#

as mentiond before, even when using the API create a subscription I need to add automatic_tax.enabled = true

#

correct?

signal yoke
#

correct

drifting orbit
#

perfect thank you

signal yoke
#

let me know if you need any more help