curl -X POST https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply \
-u "YOUR_UUID:YOUR_SECRET" \
-H "idempotency-Key: cn-req-apply-004" \
-H "X-API-Version: 1.2" \
-H "Content-Type: application/json" \
-d '{
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717"
}'
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply", {
method: "POST",
headers: {
Authorization: "Basic " + Buffer.from("YOUR_UUID:YOUR_SECRET").toString("base64"),
"idempotency-Key": "cn-req-apply-004",
"X-API-Version": "1.2",
"Content-Type": "application/json",
},
body: JSON.stringify({
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717"
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply",
auth=("YOUR_UUID", "YOUR_SECRET"),
headers={
"idempotency-Key": "cn-req-apply-004",
"X-API-Version": "1.2",
},
json={
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717",
},
)
print(response.json())
require "net/http"
require "json"
require "uri"
uri = URI("https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply")
request = Net::HTTP::Post.new(uri)
request.basic_auth("YOUR_UUID", "YOUR_SECRET")
request["idempotency-Key"] = "cn-req-apply-004"
request["X-API-Version"] = "1.2"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717"
}
JSON
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts JSON.parse(response.body)
<?php
$ch = curl_init("https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_USERPWD => "YOUR_UUID:YOUR_SECRET",
CURLOPT_HTTPHEADER => [
"idempotency-Key: cn-req-apply-004",
"X-API-Version: 1.2",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717"
}
JSON,
]);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.Base64;
public class Example {
public static void main(String[] args) throws Exception {
String credentials = Base64.getEncoder()
.encodeToString("YOUR_UUID:YOUR_SECRET".getBytes());
String body = String.join("\n",
"{",
" \"amount\": 15,",
" \"invoice_id\": \"669dc683-4ad1-4971-a743-90d908788f01\",",
" \"notes\": \"Applying partial credit to invoice INV-4717\"",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply"))
.header("Authorization", "Basic " + credentials)
.header("idempotency-Key", "cn-req-apply-004")
.header("X-API-Version", "1.2")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717"
}`)
req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply", body)
if err != nil {
panic(err)
}
req.SetBasicAuth("YOUR_UUID", "YOUR_SECRET")
req.Header.Set("idempotency-Key", "cn-req-apply-004")
req.Header.Set("X-API-Version", "1.2")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}
using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply");
request.Headers.Authorization = new AuthenticationHeaderValue(
"Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes("YOUR_UUID:YOUR_SECRET")));
request.Headers.Add("idempotency-Key", "cn-req-apply-004");
request.Headers.Add("X-API-Version", "1.2");
request.Content = new StringContent(@"{
""amount"": 15,
""invoice_id"": ""669dc683-4ad1-4971-a743-90d908788f01"",
""notes"": ""Applying partial credit to invoice INV-4717""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"success": true,
"message": "Credit note applied successfully",
"data": {
"allocation": {
"id": 2,
"credit_note_id": 1,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"amount": "15.00",
"notes": "Applying partial credit to invoice INV-4717",
"updated_at": "2026-09-16T06:12:17.504Z",
"created_at": "2026-09-16T06:12:17.504Z"
},
"credit_note": {
"id": 1,
"credit_note_number": "CN-0001",
"client_id": "4407c3ba-10c9-4822-9f51-c2c96692f8d7",
"customer_id": "4407c3ba-10c9-4822-9f51-c2c96692f8d7",
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"invoice_number": "INV-4717",
"payment_id": null,
"total_amount": "50.00",
"remaining_amount": "10.00",
"applied_amount": "40.00",
"currency": "AUD",
"status": "PARTIALLY_APPLIED",
"reason": "Customer discount / Service dispute",
"description": "50 AUD credit issued for overbilled service hours",
"date": "2026-09-16T05:51:09.000Z",
"deleted_at": null,
"created_at": "2026-09-16T05:51:09.000Z",
"updated_at": "2026-09-16T06:12:17.626Z"
},
"invoice": {
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"invoice_number": "INV-4717",
"total_amount": "330",
"currency": "AUD"
}
}
}
Credit notes
Apply credit note
Allocates credit note balance to reduce the outstanding amount on an invoice. Updates credit note status to PARTIALLY_APPLIED or FULLY_APPLIED and records an allocation audit entry.
POST
/
credit-notes
/
{id}
/
apply
curl -X POST https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply \
-u "YOUR_UUID:YOUR_SECRET" \
-H "idempotency-Key: cn-req-apply-004" \
-H "X-API-Version: 1.2" \
-H "Content-Type: application/json" \
-d '{
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717"
}'
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply", {
method: "POST",
headers: {
Authorization: "Basic " + Buffer.from("YOUR_UUID:YOUR_SECRET").toString("base64"),
"idempotency-Key": "cn-req-apply-004",
"X-API-Version": "1.2",
"Content-Type": "application/json",
},
body: JSON.stringify({
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717"
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply",
auth=("YOUR_UUID", "YOUR_SECRET"),
headers={
"idempotency-Key": "cn-req-apply-004",
"X-API-Version": "1.2",
},
json={
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717",
},
)
print(response.json())
require "net/http"
require "json"
require "uri"
uri = URI("https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply")
request = Net::HTTP::Post.new(uri)
request.basic_auth("YOUR_UUID", "YOUR_SECRET")
request["idempotency-Key"] = "cn-req-apply-004"
request["X-API-Version"] = "1.2"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717"
}
JSON
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts JSON.parse(response.body)
<?php
$ch = curl_init("https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_USERPWD => "YOUR_UUID:YOUR_SECRET",
CURLOPT_HTTPHEADER => [
"idempotency-Key: cn-req-apply-004",
"X-API-Version: 1.2",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717"
}
JSON,
]);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.Base64;
public class Example {
public static void main(String[] args) throws Exception {
String credentials = Base64.getEncoder()
.encodeToString("YOUR_UUID:YOUR_SECRET".getBytes());
String body = String.join("\n",
"{",
" \"amount\": 15,",
" \"invoice_id\": \"669dc683-4ad1-4971-a743-90d908788f01\",",
" \"notes\": \"Applying partial credit to invoice INV-4717\"",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply"))
.header("Authorization", "Basic " + credentials)
.header("idempotency-Key", "cn-req-apply-004")
.header("X-API-Version", "1.2")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717"
}`)
req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply", body)
if err != nil {
panic(err)
}
req.SetBasicAuth("YOUR_UUID", "YOUR_SECRET")
req.Header.Set("idempotency-Key", "cn-req-apply-004")
req.Header.Set("X-API-Version", "1.2")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}
using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply");
request.Headers.Authorization = new AuthenticationHeaderValue(
"Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes("YOUR_UUID:YOUR_SECRET")));
request.Headers.Add("idempotency-Key", "cn-req-apply-004");
request.Headers.Add("X-API-Version", "1.2");
request.Content = new StringContent(@"{
""amount"": 15,
""invoice_id"": ""669dc683-4ad1-4971-a743-90d908788f01"",
""notes"": ""Applying partial credit to invoice INV-4717""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"success": true,
"message": "Credit note applied successfully",
"data": {
"allocation": {
"id": 2,
"credit_note_id": 1,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"amount": "15.00",
"notes": "Applying partial credit to invoice INV-4717",
"updated_at": "2026-09-16T06:12:17.504Z",
"created_at": "2026-09-16T06:12:17.504Z"
},
"credit_note": {
"id": 1,
"credit_note_number": "CN-0001",
"client_id": "4407c3ba-10c9-4822-9f51-c2c96692f8d7",
"customer_id": "4407c3ba-10c9-4822-9f51-c2c96692f8d7",
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"invoice_number": "INV-4717",
"payment_id": null,
"total_amount": "50.00",
"remaining_amount": "10.00",
"applied_amount": "40.00",
"currency": "AUD",
"status": "PARTIALLY_APPLIED",
"reason": "Customer discount / Service dispute",
"description": "50 AUD credit issued for overbilled service hours",
"date": "2026-09-16T05:51:09.000Z",
"deleted_at": null,
"created_at": "2026-09-16T05:51:09.000Z",
"updated_at": "2026-09-16T06:12:17.626Z"
},
"invoice": {
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"invoice_number": "INV-4717",
"total_amount": "330",
"currency": "AUD"
}
}
}
Headers
string
default:"1.2"
required
The API version to use. Supported versions are
1.1 and 1.2.string
A unique key so a retried request is not processed twice.
Path Parameters
string
required
The unique ID (UUID) of the credit note from which balance is allocated.
Request Body Parameters
number
required
The amount to allocate against the invoice. Cannot exceed
remainingAmount.string
required
The unique ID (UUID) of the target invoice to apply the credit toward.
string
Optional remarks or memo describing this allocation.
Response Body
number
HTTP status code (200).
string
Confirmation message (e.g.
Credit note applied successfully).number
Total cumulative amount credited across invoices.
number
Remaining credit balance available for future allocations.
string
Updated state:
PARTIALLY_APPLIED (if balance > 0) or FULLY_APPLIED (if balance = 0).object
Details of the newly created allocation record.
Response Codes
| Code | Description |
|---|---|
| 200 | Credit note balance applied successfully. |
| 400 | Bad Request. Amount exceeds remaining credit balance or invoice already paid. |
| 401 | Unauthorized. Missing or invalid credentials. |
| 404 | Not Found. Credit note or target invoice not found. |
| 500 | Internal server error. |
curl -X POST https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply \
-u "YOUR_UUID:YOUR_SECRET" \
-H "idempotency-Key: cn-req-apply-004" \
-H "X-API-Version: 1.2" \
-H "Content-Type: application/json" \
-d '{
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717"
}'
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply", {
method: "POST",
headers: {
Authorization: "Basic " + Buffer.from("YOUR_UUID:YOUR_SECRET").toString("base64"),
"idempotency-Key": "cn-req-apply-004",
"X-API-Version": "1.2",
"Content-Type": "application/json",
},
body: JSON.stringify({
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717"
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply",
auth=("YOUR_UUID", "YOUR_SECRET"),
headers={
"idempotency-Key": "cn-req-apply-004",
"X-API-Version": "1.2",
},
json={
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717",
},
)
print(response.json())
require "net/http"
require "json"
require "uri"
uri = URI("https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply")
request = Net::HTTP::Post.new(uri)
request.basic_auth("YOUR_UUID", "YOUR_SECRET")
request["idempotency-Key"] = "cn-req-apply-004"
request["X-API-Version"] = "1.2"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717"
}
JSON
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts JSON.parse(response.body)
<?php
$ch = curl_init("https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_USERPWD => "YOUR_UUID:YOUR_SECRET",
CURLOPT_HTTPHEADER => [
"idempotency-Key: cn-req-apply-004",
"X-API-Version: 1.2",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717"
}
JSON,
]);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.Base64;
public class Example {
public static void main(String[] args) throws Exception {
String credentials = Base64.getEncoder()
.encodeToString("YOUR_UUID:YOUR_SECRET".getBytes());
String body = String.join("\n",
"{",
" \"amount\": 15,",
" \"invoice_id\": \"669dc683-4ad1-4971-a743-90d908788f01\",",
" \"notes\": \"Applying partial credit to invoice INV-4717\"",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply"))
.header("Authorization", "Basic " + credentials)
.header("idempotency-Key", "cn-req-apply-004")
.header("X-API-Version", "1.2")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"amount": 15,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"notes": "Applying partial credit to invoice INV-4717"
}`)
req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply", body)
if err != nil {
panic(err)
}
req.SetBasicAuth("YOUR_UUID", "YOUR_SECRET")
req.Header.Set("idempotency-Key", "cn-req-apply-004")
req.Header.Set("X-API-Version", "1.2")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}
using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://qa-payments.mygigsters.com.au/api/v1/credit-notes/1/apply");
request.Headers.Authorization = new AuthenticationHeaderValue(
"Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes("YOUR_UUID:YOUR_SECRET")));
request.Headers.Add("idempotency-Key", "cn-req-apply-004");
request.Headers.Add("X-API-Version", "1.2");
request.Content = new StringContent(@"{
""amount"": 15,
""invoice_id"": ""669dc683-4ad1-4971-a743-90d908788f01"",
""notes"": ""Applying partial credit to invoice INV-4717""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"success": true,
"message": "Credit note applied successfully",
"data": {
"allocation": {
"id": 2,
"credit_note_id": 1,
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"amount": "15.00",
"notes": "Applying partial credit to invoice INV-4717",
"updated_at": "2026-09-16T06:12:17.504Z",
"created_at": "2026-09-16T06:12:17.504Z"
},
"credit_note": {
"id": 1,
"credit_note_number": "CN-0001",
"client_id": "4407c3ba-10c9-4822-9f51-c2c96692f8d7",
"customer_id": "4407c3ba-10c9-4822-9f51-c2c96692f8d7",
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"invoice_number": "INV-4717",
"payment_id": null,
"total_amount": "50.00",
"remaining_amount": "10.00",
"applied_amount": "40.00",
"currency": "AUD",
"status": "PARTIALLY_APPLIED",
"reason": "Customer discount / Service dispute",
"description": "50 AUD credit issued for overbilled service hours",
"date": "2026-09-16T05:51:09.000Z",
"deleted_at": null,
"created_at": "2026-09-16T05:51:09.000Z",
"updated_at": "2026-09-16T06:12:17.626Z"
},
"invoice": {
"invoice_id": "669dc683-4ad1-4971-a743-90d908788f01",
"invoice_number": "INV-4717",
"total_amount": "330",
"currency": "AUD"
}
}
}
Last modified on November 10, 2026
Was this page helpful?
