> ## 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.

# Take payments with payment links

> Generate a hosted payment link, send it to your customer, and track its status.

No integration on the payment page required: generate a hosted link, send it to your customer, and poll or listen for its status. Payment links currently support AUD only.

**1. Generate the link**

```bash cURL theme={null}
curl -X POST https://qa-payments.mygigsters.com.au/api/v1/create/payment-link \
  -u "YOUR_UUID:YOUR_SECRET" \
  -H "idempotency-Key: sb184dc0-281b-4cd3-847e-d3791a84f3ab" \
  -H "X-API-Version: 1.2" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 250.00,
    "title": "Site cleanup - Bondi",
    "description": "Final payment for job #8842",
    "reference": "job_8842",
    "expires_at": "2026-08-01T00:00:00Z"
  }'
```

```javascript Node.js theme={null}
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/create/payment-link", {
  method: "POST",
  headers: {
    Authorization: "Basic " + Buffer.from("YOUR_UUID:YOUR_SECRET").toString("base64"),
    "idempotency-Key": "sb184dc0-281b-4cd3-847e-d3791a84f3ab",
    "X-API-Version": "1.2",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "amount": 250.0,
    "title": "Site cleanup - Bondi",
    "description": "Final payment for job #8842",
    "reference": "job_8842",
    "expires_at": "2026-08-01T00:00:00Z"
  }),
});

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/create/payment-link",
    auth=("YOUR_UUID", "YOUR_SECRET"),
    headers={
        "idempotency-Key": "sb184dc0-281b-4cd3-847e-d3791a84f3ab",
        "X-API-Version": "1.2",
    },
    json={
        "amount": 250.0,
        "title": "Site cleanup - Bondi",
        "description": "Final payment for job #8842",
        "reference": "job_8842",
        "expires_at": "2026-08-01T00:00:00Z",
    },
)

print(response.json())
```

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

uri = URI("https://qa-payments.mygigsters.com.au/api/v1/create/payment-link")
request = Net::HTTP::Post.new(uri)
request.basic_auth("YOUR_UUID", "YOUR_SECRET")
request["idempotency-Key"] = "sb184dc0-281b-4cd3-847e-d3791a84f3ab"
request["X-API-Version"] = "1.2"
request["Content-Type"] = "application/json"
request.body = <<~JSON
  {
    "amount": 250.0,
    "title": "Site cleanup - Bondi",
    "description": "Final payment for job #8842",
    "reference": "job_8842",
    "expires_at": "2026-08-01T00:00:00Z"
  }
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/create/payment-link");

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_USERPWD => "YOUR_UUID:YOUR_SECRET",
    CURLOPT_HTTPHEADER => [
        "idempotency-Key: sb184dc0-281b-4cd3-847e-d3791a84f3ab",
        "X-API-Version: 1.2",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => <<<'JSON'
{
  "amount": 250.0,
  "title": "Site cleanup - Bondi",
  "description": "Final payment for job #8842",
  "reference": "job_8842",
  "expires_at": "2026-08-01T00:00:00Z"
}
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());

        String body = String.join("\n",
            "{",
            "  \"amount\": 250.0,",
            "  \"title\": \"Site cleanup - Bondi\",",
            "  \"description\": \"Final payment for job #8842\",",
            "  \"reference\": \"job_8842\",",
            "  \"expires_at\": \"2026-08-01T00:00:00Z\"",
            "}"
        );

        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/create/payment-link"))
            .header("Authorization", "Basic " + credentials)
            .header("idempotency-Key", "sb184dc0-281b-4cd3-847e-d3791a84f3ab")
            .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());
    }
}
```

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

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

func main() {
	body := strings.NewReader(`{
  "amount": 250.0,
  "title": "Site cleanup - Bondi",
  "description": "Final payment for job #8842",
  "reference": "job_8842",
  "expires_at": "2026-08-01T00:00:00Z"
}`)

	req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/create/payment-link", body)
	if err != nil {
		panic(err)
	}
	req.SetBasicAuth("YOUR_UUID", "YOUR_SECRET")
	req.Header.Set("idempotency-Key", "sb184dc0-281b-4cd3-847e-d3791a84f3ab")
	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/create/payment-link");
request.Headers.Authorization = new AuthenticationHeaderValue(
    "Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes("YOUR_UUID:YOUR_SECRET")));
request.Headers.Add("idempotency-Key", "sb184dc0-281b-4cd3-847e-d3791a84f3ab");
request.Headers.Add("X-API-Version", "1.2");
request.Content = new StringContent(@"{
  ""amount"": 250.0,
  ""title"": ""Site cleanup - Bondi"",
  ""description"": ""Final payment for job #8842"",
  ""reference"": ""job_8842"",
  ""expires_at"": ""2026-08-01T00:00:00Z""
}", Encoding.UTF8, "application/json");

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

**2. Share the URL**

The response contains the hosted payment page `url` and the link’s `id`. Email or SMS it to your customer, or embed it in an invoice (see invoicing).

**3. Track payment**

Check [Payment Link Status](https://docs.mygigsters.com/api-reference/payments/get-payment-link-status.md) with the link id, or subscribe to payment webhooks to be notified in real time. Once paid, use the returned `intent_id` with [Get Payment Details](https://docs.mygigsters.com/api-reference/payments/get-payment-details.md) for fee and settlement breakdown.


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