curl --request GET \
--url https://app.saasybill.com/api/v1/credit_notes/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.saasybill.com/api/v1/credit_notes/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.saasybill.com/api/v1/credit_notes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.saasybill.com/api/v1/credit_notes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.saasybill.com/api/v1/credit_notes/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.saasybill.com/api/v1/credit_notes/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.saasybill.com/api/v1/credit_notes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "c2d7e1a4-8b36-4d19-a5f0-7e3b9c1d2f66",
"object": "credit_note",
"customer": "3b9f1c1e-6a52-4c0e-9d7e-1f6f2f0b7a11",
"subscription": "9d4e2b7a-13c5-4f8e-b6a0-2e1d7c9f5b33",
"number": "CN-0007",
"reference": null,
"status": "approved",
"currency": "AUD",
"credit_note_date": "2026-09-29T14:00:00.000Z",
"subtotal": "60.0000",
"total": "66.0000",
"remaining_credit": "0.0000",
"allocation_status": "applied",
"sent": false,
"xero": {
"sync_status": "synced",
"credit_note_id": "a1b2c3d4-e5f6-4789-8abc-def012345678",
"sync_error": null
},
"lines": [
{
"id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e99",
"name": "Team",
"description": "Team � reduction from 12 to 10 seats",
"amount": "60.0000",
"effective_date": "2026-09-29T14:00:00.000Z"
}
],
"allocations": [
{
"id": "3d4e5f6a-7b8c-4d9e-8f10-2b3c4d5e6faa",
"invoice": "5f8a3c9d-7e21-4b04-9c6d-0a2b4e8f1d55",
"amount": "66.0000",
"date": "2026-10-29T14:00:00.000Z",
"status": "active",
"xero_sync_status": "synced"
}
],
"created": "2026-09-29T14:00:05.000Z"
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Provide a valid API key as `Authorization: Bearer <key>`.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}{
"error": {
"type": "permission_error",
"code": "insufficient_scope",
"message": "This API key does not have the `subscriptions:write` scope.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}{
"error": {
"type": "not_found",
"code": "credit_note_not_found",
"message": "There is no credit note with that id.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}{
"error": {
"type": "conflict",
"code": "idempotency_conflict",
"message": "This `Idempotency-Key` was used with a different request. Use a new key for a different request.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "`units`: Invalid input: expected number, received string",
"param": "units",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Too many requests. Try again in 12 seconds.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "Something went wrong on our side. Retry the request; if it keeps failing, quote the request id.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}Retrieve a credit note
curl --request GET \
--url https://app.saasybill.com/api/v1/credit_notes/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.saasybill.com/api/v1/credit_notes/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.saasybill.com/api/v1/credit_notes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.saasybill.com/api/v1/credit_notes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.saasybill.com/api/v1/credit_notes/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.saasybill.com/api/v1/credit_notes/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.saasybill.com/api/v1/credit_notes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "c2d7e1a4-8b36-4d19-a5f0-7e3b9c1d2f66",
"object": "credit_note",
"customer": "3b9f1c1e-6a52-4c0e-9d7e-1f6f2f0b7a11",
"subscription": "9d4e2b7a-13c5-4f8e-b6a0-2e1d7c9f5b33",
"number": "CN-0007",
"reference": null,
"status": "approved",
"currency": "AUD",
"credit_note_date": "2026-09-29T14:00:00.000Z",
"subtotal": "60.0000",
"total": "66.0000",
"remaining_credit": "0.0000",
"allocation_status": "applied",
"sent": false,
"xero": {
"sync_status": "synced",
"credit_note_id": "a1b2c3d4-e5f6-4789-8abc-def012345678",
"sync_error": null
},
"lines": [
{
"id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e99",
"name": "Team",
"description": "Team � reduction from 12 to 10 seats",
"amount": "60.0000",
"effective_date": "2026-09-29T14:00:00.000Z"
}
],
"allocations": [
{
"id": "3d4e5f6a-7b8c-4d9e-8f10-2b3c4d5e6faa",
"invoice": "5f8a3c9d-7e21-4b04-9c6d-0a2b4e8f1d55",
"amount": "66.0000",
"date": "2026-10-29T14:00:00.000Z",
"status": "active",
"xero_sync_status": "synced"
}
],
"created": "2026-09-29T14:00:05.000Z"
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Provide a valid API key as `Authorization: Bearer <key>`.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}{
"error": {
"type": "permission_error",
"code": "insufficient_scope",
"message": "This API key does not have the `subscriptions:write` scope.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}{
"error": {
"type": "not_found",
"code": "credit_note_not_found",
"message": "There is no credit note with that id.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}{
"error": {
"type": "conflict",
"code": "idempotency_conflict",
"message": "This `Idempotency-Key` was used with a different request. Use a new key for a different request.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "`units`: Invalid input: expected number, received string",
"param": "units",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Too many requests. Try again in 12 seconds.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "Something went wrong on our side. Retry the request; if it keeps failing, quote the request id.",
"request_id": "req_4f1a9c2e7b8d3a605e1c9f02"
}
}credit_notes:read scope. See Authentication.Authorizations
An API key. Its scopes decide what it may call: customers:read (List and look up customers.) customers:write (Create customers, and Xero contacts where the organisation allows it.) catalogue:read (List plans and charges.) subscriptions:read (List and look up subscriptions.) subscriptions:write (Create subscriptions, change units, end and restore them.) invoices:read (List and look up invoices.) credit_notes:read (List and look up credit notes, and where their credit was applied.)
Path Parameters
The Saasybill id of the credit note.
"c2d7e1a4-8b36-4d19-a5f0-7e3b9c1d2f66"
Response
Success.
"credit_note"Xero's credit note number, once it is in Xero.
draft, awaiting_approval, approved, paid, voided, deleted, scheduled, not_in_external ISO 8601, UTC.
Excluding tax.
Including tax, as Xero returns it.
What is left to apply to invoices.
applied, partial, unapplied, error Show child attributes
Show child attributes
ISO 8601, UTC.
Show child attributes
Show child attributes
Where this credit has been applied. A reverted one no longer counts.
Show child attributes
Show child attributes
Was this page helpful?