POST /credit-memos
Creates a credit memo.
Servers
- https://api-sandbox.rebilly.com/organizations/{organizationId}
- https://api.rebilly.com/organizations/{organizationId}
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 |
_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:
|
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.
|
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
|
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.
|
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
|
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:
|
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:
|
totalAmount |
Number | No |
Total amount of all credits in the credit memo, including items, shipping, and tax. Default value: 0 |
How to start integrating
- Add HTTP Task to your workflow definition.
- 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.
- Click Test request to test run your request to the API and see the API's response.