Standalone Credit Memo (POST)
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
-
/commerce/invoicing/credit-memos/actions/generate
- Resource example
-
https://yourInstance.salesforce.com/services/data/v63.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.
{ "billingAccountId": "001j000000WCFB800x", "type": "Posted", "description": "Standalone credit memo with ignored tax.", "currencyIsoCode": "USD", "taxStrategy": "Ignore", "charges": [ { "chargeAmount": 100, "productId": "01tR0000000njDiIAI" } ] }
- This example shows a sample request with the Calculate tax strategy for a charge
line.
{ "billingAccountId": "001DU000001nhoPYAQ", "description": "Standalone Credit Memo", "type": "Posted", "currencyIsoCode": "USD", "taxStrategy": "Ignore", "charges": [ { "productId": "01tR0000000njDiIAI", "chargeAmount": 10, "taxStrategy": "Calculate", "treatmentId": "1ttxx00000001VZAAY" } ] }
- Properties
-
Name Type Description Required or Optional Available Version billToContactId String Optional 62.0 billingAccountId String Required 62.0 charges Standalone Credit Memo Charge Input[] Charge lines of the credit memo. Requires at least one charge line.
Required 62.0 currencyIsoCode String Optional 62.0 description String Optional 62.0 effectiveDate String Effective date of the credit memo. If the value isn’t specified, then it’s null.
Optional 62.0 externalReference String Optional 62.0 externalReferenceDataSource String Optional 62.0 taxEffectiveDate String Effective date of the credit memo tax. If the value isn’t specified, then it’s null.
Optional 62.0 taxStrategy String Specifies how tax lines must be created for the standalone credit memos. Valid values are:
- Ignore—Specifies that the creation of tax lines must be ignored.
- Calculate—Specifies that tax must be calculated by using the API.
Required 62.0 type String Type of credit memo to be created. Valid value is Posted.
Optional 62.0
- Response body for POST
- Revenue Async Response