# Credit memo applied

Endpoint: POST credit-memo-applied
Version: latest
Security: SecretApiKey, JWT

## Request fields

- `creditMemoId` (string)
  ID of the credit memo.
  Example: crmm_0YVCNN22TWC3G8H82QNPNVZCHG
- `eventType` (string)
  Type of event that triggered the webhook.
  Enum: "credit-memo-applied", "credit-memo-created", "credit-memo-modified", "credit-memo-partially-applied", "credit-memo-voided"
- `_embedded` (object)
  Embedded objects related to the credit memo event.
- `_embedded.creditMemo` (object)
  Credit memo object.
- `_embedded.creditMemo.allocations` (object)
  Allocations reduce the unused amount of a credit memo.
- `_embedded.creditMemo.allocations.transactions` (array)
  List of transactions (typically refunds, credits, and chargebacks) that are allocated to reduce the unused amount of a credit memo. - To delete transaction allocations, send an empty transaction allocation array in the request. - To modify transaction allocations, send a modified transaction allocation array in the request. - If you do not want to modify or delete transaction allocations, do not send a transaction allocation array in the request.
- `_embedded.creditMemo.allocations.transactions.transactionId` (string)
  ID of the transaction.
  Example: txn_0YVDTQJ8YWDGQACV2N2N5SPWQ0
- `_embedded.creditMemo.allocations.transactions.amount` (number)
  Amount of credit that is allocated from the credit memo to the transaction. If the `amount` value is not supplied or exceeds the unused amount of the credit memo or the transaction amount, the lesser of the following two values is used: - The unused amount of the credit memo. - The transaction amount.
- `_embedded.creditMemo.allocations.transactions.currency` (string)
  Currency code in ISO 4217 format.
  Example: USD
- `_embedded.creditMemo.allocations.invoices` (array)
  List of invoices that the credit memo is allocated to. - To delete invoice allocations, send an empty invoice allocation array in the request. Only `unpaid`, `partially-paid`, and `past-due` invoices can be deleted. - To modify invoice allocations, send a modified invoice allocation array in the request. Only `unpaid`, `partially-paid`, and `past-due` invoices can be modified. - If you do not want to modify or delete invoice allocations, do not send an invoice allocation array in the request.
- `_embedded.creditMemo.allocations.invoices.invoiceId` (string)
  ID of invoice to which the credit memo is allocated.
  Example: in_0YVF9605RKC62BP14NE2R7V2XT
- `_embedded.creditMemo.allocations.invoices.amount` (number)
  Amount of credit that is allocated from the credit memo to the invoice. If the `amount` value is not supplied or exceeds the unused amount of the credit memo or the invoice due amount, the lesser of the following two values is used: - The unused amount of the credit memo. - The invoice due amount.
- `_embedded.creditMemo.items` (array)
  Items of the credit memo.
- `_embedded.creditMemo.items.invoiceItemId` (string | null)
  ID of the invoice item to which the credit item is referenced.
  Example: ii_0YVFDEQS2KCFTBN9HXWJFY55GV
- `_embedded.creditMemo.items.description` (string)
  Description of the credit memo item.
- `_embedded.creditMemo.items.unitPrice` (number, required)
  Price of the credit memo item.
- `_embedded.creditMemo.items.quantity` (integer, required)
  Quantity of the credit memo item.
- `_embedded.creditMemo.items.productId` (string | null)
  ID of the related product.
  Example: prod_0YV7DES3WPC5J8JD8QTVNZBZNZ
- `_embedded.creditMemo.items.planId` (string | null)
  ID of the related plan.
  Example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
- `_embedded.creditMemo.items.tax` (any)
  Credit memo item tax.
- `_embedded.creditMemo.reason` (string)
  Reason for the credit memo.
  Enum: "return", "product-unsatisfactory", "order-change", "order-cancellation", "chargeback", "write-off", "waiver", "customer-credit", "prepayment", "other"
- `_embedded.creditMemo.description` (string)
  Public description, that is visible to customers, which describes the purpose of the credit memo.
- `_embedded.creditMemo.shippingAmount` (number)
  Shipping amount of an invoice to credit.
- `_embedded.creditMemo.customerId` (string, required)
  ID of the customer resource.
  Example: cus_0YV7DDSDD1C8DA64KHH2W33CPF
- `_embedded.creditMemo.invoiceId` (string | null)
  ID of the invoice to which the credit memo is issued.
  Example: in_0YVF9605RKC62BP14NE2R7V2XT
- `_embedded.creditMemo.transactionId` (string | null)
  ID of the transaction associated with the credit memo. Associating a transaction does not change the unused amount of the credit memo. The transaction must be approved and associated with the same customer as the credit memo. Approved transactions of any type are accepted, including refunds and voided sales. If the transaction result changes later, the association is retained. If this field is omitted in an update request and `customerId` is not changed, this field retains its current value. If this field is omitted and `customerId` is changed, the transaction is removed from the credit memo. To remove the transaction from the credit memo, set this field to `null`.
  Example: txn_0YVDTQJ8YKC82BP14NE2R7V2XT
- `_links` (array)
  Links to related resources.
- `_links.href` (string)
  URL of the link.
- `_links.rel` (string)
  Relationship type of the link.
  Enum: "creditMemo"
