Standalone Credit Memo (POST)

Create a credit memo without applying it to an invoice. You can credit the invoice at a later date.

In the API request, specify the credit memo header information, charge parameters, adjustment parameters, and tax parameters. A credit memo requires at least one credit memo line. The credit memo line can be a charge or an adjustment.

Specify the credit memo lines that you want as lists of charges and adjustments. Each credit memo line must be related to a product.

Special Access Rules 

You need the Credit Memo Operations User permission set to use this API.

Resource 

1/commerce/invoicing/credit-memos/actions/generate

Resource Example 

1https://{yourInstance}.salesforce.com/services/data/v68.0/commerce/invoicing/credit-memos/actions/generate

Available Version 

62.0

HTTP Methods 

POST

Request Body for POST 

JSON Example

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

1{
2  "billingAccountId": "001j000000WCFB800x",
3  "type": "Posted",
4  "description": "Standalone credit memo with ignored tax.",
5  "currencyIsoCode": "USD",
6  "taxStrategy": "Ignore",
7  "charges": [
8    {
9      "chargeAmount": 100,
10      "productId": "01tR0000000njDiIAI"
11    }
12  ]
13}

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

1{
2  "billingAccountId": "001DU000001nhoPYAQ",
3  "description": "creditmemo-1",
4  "currencyIsoCode": "USD",
5  "taxStrategy": "ManualOverride",
6  "charges": [
7    {
8      "productId": "01tDU000000EpKkYAK",
9      "chargeAmount": 1000,
10      "taxes": [
11        {
12          "taxAmount": 7.25,
13          "taxCode": "CA-94121",
14          "taxName": "CALIFORNIA",
15          "taxRate": 0.25
16        }
17      ]
18    }
19  ]
20}

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

1{
2  "billingAccountId": "001DU000001nhoPYAQ",
3  "description": "Standalone Credit Memo",
4  "type": "Posted",
5  "currencyIsoCode": "USD",
6  "taxStrategy": "Ignore",
7  "charges": [
8    {
9      "productId": "01tR0000000njDiIAI",
10      "chargeAmount": 10,
11      "taxStrategy": "Calculate",
12      "treatmentId": "1ttxx00000001VZAAY"
13    }
14  ]
15}

Properties

NameTypeDescriptionRequired or OptionalAvailable Version
billTo​ContactIdStringContact related to the credit memo.Optional62.0
billing​AccountIdStringID of the account that the credit is issued to.Required62.0
chargesStandalone Credit Memo Charge Input[]Charge lines of the credit memo. Requires at least one charge line.Required62.0
currency​IsoCodeStringISO code currency of the new credit that’s issued.Optional62.0
custom​FieldsMapCustom field values on the credit memo record, as key-value pairs.Optional68.0
descriptionStringDescription for the new credit that’s issued.Optional62.0
effective​DateStringEffective date of the credit memo. If the value isn’t specified, then it’s null.Optional62.0
external​ReferenceStringID of the external reference for the credit memo.Optional62.0
externalReference​Data​SourceStringSource of the external reference for the credit memo.Optional62.0
taxEffective​DateStringEffective date of the credit memo tax. If the value isn’t specified, then it’s null.Optional62.0
tax​StrategyStringSpecifies how tax lines must be created for the standalone credit memos.Required62.0
typeString Optional62.0

Valid values are:

  • Ignore—Specifies that the creation of tax lines must be ignored.
  • Manual Override—Specifies that the provided tax values must be considered for taxes.
  • Calculate—Specifies that tax must be calculated by using the API.

Response Body for POST 

Revenue Async Response