Credit Invoice Input

Input representation of the details of the request to create a credit memo.

JSON Example 

This example shows a sample request with the Calculate tax strategy.

1{
2  "type": "POSTED",
3  "taxStrategy": "Calculate",
4  "taxEffectiveDate": "2024-07-20",
5  "effectiveDate": "2024-07-20",
6  "description": "Credit Invoice",
7  "invoiceLines": [
8    {
9      "invoiceLineId": "5TVR00000004SiqOBE",
10      "amountToCredit": 5
11    }
12  ]
13}

This example shows a sample request with the CopyFromInvoiceLine tax strategy.

1{
2  "type": "POSTED",
3  "taxStrategy": "CopyFromInvoiceLine",
4  "effectiveDate": "2020-05-22",
5  "description": "Credit Invoice",
6  "invoiceLines": [
7    {
8      "invoiceLineId": "5TVR00000004SiqOBE",
9      "amountToCredit": "5",
10      "taxStrategy": "CopyFromInvoiceLine"
11    }
12  ]
13}

This example shows a sample request with the ManualOverride and CopyFromInvoiceLine tax strategies.

1{
2  "type": "POSTED",
3  "taxStrategy": "ManualOverride",
4  "taxEffectiveDate": "2021-08-01",
5  "effectiveDate": "2021-08-01",
6  "description": "Credit issued because product was malfunctioning.",
7  "invoiceLines": [
8    {
9      "invoiceLineId": "5TVR00000004SiqOBE",
10      "amountToCredit": 100,
11      "taxStrategy": "ManualOverride",
12      "taxEffectiveDate": "2021-08-01T21:22:41.000Z",
13      "taxes": [
14        {
15          "taxAmount": 15,
16          "taxName": "abc",
17          "taxCode": "taxCode",
18          "taxRate": 7
19        }
20      ],
21      "addresses": {
22        "billingAddress": {
23          "street": "1 Market St #300",
24          "city": "San Francisco",
25          "state": "CA",
26          "country": "US",
27          "postalCode": "94105",
28          "latitude": "37.789901",
29          "longitude": "-122.396923"
30        },
31        "shippingAddress": {
32          "street": "415 Mission St",
33          "city": "San Francisco",
34          "state": "CA",
35          "country": "US",
36          "postalCode": "94105",
37          "latitude": "37.789901",
38          "longitude": "-122.396923"
39        }
40      }
41    },
42    {
43      "invoiceLineId": "5TVR00000004SiqOAE",
44      "amountToCredit": 200,
45      "taxStrategy": "CopyFromInvoiceLine"
46    }
47  ]
48}

Properties 

NameTypeDescriptionRequired or OptionalAvailable Version
descriptionStringDescription for the credit memo to be created.Optional62.0
effective​DateStringDate when the credit memo takes effect.Optional62.0
invoice​LinesCredit Invoice Line Input[]List of the invoice lines to be credited. The invoice line IDs must be related to the invoice ID specified in the API request. If invoice lines aren’t specified, the API request results in an error.Required62.0
taxEffective​DateStringDate when the tax takes effect to recalculate the taxes.Optional62.0
tax​StrategyString Required62.0
typeString Optional62.0

Supported values:

  • Ignore—Specifies that the creation of tax lines must be ignored.
  • ManualOverride—Specifies that the provided tax values must be considered for taxes.
  • CopyFromInvoiceLine—Specifies that tax values must be copied from the invoice line.
  • Calculate—Specifies that tax must be calculated by using the API.