Apply Credit Memo (POST)

Adjust or correct already issued invoices by applying an existing credit memo to an invoice.

Specify the credit memo ID and the amounts to be applied, with the total of all applied amounts not exceeding the credit memo’s balance.

The credit amount for each invoice can’t surpass the original charge or adjustment amount, and the overall credit amount must not exceed the invoice’s outstanding balance. The exceptions include any taxes calculated by an external service.

For example, your organization sold 10 tablets at US$500 each, totaling $5000, to a vendor who later reported that 6 tablets were defective. Your accounts receivable team creates a $3000 credit memo by using the standalone Credit Memo API. Additionally, the team applies this credit to the original invoice by using the Apply Credit Memo API.

When the credit application level is Invoice Line, this API applies the credit memo amount to all invoice lines starting from the highest amount until the full credit is applied or all lines are settled.

Special Access Rules 

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

Resource 

1/commerce/invoicing/credit-memos/{creditMemoId}/actions/apply

Resource Example 

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

Available Version 

62.0

HTTP Methods 

POST

Path Parameter for POST 

NameTypeDescriptionRequired or OptionalAvailable Version
creditMemo​IdStringID of the credit memo record.Required62.0

Request Body for POST 

JSON Example

1{
2  "applications": [
3    {
4      "appliedToId": "3ttxx000000003FAAQ",
5      "amount": 10,
6      "description": "Apply to invoice for refund",
7      "effectiveDate": "2024-07-01"
8    },
9    {
10      "appliedToId": "3ttxx0000000001AAA",
11      "amount": 100
12    }
13  ]
14}

Properties

NameTypeDescriptionRequired or OptionalAvailable Version
applicationsCredit Memo Apply Application Input[]List of one or more applications to apply the credit memo for. Each application represents an invoice that’s credited by using the balance of the specified credit memo.Required62.0

Response Body for POST 

Credit Memo Apply List