Skip to main content
POST
/
credit_notes
Create credit note
curl --request POST \
  --url https://api.zenskar.com/credit_notes \
  --header 'Content-Type: application/json' \
  --header 'organisation: <api-key>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "amount": 123,
  "currency": "<string>",
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "in_progress",
  "repayment_method": "credits",
  "line_items": {},
  "credits_returned": 123,
  "refund_amount": 123,
  "invoice_id": "<string>",
  "credit_note_number": "<string>",
  "custom_data": {},
  "refund_destination": "credits",
  "refund_amount_split": [
    {
      "payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amount": 123,
      "external_payment_id": "<string>",
      "connector_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

Body

application/json
amount
integer
required

Credit Note Amount

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
Line Items · object
required

Line Items

credits_returned
integer | null

Credits amount returned

refund_amount
integer

Refund Amount (if any) against payments, should be addition of refund amount split

invoice_id
string | null

Invoice ID

credit_note_number
string | null

Credit Note Number

custom_data
Custom Data · object

Custom Data Dictionary

refund_destination
enum<string> | null
Available options:
credits,
original_payment_method,
external
refund_amount_split
RefundSplitInPayments · object[] | null

Refund Amount Split

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