Create credit note
This endpoint is used to create a single Credit Note
.
Request Body required
- Array [
- ]
line_items object[] required
Possible values: >= 1
The ID of the line item to credit.
The total amount in the invoice's currency to credit this line item.
Possible values: [duplicate
, fraudulent
, order_change
, product_unsatisfactory
]
An optional reason for the credit note.
An optional memo to attach to the credit note.
- 200
- 400
- 401
- 404
- 409
- 413
- 429
- 500
OK
Response Headers
Schema
- Array [
- Array [
- ]
- ]
- Array [
- ]
- Array [
- Array [
- ]
- Array [
- ]
- ]
The Orb id of this credit note.
The creation time of the resource in Orb.
The time at which the credit note was voided in Orb, if applicable.
The unique identifier for credit notes.
The id of the invoice resource that this credit note is applied to.
An optional memo supplied on the credit note.
Possible values: [Duplicate
, Fraudulent
, Order change
, Product unsatisfactory
]
Possible values: [refund
, adjustment
]
The total prior to any creditable invoice-level discounts or minimums.
The total including creditable invoice-level discounts or minimums, and tax.
customer object required
A URL to a PDF of the credit note.
Any credited amount from the applied minimum on the invoice.
discounts object[]
Any discounts applied on the original invoice.
Possible values: [percentage
]
applies_to_prices object[] nullable
maximum_amount_adjustment object nullable
Possible values: [percentage
]
applies_to_prices object[] nullable
line_items object[] required
All of the line items associated with this credit note.
The Orb id of this resource.
The name of the corresponding invoice line item.
The amount of the line item, excluding any line item minimums and discounts.
The amount of the line item, including any line item minimums and discounts.
An optional quantity credited.
discounts object[]
Any line item discounts from the invoice's line item.
Possible values: [percentage
, amount
]
tax_amounts object[] required
Any tax amounts applied onto the line item.
The human-readable description of the applied tax rate.
The tax rate percentage, out of 100.
The amount of additional tax incurred by this tax rate.
{
"id": "string",
"created_at": "2024-12-20T17:17:31.729Z",
"voided_at": "2024-12-20T17:17:31.729Z",
"credit_note_number": "string",
"invoice_id": "string",
"memo": "string",
"reason": "Duplicate",
"type": "refund",
"subtotal": "string",
"total": "string",
"customer": {
"id": "string",
"external_customer_id": "string"
},
"credit_note_pdf": "string",
"minimum_amount_refunded": "string",
"discounts": [
{
"discount_type": "percentage",
"percentage_discount": 0,
"amount_applied": "string",
"reason": "string",
"applies_to_prices": [
{
"id": "string",
"name": "string"
}
]
}
],
"maximum_amount_adjustment": {
"discount_type": "percentage",
"percentage_discount": 0,
"amount_applied": "string",
"reason": "string",
"applies_to_prices": [
{
"id": "string",
"name": "string"
}
]
},
"line_items": [
{
"id": "string",
"name": "string",
"subtotal": "string",
"amount": "string",
"quantity": 0,
"discounts": [
{
"id": "string",
"discount_type": "percentage",
"percentage_discount": 0,
"amount_discount": "string",
"amount_applied": "string",
"reason": "string",
"applies_to_price_ids": [
"string"
]
}
],
"tax_amounts": [
{
"tax_rate_description": "string",
"tax_rate_percentage": "string",
"amount": "string"
}
]
}
]
}
Bad Request
Response Headers
Schema
Possible values: [https://docs.withorb.com/reference/error-responses#400-constraint-violation
]
Possible values: [400
]
Possible values: [https://docs.withorb.com/reference/error-responses#400-duplicate-resource-creation
]
Possible values: [400
]
Possible values: [https://docs.withorb.com/reference/error-responses#400-request-validation-errors
]
Possible values: [400
]
{}
Unauthorized
Response Headers
Schema
Possible values: [https://docs.withorb.com/reference/error-responses#401-authentication-error
]
Possible values: [401
]
{
"type": "https://docs.withorb.com/reference/error-responses#401-authentication-error",
"status": 401,
"detail": "string",
"title": "string"
}
Not Found
Response Headers
Schema
Possible values: [https://docs.withorb.com/reference/error-responses#404-feature-not-available
]
Possible values: [400
]
Possible values: [https://docs.withorb.com/reference/error-responses#404-resource-not-found
]
Possible values: [404
]
Possible values: [https://docs.withorb.com/reference/error-responses#404-url-not-found
]
Possible values: [404
]
{}
Conflict
Response Headers
Schema
Possible values: [https://docs.withorb.com/reference/error-responses#409-resource-conflict
]
Possible values: [409
]
{
"type": "https://docs.withorb.com/reference/error-responses#409-resource-conflict",
"status": 409,
"detail": "string",
"title": "string"
}
Request Entity Too Large
Response Headers
Schema
Possible values: [https://docs.withorb.com/reference/error-responses#413-request-too-large
]
Possible values: [413
]
Possible values: [https://docs.withorb.com/reference/error-responses#413-resource-too-large
]
Possible values: [413
]
Possible values: [https://docs.withorb.com/reference/error-responses#413-too-many-results
]
Possible values: [413
]
{}
Too Many Requests
Response Headers
Schema
Possible values: [https://docs.withorb.com/reference/error-responses#429-too-many-requests
]
Possible values: [429
]
{
"type": "https://docs.withorb.com/reference/error-responses#429-too-many-requests",
"status": 429,
"detail": "string",
"title": "string"
}
Internal Server Error
Response Headers
Schema
Possible values: [https://docs.withorb.com/reference/error-responses#500-internal-server-error
]
{
"type": "https://docs.withorb.com/reference/error-responses#500-internal-server-error",
"status": 0,
"detail": "string",
"title": "string"
}