KintsugiKintsugi
API reference / Create credit note by transaction id

Create credit note by transaction id

POST/v1/transactions/{original_transaction_id}/credit_notes

Create a new credit note for a specific transaction.

Authorization

x-api-keystringRequired

Your secret API key. Include it with every request.

x-organization-idstringRequired

Identifies the organization this request acts on.

Path parameters

original_transaction_idstringRequired

Body

external_idstringRequired

Unique identifier for the credit note in the external system.

datestringRequired

Date when the credit note was issued or created.

statusstringRequired

Current state of the credit note in its lifecycle.

Available options:PENDINGCANCELLEDCOMMITTED
descriptionstring

Brief explanation or reason for issuing the credit note.

total_amountnumberRequired

Total monetary value of the credit note, including all items and taxes.

marketplaceboolean

Indicates whether this credit note is associated with a marketplace transaction.

tax_amount_importednumber

Pre-calculated total tax amount for the entire credit note, if provided by the external system.

tax_rate_importednumber

Pre-calculated overall tax rate for the credit note, if provided by the external system.

taxable_amountnumber

Total portion of the credit note amount subject to taxation.

currencyCurrencyEnumRequired

The currency used for all amounts in this credit note.

Available options:AEDAFNALLAMDANGAOAARSAUDAWGAZNBAMBBDBDTBGNBHDBIFBMDBNDBOBBRLBSDBTNBWPBYNBZDCADCDFCHFCLPCNYCOPCRCCUCCUPCVECZKDJFDKKDOPDZDEGPERNETBEURFJDFKPGBPGELGGPGHSGIPGMDGNFGTQGYDHKDHNLHRKHTGHUFIDRILSIMPINRIQDIRRISKJEPJMDJODJPYKESKGSKHRKMFKPWKRWKWDKYDKZTLAKLBPLKRLRDLSLLYDMADMDLMGAMKDMMKMNTMOPMRUMURMVRMWKMXNMYRMZNNADNGNNIONOKNPRNZDOMRPABPENPGKPHPPKRPLNPYGQARRONRSDRUBRWFSARSBDSCRSDGSEKSGDSHPSLLSOSSPLSRDSTNSVCSYPSZLTHBTJSTMTTNDTOPTRYTTDTVDTWDTZSUAHUGXUSDUYUUZSVEFVNDVUVWSTXAFXCDXDRXOFXPFYERZARZMWZWD
addressesTransactionAddressBuilder[]

A list of TransactionAddressBuilder objects or None if no addresses are provided. This field represents the addresses associated with the transaction.

transaction_itemsCreditNoteItemCreateUpdate[]Required

Detailed list of individual items included in this credit note.

Response

requires_exemptionExemptionRequired

Indicates if transaction requires tax exemption.

organization_idstringRequired

Unique identifier of the organization. This field is deprecated, and should no longer be used. The value is populated through the 'x-organization-id' header.

external_idstringRequired

External identifier of the transaction.

datestringRequired

Transaction date and time

shop_datestring

Transaction date in the shop's local timezone

shop_date_tzstring

Timezone of the shop

descriptionstring

Description of the transaction.

refund_statusTransactionRefundStatus

Status of refund, if applicable

Available options:FULLY_REFUNDEDPARTIALLY_REFUNDED
total_amountstring

Total amount of the transaction.

customer_idstring

Unique identifier of the customer.

marketplaceboolean

Indicates if transaction is marketplace-based.

exemptTransactionExemptStatusEnum

Exemption status (e.g., NOT_EXEMPT)

Available options:NOT_EXEMPTPARTIALLY_EXEMPTFULLY_EXEMPTZERO_RATE_NOT_EXEMPT
exemptionsExemption[]

List of exemptions applied (if any).

related_tostring

Related transaction identifier.

secondary_external_idstring

Secondary External Identifier.

secondary_sourcestring

Secondary source information

external_friendly_idstring

Friendly identifier of the original item.

total_tax_amount_importedstring

Imported tax amount.

tax_rate_importedstring

Imported tax rate.

total_tax_amount_calculatedstring

Calculated tax amount.

tax_rate_calculatedstring

Calculated tax rate.

total_tax_liability_amountstring

Total tax liability amount.

tax_liability_sourceTaxLiabilitySourceEnum

Source of tax liability.

Available options:CALCULATEDCOLLECTED
taxable_amountstring

Taxable amount.

currencyCurrencyEnum

Currency code (ISO 4217, e.g., USD)

Available options:AEDAFNALLAMDANGAOAARSAUDAWGAZNBAMBBDBDTBGNBHDBIFBMDBNDBOBBRLBSDBTNBWPBYNBZDCADCDFCHFCLPCNYCOPCRCCUCCUPCVECZKDJFDKKDOPDZDEGPERNETBEURFJDFKPGBPGELGGPGHSGIPGMDGNFGTQGYDHKDHNLHRKHTGHUFIDRILSIMPINRIQDIRRISKJEPJMDJODJPYKESKGSKHRKMFKPWKRWKWDKYDKZTLAKLBPLKRLRDLSLLYDMADMDLMGAMKDMMKMNTMOPMRUMURMVRMWKMXNMYRMZNNADNGNNIONOKNPRNZDOMRPABPENPGKPHPPKRPLNPYGQARRONRSDRUBRWFSARSBDSCRSDGSEKSGDSHPSLLSOSSPLSRDSTNSVCSYPSZLTHBTJSTMTTNDTOPTRYTTDTVDTWDTZSUAHUGXUSDUYUUZSVEFVNDVUVWSTXAFXCDXDRXOFXPFYERZARZMWZWD
lockedboolean

Transaction lock status.

sourceSourceEnum

Source platform (e.g., STRIPE)

Available options:BIGCOMMERCEBESTBUYBUNNYCHARGEBEESHOPIFYSTRIPEAMAZONTIKTOKCUSTOMUNKNOWNIMPORTZUORAAPIDECKQUICKBOOKSAPIAPPLE_APP_STOREGOOGLE_APP_STOREWALMARTPAYPALNETSUITEXEROMAXIORECURLYSALESFORCEETSYEBAYWIXSQUARESPACEWOOCOMMERCEMAGENTOBILLING_PLATFORMDEELRIPPLINGGUSTOFACEBOOKOTHERORDWAYINSTAGRAMPINTERESTWAYFAIRWISHPOSTARGETNEWEGGGROUPONGOOGLE_EXPRESSNOCNOCMERCADO_LIBREMODALYSTNORDSTROMFAIRESHOPWAREZOHOSAGE-INTACCTAIRWALLEXORBZENSKARMICROSOFT_DYNAMICS_365KICKSTARTERINTERNAL_ERP
connection_idstring

Connection Identifier

filing_idstring

Filing identifier.

citystring

City of the transaction address.

countystring

County of the transaction address.

statestring

State of the transaction address.

countryCountryCodeEnum

Country code (ISO Alpha-2).

Available options:AFAXALDZASADAOAIAQAGARAMAWAUATAZBSBHBDBBBYBEBZBJBMBTBOBQBABWBVBRIOBNBGBFBICVKHCMCAKYCFTDCLCNCXCCCOKMCGCDCKCRHRCUCWCYCZDKDJDMDOECEGSVGQEREESZETFKFOFJFIFRGFPFTFGAGMGEDEGHGIGRGLGDGPGUGTGGGNGWGYHTHMVAHNHKHUISINIDIRIQIEIMILITCIJMJPJEJOKZKEKIKPKRKWKGLALVLBLSLRLYLILTLUMOMGMWMYMVMLMTMHMQMRMUYTMXFMMDMCMNMEMSMAMZMMNANRNPNLNCNZNINENGNUNFMKMPNOOMPKPWPSPAPGPYPEPHPNPLPTPRQARERORURWBLSHKNLCMFPMVCWSSMSTSASNRSSCSLSGSXSKSISBSOZAGSSSESLKSDSRSJSECHSYTWTJTZTHTLTGTKTOTTTNTRTMTCTVUGUAAEGBUSUMUYUZVUVEVNVGVIWFEHYEZMZWXKZZ_EU
postal_codestring

Postal code of the transaction.

tax_idstring

Tax ID associated with the transaction. DEPRECATED: This field is only populated for QuickBooks integrations and will be removed in a future version.

statusTransactionStatusEnum

Transaction status (e.g., COMMITTED)

Available options:PENDINGCOMMITTEDCANCELLEDFULLY_REFUNDEDPARTIALLY_REFUNDEDINVALIDARCHIVED
address_statusAddressStatus

Address verification status (e.g., VERIFIED).

Available options:UNVERIFIEDINVALIDPARTIALLY_VERIFIEDVERIFIEDUNVERIFIABLEBLANK
processing_statusProcessingStatusEnum

Status of processing (e.g., ADDRESS_DONE)

Available options:NEWUPDATEDQUEUEDADDRESS_DONEEXEMPT_DONENEXUS_DONEPROCESSEDFILING_STARTEDFILING_DONELOCKEDPENDINGARCHIVEDNEEDS_REFETCHEXCLUDED_IN_CALCULATION
destination_currencyCurrencyEnum

Destination currency code (ISO 4217, e.g., USD)

Available options:AEDAFNALLAMDANGAOAARSAUDAWGAZNBAMBBDBDTBGNBHDBIFBMDBNDBOBBRLBSDBTNBWPBYNBZDCADCDFCHFCLPCNYCOPCRCCUCCUPCVECZKDJFDKKDOPDZDEGPERNETBEURFJDFKPGBPGELGGPGHSGIPGMDGNFGTQGYDHKDHNLHRKHTGHUFIDRILSIMPINRIQDIRRISKJEPJMDJODJPYKESKGSKHRKMFKPWKRWKWDKYDKZTLAKLBPLKRLRDLSLLYDMADMDLMGAMKDMMKMNTMOPMRUMURMVRMWKMXNMYRMZNNADNGNNIONOKNPRNZDOMRPABPENPGKPHPPKRPLNPYGQARRONRSDRUBRWFSARSBDSCRSDGSEKSGDSHPSLLSOSSPLSRDSTNSVCSYPSZLTHBTJSTMTTNDTOPTRYTTDTVDTWDTZSUAHUGXUSDUYUUZSVEFVNDVUVWSTXAFXCDXDRXOFXPFYERZARZMWZWD
converted_total_amountstring

Converted total amount.

converted_total_tax_amount_importedstring

Converted imported tax amount.

converted_total_tax_amount_calculatedstring

Converted calculated tax amount.

conversion_ratestring

Currency conversion rate.

converted_taxable_amountstring

Converted taxable amount.

converted_total_discountstring

Converted total discount amount.

converted_subtotalstring

Converted subtotal amount.

converted_total_tax_liability_amountstring

Converted total tax liability amount.

idstringRequired

The unique transaction identifier.

addressesTransactionAddressRead-Output[]Required

List of addresses associated.

transaction_itemsTransactionItemRead[]Required

List of items in the transaction.

customerCustomerRead

Customer information associated with the transaction.

typeTransactionTypeEnumRequired

The type of transaction (e.g., SALE, REFUND, PARTIAL_CREDIT_NOTE).

Available options:SALEFULL_CREDIT_NOTEPARTIAL_CREDIT_NOTETAX_REFUNDARCHIVE
total_discountstring

Total amount of all discounts applied to the transaction.

subtotalstring

Subtotal amount before any discounts are applied.

final_total_amountstring

Final total amount including tax liability.

converted_final_total_amountstring

Converted final total amount including tax liability.

200

Successful Response

422

Validation Error

cURL
POST /v1/transactions/{original_transaction_id}/credit_notes
-H "x-api-key: ***"
-H "x-organization-id: ***"
{
"external_id": "CN-12345",
"date": "2024-10-27T14:30:00Z",
"status": "PENDING",
"description": "Refund for damaged product",
"total_amount": 50,
"external_customer_id": "CUST-456",
"currency": "USD",
"transaction_items": [
{
"external_id": "ITEM-1",
"date": "2024-10-27T14:30:00Z",
"external_product_id": "PROD-ABC",
"quantity": 1,
"amount": 50
}
]
}
Example request
https://api.trykintsugi.com/v1/transactions/{original_transaction_id}/credit_notes
Response
{
"requires_exemption": {
"jurisdiction": "string",
"customer_id": "string",
"organization_id": "string",
"exemption_type": "customer",
"start_date": "string",
"status": "ACTIVE",
"reseller": true
},
"organization_id": "string",
"external_id": "string",
"date": "string",
"shop_date": "string",
"shop_date_tz": "string",
"description": "string",
"refund_status": "FULLY_REFUNDED",
"total_amount": "0.00",
"customer_id": "string",
"marketplace": false,
"exempt": "NOT_EXEMPT",
"exemptions": [
{
"id": "string",
"created_at": "string",
"updated_at": "string",
"exemption_type": "customer",
"jurisdiction": "string",
"country_code": "AF",
"start_date": "string",
"end_date": "string",
"customer_id": "string",
"transaction_id": "string",
"reseller": false,
"FEIN": "string",
"sales_tax_id": "string",
"status": "ACTIVE",
"organization_id": "string"
}
],
"related_to": "string",
"secondary_external_id": "string",
"secondary_source": "string",
"external_friendly_id": "string",
"total_tax_amount_imported": "0.00",
"tax_rate_imported": "0.00",
"total_tax_amount_calculated": "0.00",
"tax_rate_calculated": "0.00",
"total_tax_liability_amount": "0.00",
"tax_liability_source": "CALCULATED",
"taxable_amount": "0.00",
"currency": "AED",
"locked": false,
"source": "BIGCOMMERCE",
"connection_id": "string",
"filing_id": "string",
"city": "string",
"county": "string",
"state": "string",
"country": "AF",
"postal_code": "string",
"tax_id": "string",
"status": "PENDING",
"address_status": "UNVERIFIED",
"processing_status": "NEW",
"destination_currency": "AED",
"converted_total_amount": "string",
"converted_total_tax_amount_imported": "string",
"converted_total_tax_amount_calculated": "string",
"conversion_rate": "string",
"converted_taxable_amount": "string",
"converted_total_discount": "string",
"converted_subtotal": "string",
"converted_total_tax_liability_amount": "string",
"id": "string",
"addresses": [
{
"phone": "string",
"street_1": "string",
"street_2": "string",
"city": "string",
"county": "string",
"state": "string",
"postal_code": "string",
"country": "AF",
"full_address": "string",
"type": "BILL_TO",
"status": "UNVERIFIED",
"id": "string",
"transaction_id": "string",
"connection_id": "string"
}
],
"transaction_items": [
{
"external_id": "string",
"organization_id": "string",
"date": "string",
"description": "string",
"external_product_id": "string",
"product": "string",
"product_id": "string",
"product_name": "string",
"product_description": "string",
"quantity": "1.0",
"amount": "0.00",
"tax_amount_imported": "0.00",
"tax_rate_imported": "0.00",
"tax_amount_calculated": "0.00",
"tax_rate_calculated": "0.00",
"original_currency": "AED",
"destination_currency": "AED",
"converted_amount": "string",
"converted_taxable_amount": "string",
"converted_tax_amount_imported": "string",
"converted_tax_amount_calculated": "string",
"converted_total_discount": "string",
"converted_subtotal": "string",
"taxable_amount": "0.00",
"tax_exemption": "PRODUCT",
"exempt": false,
"id": "string",
"tax_items": [
{
"rule_id": "0000",
"rate": "string",
"amount": "string",
"converted_amount": "string",
"currency": "AED",
"destination_currency": "AED",
"external_id": "string",
"name": "string",
"type": "IMPORTED_ORIGINAL",
"jurisdiction_type": "COUNTRY",
"jurisdiction_name": "string"
}
],
"total_discount": "string",
"subtotal": "string"
}
],
"customer": {
"phone": "string",
"street_1": "string",
"street_2": "string",
"city": "string",
"county": "string",
"state": "string",
"postal_code": "string",
"country": "AF",
"full_address": "string",
"name": "string",
"external_id": "string",
"status": "ACTIVE",
"email": "string",
"source": "BIGCOMMERCE",
"connection_id": "string",
"address_status": "UNVERIFIED",
"registration_number": "string",
"external_friendly_id": "string",
"customer_tax_registrations": [
{
"id": "string",
"customer_id": "string",
"country_code": "AF",
"tax_type": "gst",
"tax_id": "string",
"is_valid": true
}
],
"id": "string",
"organization_id": "string"
},
"type": "SALE",
"total_discount": "string",
"subtotal": "string",
"final_total_amount": "string",
"converted_final_total_amount": "string"
}