API Reference
- Partner SPI
- Tax SPI
- Overview
- Authorization
- Address
- TaxEstimate
- Invoice
- CreditNote
- Authentication
- Health
- Testing with Postman
- Tax Registration Number Validation SPI
- Troubleshooting
Create credit note
This endpoint is used to send a credit note to the Tax Service Adapter. A credit note is used to reduce the amount due on an invoice. If the credit note is issued after payments have been made for the invoice, refunds can be issued to the Customer.
curl --request POST \
--url https://rest.taxes.provider.com/api/v1/credit-notes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"creditNoteCode": "cn_2023_11_24_178",
"invoiceCode": "inv_2023_11_30_78",
"invoiceId": "disney_001",
"creditNoteType": "FULL",
"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
}'
{
"creditNoteId": "disney_002",
"creditNoteCode": "cn_2023_11_24_178",
"invoiceCode": "inv_2023_11_30_78",
"invoiceId": "disney_001",
"status": "PENDING",
"creditNoteType": "FULL",
"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"
}
},
"discountAmount": 0,
"subTotal": 100,
"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
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
The details of a credit note sent to the Tax Service Adapter by Chargebee. A credit note is used to reduce the amount due on an invoice. If the credit note is issued after payments have been made for the invoice, refunds can be issued to the Customer.
Response
Credit note created successfully.
The details of a credit note returned by the Tax Service Adapter. A credit note is used to reduce the amount due on an invoice. If the credit note is issued after payments have been made for the invoice, refunds can be issued to the Customer.
curl --request POST \
--url https://rest.taxes.provider.com/api/v1/credit-notes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"creditNoteCode": "cn_2023_11_24_178",
"invoiceCode": "inv_2023_11_30_78",
"invoiceId": "disney_001",
"creditNoteType": "FULL",
"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
}'
{
"creditNoteId": "disney_002",
"creditNoteCode": "cn_2023_11_24_178",
"invoiceCode": "inv_2023_11_30_78",
"invoiceId": "disney_001",
"status": "PENDING",
"creditNoteType": "FULL",
"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"
}
},
"discountAmount": 0,
"subTotal": 100,
"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
}
]
}
]
}