> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mygigsters.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Issue credit note

> Transitions a credit note from DRAFT to ISSUED. Assigns a formal credit note reference number, locks draft modification, and activates the credit balance for invoice allocation.

### Headers

**X-API-Version** `string` *required* (default: 1.2)

The API version to use. Supported versions are `1.1` and `1.2`.

**Idempotency-Key** `string`

A unique key so a retried request is not processed twice.

### Path Parameters

**id** `string` *required*

The unique ID (UUID) of the draft credit note to issue.

### Response Body

**status** `number`

HTTP status code (200).

**message** `string`

Confirmation message (e.g. `Credit note issued successfully`).

**data.id** `string`

Credit note UUID.

**data.creditNoteNumber** `string`

Official unique identifier generated on issuance (e.g. `CN-2026-0089`).

**data.status** `string`

Updated status, transitioned to `ISSUED`.

**data.remainingAmount** `number`

Total credit available to be allocated against invoices.

### Response Codes

| Code | Description |
| - | - |
| 200 | Credit note issued and finalized successfully. |
| 400 | Bad Request. Credit note is not in DRAFT state. |
| 401 | Unauthorized. Missing or invalid credentials. |
| 404 | Not Found. Credit note ID not found. |
| 500 | Internal server error. |

```bash cURL theme={null}
curl -X POST https://qa-payments.mygigsters.com.au/api/v1/credit-notes/3/issue \
  -u "YOUR_UUID:YOUR_SECRET" \
  -H "idempotency-Key: cn-req-issue-003" \
  -H "X-API-Version: 1.2" \
  -H "Content-Type: application/json"
```

```javascript Node.js theme={null}
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/credit-notes/3/issue", {
  method: "POST",
  headers: {
    Authorization: "Basic " + Buffer.from("YOUR_UUID:YOUR_SECRET").toString("base64"),
    "idempotency-Key": "cn-req-issue-003",
    "X-API-Version": "1.2",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
```

```python Python theme={null}
import requests

response = requests.post(
    "https://qa-payments.mygigsters.com.au/api/v1/credit-notes/3/issue",
    auth=("YOUR_UUID", "YOUR_SECRET"),
    headers={
        "idempotency-Key": "cn-req-issue-003",
        "X-API-Version": "1.2",
        "Content-Type": "application/json",
    },
)

print(response.json())
```

```ruby Ruby theme={null}
require "net/http"
require "json"
require "uri"

uri = URI("https://qa-payments.mygigsters.com.au/api/v1/credit-notes/3/issue")
request = Net::HTTP::Post.new(uri)
request.basic_auth("YOUR_UUID", "YOUR_SECRET")
request["idempotency-Key"] = "cn-req-issue-003"
request["X-API-Version"] = "1.2"
request["Content-Type"] = "application/json"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end

puts JSON.parse(response.body)
```

```php PHP theme={null}
<?php

$ch = curl_init("https://qa-payments.mygigsters.com.au/api/v1/credit-notes/3/issue");

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_USERPWD => "YOUR_UUID:YOUR_SECRET",
    CURLOPT_HTTPHEADER => [
        "idempotency-Key: cn-req-issue-003",
        "X-API-Version: 1.2",
        "Content-Type: application/json",
    ],
]);

$response = curl_exec($ch);
curl_close($ch);

print_r(json_decode($response, true));
```

```java Java theme={null}
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());

        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/credit-notes/3/issue"))
            .header("Authorization", "Basic " + credentials)
            .header("idempotency-Key", "cn-req-issue-003")
            .header("X-API-Version", "1.2")
            .header("Content-Type", "application/json")
            .method("POST", HttpRequest.BodyPublishers.noBody())
            .build();

        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());

        System.out.println(response.body());
    }
}
```

```go Go theme={null}
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/credit-notes/3/issue", nil)
	if err != nil {
		panic(err)
	}
	req.SetBasicAuth("YOUR_UUID", "YOUR_SECRET")
	req.Header.Set("idempotency-Key", "cn-req-issue-003")
	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))
}
```

```csharp .NET theme={null}
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/3/issue");
request.Headers.Authorization = new AuthenticationHeaderValue(
    "Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes("YOUR_UUID:YOUR_SECRET")));
request.Headers.Add("idempotency-Key", "cn-req-issue-003");
request.Headers.Add("X-API-Version", "1.2");

var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
```

```json Response theme={null}
{
  "success": true,
  "message": "Credit note issued successfully",
  "data": {
    "id": 3,
    "credit_note_number": "CN-0003",
    "client_id": "4407c3ba-10c9-4822-9f51-c2c96692f8d7",
    "customer_id": "4407c3ba-10c9-4822-9f51-c2c96692f8d7",
    "invoice_id": "24de1b2b-6875-4cca-927d-2ad3c4d564b5",
    "invoice_number": "INV-0023",
    "payment_id": null,
    "total_amount": "150.00",
    "remaining_amount": "150.00",
    "applied_amount": "0.00",
    "currency": "AUD",
    "status": "ISSUED",
    "reason": "Customer discount / Service dispute",
    "description": "150 AUD credit issued for overbilled service hours",
    "date": "2026-09-17T10:58:30.694Z",
    "deleted_at": null,
    "created_at": "2026-09-17T10:45:02.000Z",
    "updated_at": "2026-09-17T10:58:30.696Z"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.