POST
/
invoices
curl --request POST \
--url https://rest.taxes.provider.com/api/v1/invoices \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"invoiceCode": "inv_1234",
"documentDateTime": "2022-11-01T05:12:08.131Z",
"taxDateTime": "2022-11-01T05:12:08.131Z",
"currency": "USD",
"seller": {
"address": {
"line1": "412 63rd South Avenue",
"city": "Baltimore",
"state": "MD",
"country": "US",
"postalCode": "21230"
}
},
"customer": {
"name": "John Doe",
"customerCode": "customer_test",
"address": {
"line1": "59, Starlight Avenue",
"city": "Newark",
"state": "NJ",
"country": "US",
"postalCode": "98712"
}
},
"subtotal": 100,
"exemptAmount": 0,
"discountAmount": 0,
"taxableAmount": 100,
"taxAmount": 15,
"total": 115,
"lineItems": [
{
"number": 1,
"itemCode": "cbWatch",
"description": "A winding watch.",
"quantity": 1,
"amount": 100,
"isTaxInclusive": false,
"isTaxable": true,
"taxIdentifiers": [
{
"id": "taxCode",
"value": "PT12312"
}
],
"discountAmount": 0,
"subtotal": 100,
"exemptAmount": 0,
"taxableAmount": 100,
"taxAmount": 15,
"total": 115,
"taxes": [
{
"number": 1,
"jurisdiction": {
"code": "48",
"type": "STATE",
"name": "CALIFORNIA"
},
"name": "SALE",
"rate": 5,
"taxableAmount": 100,
"taxAmount": 5
},
{
"number": 2,
"jurisdiction": {
"code": "27000",
"type": "CITY",
"name": "SAN FRANCISCO"
},
"name": "SALE",
"rate": 10,
"taxableAmount": 100,
"taxAmount": 10
}
]
}
]
}'
{
"invoiceId": "disney_001",
"invoiceCode": "inv_1234",
"status": "PENDING",
"documentDateTime": "2022-11-01T05:12:08.131Z",
"currency": "USD",
"seller": {
"address": {
"line1": "412 63rd South Avenue",
"city": "Baltimore",
"state": "MD",
"country": "US",
"postalCode": "21230"
},
"hasNexus": true
},
"customer": {
"name": "John Doe",
"customerCode": "customer_test",
"address": {
"line1": "59, Starlight Avenue",
"city": "Newark",
"state": "NJ",
"country": "US",
"postalCode": "98712"
}
},
"subtotal": 100,
"discountAmount": 0,
"exemptAmount": 0,
"taxableAmount": 100,
"taxAmount": 15,
"total": 115,
"lineItems": [
{
"number": 1,
"itemCode": "cbWatch",
"description": "A winding watch.",
"quantity": 1,
"amount": 100,
"isTaxInclusive": false,
"isTaxable": true,
"taxIdentifiers": [
{
"id": "taxCode",
"value": "PT12312"
}
],
"exemptAmount": 0,
"discountAmount": 0,
"subtotal": 100,
"taxableAmount": 100,
"taxAmount": 15,
"total": 115,
"taxes": [
{
"number": 1,
"jurisdiction": {
"code": "48",
"type": "STATE",
"name": "CALIFORNIA"
},
"name": "SALE",
"rate": 5,
"taxableAmount": 100,
"taxAmount": 5
},
{
"number": 2,
"jurisdiction": {
"code": "27000",
"type": "CITY",
"name": "SAN FRANCISCO"
},
"name": "SALE",
"rate": 10,
"taxableAmount": 100,
"taxAmount": 10
}
]
}
]
}

Authorizations

Authorization
string
header
required

The json of all the parameters specified in authentication configuration of tax app will be sent by Chargebee.

Headers

merchant_id
string

Merchant's domain name will be sent by Chargebee

trace_id
string

Unique id of the request will be sent by Chargebee

Body

application/json

The details of an invoice sent to the Tax Service Adapter by Chargebee.

invoiceCode
string
required

The unique identifier of the invoice in Chargebee.

Maximum length: 50
documentDateTime
string<date-time>
required

The date and time at which the invoice was generated in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT.In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.

currency
string
required
Required string length: 3
seller
object
required

The details of the seller involved in the transaction including company code and address.

Example:
{
"address": {
"country": "country",
"city": "city",
"postalCode": "postalCode",
"state": "state",
"line3": "line3",
"line2": "line2",
"line1": "line1"
},
"taxRegistrationNumber": "taxRegistrationNumber",
"hasNexus": true
}
customer
object
required

The details of the Customer.

Example:
{
"address": {
"country": "country",
"city": "city",
"postalCode": "postalCode",
"state": "state",
"line3": "line3",
"line2": "line2",
"line1": "line1"
},
"name": "name",
"customerCode": "customerCode",
"company": "company",
"taxRegistrationNumber": "taxRegistrationNumber",
"hasNexus": true,
"locationEvidence": {
"paymentCountryCode": "paymentCountryCode",
"bin": "bin",
"ip": "ip"
},
"taxIdentifiers": [
{ "id": "id", "value": "value" },
{ "id": "id", "value": "value" },
{ "id": "id", "value": "value" },
{ "id": "id", "value": "value" },
{ "id": "id", "value": "value" }
]
}
subtotal
number
required

The amount after discounts. This is the sum of all lineItems.subtotal.

exemptAmount
number
required

The part of the subtotal that is exempted from tax.

discountAmount
number
required

The total discount applied. This is the sum of all lineItems.discount.

taxableAmount
number
required

The part of the subtotal that is taxable.

taxAmount
number
required

The total tax payable. This is the sum of all lineItems.taxAmount.

total
number
required

The total after discounts and taxes. This is the same as subtotal if it is tax inclusive; otherwise it is subtotal + taxAmount. total can also be expressed as exemptAmount + taxableAmount + taxAmount.

lineItems
object[]
required
Required array length: 1 - 1250 elements
taxDateTime
string<date-time>

The date and time at which the tax was applicable in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT.In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.

Response

Invoice created successfully.

The details of an invoice as returned by the Tax Service Adapter.

invoiceId
string
required

The unique identifier of the invoice in the Tax Service Adapter or the Tax Service Provider.

invoiceCode
string
required

The unique identifier of the invoice in Chargebee.

Maximum length: 50
documentDateTime
string<date-time>
required

The date and time at which the invoice was generated in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT.In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.

status
enum<string>
required

Status of the invoice document.

Available options:
PENDING,
COMMITTED,
VOIDED
currency
string
required
Required string length: 3
seller
object
required

The details of the seller involved in the transaction including company code and address.

Example:
{
"address": {
"country": "country",
"city": "city",
"postalCode": "postalCode",
"state": "state",
"line3": "line3",
"line2": "line2",
"line1": "line1"
},
"taxRegistrationNumber": "taxRegistrationNumber",
"hasNexus": true
}
customer
object
required

The details of the Customer.

Example:
{
"address": {
"country": "country",
"city": "city",
"postalCode": "postalCode",
"state": "state",
"line3": "line3",
"line2": "line2",
"line1": "line1"
},
"name": "name",
"customerCode": "customerCode",
"company": "company",
"taxRegistrationNumber": "taxRegistrationNumber",
"hasNexus": true,
"locationEvidence": {
"paymentCountryCode": "paymentCountryCode",
"bin": "bin",
"ip": "ip"
},
"taxIdentifiers": [
{ "id": "id", "value": "value" },
{ "id": "id", "value": "value" },
{ "id": "id", "value": "value" },
{ "id": "id", "value": "value" },
{ "id": "id", "value": "value" }
]
}
subtotal
number
required

The amount after discounts. This is the sum of all lineItems.subtotal.

exemptAmount
number
required

The part of the subtotal that is exempted from tax.

discountAmount
number
required

The total discount applied. This is the sum of all lineItems.discount.

taxableAmount
number
required

The part of the subtotal that is taxable.

taxAmount
number
required

The total tax payable. This is the sum of all lineItems.taxAmount.

total
number
required

The total after discounts and taxes. This is the same as subtotal if it is tax inclusive; otherwise it is subtotal + taxAmount. total can also be expressed as exemptAmount + taxableAmount + taxAmount.

lineItems
object[]
required
Required array length: 1 - 1250 elements
taxDateTime
string<date-time>

The date and time at which the tax was applicable in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT.In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.