Apply a Credit Note to an Invoice
curl --request POST \
--url https://eu.sequencehq.com/api/credit-note-applications \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7",
"invoiceId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
"amount": 50,
"currency": "USD",
"creditNoteBalanceVersion": 3,
"invoiceBalanceVersion": 7
}
'import requests
url = "https://eu.sequencehq.com/api/credit-note-applications"
payload = {
"creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7",
"invoiceId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
"amount": 50,
"currency": "USD",
"creditNoteBalanceVersion": 3,
"invoiceBalanceVersion": 7
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
creditNoteId: 'af60cab3-812d-4250-a051-0fb7133a00c7',
invoiceId: '61b083e0-1faa-47ca-9aeb-6205da8f6c47',
amount: 50,
currency: 'USD',
creditNoteBalanceVersion: 3,
invoiceBalanceVersion: 7
})
};
fetch('https://eu.sequencehq.com/api/credit-note-applications', 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://eu.sequencehq.com/api/credit-note-applications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'creditNoteId' => 'af60cab3-812d-4250-a051-0fb7133a00c7',
'invoiceId' => '61b083e0-1faa-47ca-9aeb-6205da8f6c47',
'amount' => 50,
'currency' => 'USD',
'creditNoteBalanceVersion' => 3,
'invoiceBalanceVersion' => 7
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://eu.sequencehq.com/api/credit-note-applications"
payload := strings.NewReader("{\n \"creditNoteId\": \"af60cab3-812d-4250-a051-0fb7133a00c7\",\n \"invoiceId\": \"61b083e0-1faa-47ca-9aeb-6205da8f6c47\",\n \"amount\": 50,\n \"currency\": \"USD\",\n \"creditNoteBalanceVersion\": 3,\n \"invoiceBalanceVersion\": 7\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://eu.sequencehq.com/api/credit-note-applications")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"creditNoteId\": \"af60cab3-812d-4250-a051-0fb7133a00c7\",\n \"invoiceId\": \"61b083e0-1faa-47ca-9aeb-6205da8f6c47\",\n \"amount\": 50,\n \"currency\": \"USD\",\n \"creditNoteBalanceVersion\": 3,\n \"invoiceBalanceVersion\": 7\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.sequencehq.com/api/credit-note-applications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"creditNoteId\": \"af60cab3-812d-4250-a051-0fb7133a00c7\",\n \"invoiceId\": \"61b083e0-1faa-47ca-9aeb-6205da8f6c47\",\n \"amount\": 50,\n \"currency\": \"USD\",\n \"creditNoteBalanceVersion\": 3,\n \"invoiceBalanceVersion\": 7\n}"
response = http.request(request)
puts response.read_bodyThis response has no body data.{
"ledgerTransactionId": "0192c1b6-7f3a-7000-8000-000000000001",
"creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7",
"invoiceId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
"amount": 50,
"currency": "USD",
"appliedAt": "2026-05-28T12:34:56Z",
"invoiceBalance": {
"value": 150,
"currency": "USD",
"version": 8
},
"creditNoteBalance": {
"value": 50,
"currency": "USD",
"version": 4
}
}This response has no body data.This response has no body data.{
"message": "Balance version mismatch. Re-read current versions and retry.",
"currentInvoiceBalance": {
"value": 150,
"currency": "USD",
"version": 8
},
"currentCreditNoteBalance": {
"value": 50,
"currency": "USD",
"version": 4
}
}This response has no body data.Credit Notes
Apply a Credit Note to an Invoice
Allocates an amount from a Credit Note’s balance to an Invoice’s balance.
POST
/
credit-note-applications
Apply a Credit Note to an Invoice
curl --request POST \
--url https://eu.sequencehq.com/api/credit-note-applications \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7",
"invoiceId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
"amount": 50,
"currency": "USD",
"creditNoteBalanceVersion": 3,
"invoiceBalanceVersion": 7
}
'import requests
url = "https://eu.sequencehq.com/api/credit-note-applications"
payload = {
"creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7",
"invoiceId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
"amount": 50,
"currency": "USD",
"creditNoteBalanceVersion": 3,
"invoiceBalanceVersion": 7
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
creditNoteId: 'af60cab3-812d-4250-a051-0fb7133a00c7',
invoiceId: '61b083e0-1faa-47ca-9aeb-6205da8f6c47',
amount: 50,
currency: 'USD',
creditNoteBalanceVersion: 3,
invoiceBalanceVersion: 7
})
};
fetch('https://eu.sequencehq.com/api/credit-note-applications', 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://eu.sequencehq.com/api/credit-note-applications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'creditNoteId' => 'af60cab3-812d-4250-a051-0fb7133a00c7',
'invoiceId' => '61b083e0-1faa-47ca-9aeb-6205da8f6c47',
'amount' => 50,
'currency' => 'USD',
'creditNoteBalanceVersion' => 3,
'invoiceBalanceVersion' => 7
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://eu.sequencehq.com/api/credit-note-applications"
payload := strings.NewReader("{\n \"creditNoteId\": \"af60cab3-812d-4250-a051-0fb7133a00c7\",\n \"invoiceId\": \"61b083e0-1faa-47ca-9aeb-6205da8f6c47\",\n \"amount\": 50,\n \"currency\": \"USD\",\n \"creditNoteBalanceVersion\": 3,\n \"invoiceBalanceVersion\": 7\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://eu.sequencehq.com/api/credit-note-applications")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"creditNoteId\": \"af60cab3-812d-4250-a051-0fb7133a00c7\",\n \"invoiceId\": \"61b083e0-1faa-47ca-9aeb-6205da8f6c47\",\n \"amount\": 50,\n \"currency\": \"USD\",\n \"creditNoteBalanceVersion\": 3,\n \"invoiceBalanceVersion\": 7\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.sequencehq.com/api/credit-note-applications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"creditNoteId\": \"af60cab3-812d-4250-a051-0fb7133a00c7\",\n \"invoiceId\": \"61b083e0-1faa-47ca-9aeb-6205da8f6c47\",\n \"amount\": 50,\n \"currency\": \"USD\",\n \"creditNoteBalanceVersion\": 3,\n \"invoiceBalanceVersion\": 7\n}"
response = http.request(request)
puts response.read_bodyThis response has no body data.{
"ledgerTransactionId": "0192c1b6-7f3a-7000-8000-000000000001",
"creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7",
"invoiceId": "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
"amount": 50,
"currency": "USD",
"appliedAt": "2026-05-28T12:34:56Z",
"invoiceBalance": {
"value": 150,
"currency": "USD",
"version": 8
},
"creditNoteBalance": {
"value": 50,
"currency": "USD",
"version": 4
}
}This response has no body data.This response has no body data.{
"message": "Balance version mismatch. Re-read current versions and retry.",
"currentInvoiceBalance": {
"value": 150,
"currency": "USD",
"version": 8
},
"currentCreditNoteBalance": {
"value": 50,
"currency": "USD",
"version": 4
}
}This response has no body data.Headers
Your API credentials. Eg. Basic {credentials}.
Use this header to select an API version
Available options:
2024-07-30 Body
application/json
The Credit Note to draw from
Example:
"af60cab3-812d-4250-a051-0fb7133a00c7"
The Invoice to apply credit to
Example:
"61b083e0-1faa-47ca-9aeb-6205da8f6c47"
Amount to allocate from the Credit Note to the Invoice.
Example:
50
Currency of the amount. Must match the Credit Note and Invoice currency.
Available options:
AED, ARS, AUD, BRL, BGN, CAD, CHF, CLP, CNY, COP, CZK, DKK, EGP, EUR, GBP, HKD, ILS, INR, ISK, JPY, KRW, MXN, NOK, NZD, PLN, SAR, SEK, SGD, THB, USD, UYU, ZAR Example:
"GBP"
Expected current balance version of the Credit Note (for OCC)
Example:
3
Expected current balance version of the Invoice (for OCC)
Example:
7
Response
⌘I