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

# API reference

> Base URLs, authentication, and conventions for the MyGigsters Payments API.

The MyGigsters Payments API is a REST API. It accepts and returns JSON, and uses standard HTTP status codes.

## Base URLs

| Environment | Base URL |
| - | - |
| Demo (QA) | `https://qa-payments.mygigsters.com.au/api/v1` |
| Production | `https://prod-payments.mygigsters.com.au/api/v1` |

The examples and the interactive playground in this reference use the demo environment. See [Environments](https://docs.mygigsters.com/get-started/environments.md).

## Authentication

Send your API key pair with HTTP Basic authentication, and include the version header on every request.

```bash cURL theme={null}
curl https://qa-payments.mygigsters.com.au/api/v1/customer/{customer_id} \
  -u "YOUR_UUID:YOUR_SECRET" \
  -H "X-API-Version: 1.2"
```

```javascript Node.js theme={null}
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/customer/{customer_id}", {
  method: "GET",
  headers: {
    Authorization: "Basic " + Buffer.from("YOUR_UUID:YOUR_SECRET").toString("base64"),
    "X-API-Version": "1.2",
  },
});

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

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

response = requests.get(
    "https://qa-payments.mygigsters.com.au/api/v1/customer/{customer_id}",
    auth=("YOUR_UUID", "YOUR_SECRET"),
    headers={
        "X-API-Version": "1.2",
    },
)

print(response.json())
```

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

uri = URI("https://qa-payments.mygigsters.com.au/api/v1/customer/{customer_id}")
request = Net::HTTP::Get.new(uri)
request.basic_auth("YOUR_UUID", "YOUR_SECRET")
request["X-API-Version"] = "1.2"

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/customer/{customer_id}");

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_USERPWD => "YOUR_UUID:YOUR_SECRET",
    CURLOPT_HTTPHEADER => [
        "X-API-Version: 1.2",
    ],
]);

$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/customer/{customer_id}"))
            .header("Authorization", "Basic " + credentials)
            .header("X-API-Version", "1.2")
            .method("GET", 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("GET", "https://qa-payments.mygigsters.com.au/api/v1/customer/{customer_id}", nil)
	if err != nil {
		panic(err)
	}
	req.SetBasicAuth("YOUR_UUID", "YOUR_SECRET")
	req.Header.Set("X-API-Version", "1.2")

	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.Get, "https://qa-payments.mygigsters.com.au/api/v1/customer/{customer_id}");
request.Headers.Authorization = new AuthenticationHeaderValue(
    "Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes("YOUR_UUID:YOUR_SECRET")));
request.Headers.Add("X-API-Version", "1.2");

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

Partner endpoints use a Bearer token instead. Get one from [Authenticate partner](https://docs.mygigsters.com/api-reference/partner-account/partner-authenticate.md).

See [Authentication](https://docs.mygigsters.com/get-started/authentication.md) for details.

## Conventions

* **Versioning:** send `X-API-Version: 1.2`. See [API versioning](https://docs.mygigsters.com/security/versioning.md).
* **Field names:** version 1.2 uses snake\_case for request and response fields.
* **Idempotency:** send an `idempotency-Key` header on `POST` and `PUT` requests. See [Idempotency](https://docs.mygigsters.com/security/idempotency.md).
* **Errors:** every error returns the same JSON format. See [Errors and conventions](https://docs.mygigsters.com/api-reference/errors-and-conventions.md).

## Resources

> [card] [Customers](https://docs.mygigsters.com/api-reference/customers/customer-create.md)

> [card] [Cards](https://docs.mygigsters.com/api-reference/cards/get-all-cards.md)

> [card] [Payment intents](https://docs.mygigsters.com/api-reference/payment-intents/create-intent.md)

> [card] [Payments](https://docs.mygigsters.com/api-reference/payments/generate-payment-link.md)

> [card] [Wallet](https://docs.mygigsters.com/api-reference/wallet/get-wallet.md)

> [card] [Workers](https://docs.mygigsters.com/api-reference/workers/worker-create.md)

> [card] [Payouts](https://docs.mygigsters.com/api-reference/payouts/payout-worker.md)

> [card] [Invoices](https://docs.mygigsters.com/api-reference/invoices/create-send-invoice.md)

> [card] [Credit notes](https://docs.mygigsters.com/api-reference/credit-notes/create-draft-credit-note.md)

> [card] [Subscriptions](https://docs.mygigsters.com/api-reference/subscriptions/create-subscription.md)

> [card] [Document verification](https://docs.mygigsters.com/api-reference/document-verification/verify-abn.md)

> [card] [Partner account](https://docs.mygigsters.com/api-reference/partner-account/partner-authenticate.md)


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