PATCH /credit-memos/{id}

Partially updates a credit memo with a specified ID.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
description String No

Public description, that is visible to customers, which describes the purpose of the credit memo.

shippingAmount Number No

Shipping amount of an invoice to credit.

Default value: 0

items[] Array No

Items of the credit memo.

items[].id String No

ID of the credit memo item.

items[].price Number No

Total price of the credit memo item.

items[].productId String No

ID of the related product.

items[].tax No

Credit memo item tax.

items[].invoiceItemId String No

ID of the invoice item to which the credit item is referenced.

items[].description String No

Description of the credit memo item.

items[].planId String No

ID of the related plan.

items[].quantity Integer Yes

Quantity of the credit memo item.

items[].unitPrice Number Yes

Price of the credit memo item.

reason String No

Reason for the credit memo.

Valid values:

  • "return"
  • "product-unsatisfactory"
  • "order-cancellation"
  • "write-off"
  • "customer-credit"
  • "chargeback"
  • "other"
  • "order-change"
  • "waiver"
allocations Object No

Allocations reduce the unused amount of a credit memo.

allocations.transactions[] Array No

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.
allocations.transactions[].updatedTime String No

Date and time when the resource is updated. This value is set automatically when the resource is updated.

allocations.transactions[].createdTime String No

Date and time when the resource is created. This value is set automatically when the resource is created.

allocations.transactions[].amount Number No

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.
allocations.transactions[].transactionId String No

ID of the transaction to which the credit memo is allocated.

allocations.transactions[].currency String No

Merchant's reporting currency.

allocations.invoices[] Array No

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.
allocations.invoices[].updatedTime String No

Date and time when the resource is updated. This value is set automatically when the resource is updated.

allocations.invoices[].createdTime String No

Date and time at which a credit memo is allocated.

allocations.invoices[].amount Number No

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.
allocations.invoices[].currency String No

Merchant's reporting currency.

allocations.invoices[].invoiceId String No

ID of invoice to which the credit memo is allocated.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.