PUT /credit-memos/{id}

Creates or updates (upserts) 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
_embedded Object No

Embedded objects that are requested by the expand query parameter.

_embedded.customer Object No
description String No

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

revision Integer No

Number of times the credit memo has been modified.

number Integer No

Auto-incrementing number based on the sequence of credit memos for any particular customer.

createdTime String No

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

shippingAmount Number No

Shipping amount of an invoice to credit.

Default value: 0

taxAmount Number No

Sum of items tax 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.

status String No

Status of the credit memo.

Valid values:

  • "applied"
  • "quotation"
  • "voided"
  • "issued"
  • "partially-applied"
  • "draft"
unusedAmount Number No

Unused credit memo amount that has not been allocated.

Default value: 0

currency String Yes

Merchant's reporting currency.

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.

customerId String Yes

ID of the customer resource.

invoiceId String No

ID of the invoice to which the credit memo is issued.

id String No

ID of the credit memo.

_links[] Array No

Related links.

_links[].href String No

Link URL.

_links[].rel String No

Type of link.

Valid values:

  • "self"
  • "customer"
  • "invoice"
updatedTime String No

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

reason String No

Reason for the credit memo.

Valid values:

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

Total amount of all credits in the credit memo, including items, shipping, and tax.

Default value: 0

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.