Create a credit memo

Creates a credit memo.

SecurityAPI Key: SecretApiKey or HTTP: JWT
Request
Request Body schema: application/json
object

Allocations reduce the unused amount of a credit memo.

Array of objects

Items of the credit memo.

reason
string

Reason for the credit memo.

Enum: "return" "product-unsatisfactory" "order-change" "order-cancellation" "chargeback" "write-off" "waiver" "customer-credit" "other"
description
string

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

shippingAmount
number <double>
Default: 0

Shipping amount of an invoice to credit.

invoiceId
string or null <= 50 characters

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

post
/credit-memos
Request samples
application/json
{ "allocations": { }, "items": [ ], "reason": "return", "description": "string", "shippingAmount": 0, "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF", "currency": "USD", "invoiceId": "in_0YVF9605RKC62BP14NE2R7V2XT" }
Responses

201

Credit memo created.

401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

422

Invalid data sent.

Response samples
application/json
{ "id": "crmm_0YVCNN22TWC3G8H82QNPNVZCHG", "number": 0, "allocations": { }, "items": [ ], "status": "issued", "reason": "return", "description": "string", "shippingAmount": 0, "taxAmount": 0, "totalAmount": 0, "unusedAmount": 0, "revision": 0, "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF", "currency": "USD", "invoiceId": "in_0YVF9605RKC62BP14NE2R7V2XT", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "_links": [ ] }