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
}
]
}
]
}
This endpoint is used to send an invoice to the Tax Service Provider. Invoices created in Chargebee are statements of amounts owed by the Customer to the Merchant for a specific purchase.
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
}
]
}
]
}
The json of all the parameters specified in authentication configuration of tax app will be sent by Chargebee.
Merchant's domain name will be sent by Chargebee
Unique id of the request will be sent by Chargebee
The details of an invoice sent to the Tax Service Adapter by Chargebee.
Invoice created successfully.
The details of an invoice as returned by the Tax Service Adapter.