Skip to main content
POST
/
invoices
/
{invoice_id}
/
credit_note
Create credit note against invoice
curl --request POST \
  --url https://api.zenskar.com/invoices/{invoice_id}/credit_note \
  --header 'Content-Type: application/json' \
  --header 'organisation: <api-key>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "credit_note_amount": 123,
  "reason": "<string>",
  "refund_destination": "credits",
  "refund_amount_split": [
    {
      "payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amount": 123,
      "refund_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ]
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amount": 123,
  "currency": "<string>",
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "in_progress",
  "repayment_method": "credits",
  "line_items_url": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "credits_returned": 123,
  "customer": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "email": "<string>",
    "external_id": "<string>"
  },
  "invoice": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "email": "<string>",
    "external_id": "<string>"
  },
  "invoice_id": "<string>",
  "custom_data": {},
  "credit_note_number": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs2.zenskar.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
default:<your-api-key>
required
organisation
string
header
default:<your-organisation-id>
required

Path Parameters

invoice_id
string<uuid>
required

Body

application/json
credit_note_amount
number
required

Adjustment amount to be applied to the invoice.

reason
string
required

Reason for the credit note

refund_destination
enum<string> | null

Where to send the refund money. This field is required if a payment needs to be refunded when issuing a credit note.

Available options:
credits,
original_payment_method,
external
refund_amount_split
RefundSplit · object[] | null

Split the refund across multiple payments. If not provided, the system will use payments in order from oldest to newest.

Response

Successful Response

id
string<uuid>
required

ID

amount
integer
required

Amount in lowest denomination of the currency

currency
string
required

Currency

customer_id
string<uuid>
required

Customer ID

status
enum<string>
required

Status

Available options:
in_progress,
issued,
void,
paid
repayment_method
enum<string>
required

Repayment Method

Available options:
credits,
invoice_adjusted,
external_payment,
credits_against_payment,
original_payment_method
line_items_url
string
required

Line Items URL

created_at
string<date-time>
required

Created At

credits_returned
integer | null

Credits amount in lowest denomination of the currency

customer
DetailsObject · object

Customer Object

invoice
DetailsObject · object

Invoice Object

invoice_id
string | null

Invoice ID

custom_data
Custom Data · object

Custom Data Dictionary

credit_note_number
string | null

Credit Note Number