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

# Quickstart

> Create a demo account, make your first authenticated request, and create a customer you can charge.

In this tutorial you create your first customer. By the end you'll have verified your credentials, made an authenticated call, and received a customer you can charge.

## Before you begin

Create an account in the demo (QA) environment to get your API credentials.

> [card] [Create a QA account](https://app-qa-payments.mygigsters.com.au/signup)
>
> Sign up for the demo environment. No real money moves.

**1. Complete the signup form**

After you submit, you're redirected to the login page.

**2. Log in**

Use the email address you registered with. When asked for a one-time passcode, enter `123456`.

> [!NOTE]
>
> The fixed passcode `123456` works only in the demo (QA) environment.

## Make your first request

**1. Get your API key**

In the dashboard, go to **Settings → API Keys** and generate a key pair. Use a QA key for this tutorial. See [Authentication](https://docs.mygigsters.com/get-started/authentication.md) for details.

**2. Create a customer**

Customers are the people or businesses you charge. Run this from your terminal, replacing the credentials:

```bash cURL theme={null}
curl -X POST https://qa-payments.mygigsters.com.au/api/v1/customer \
  -u "YOUR_UUID:YOUR_SECRET" \
  -H "X-API-Version: 1.2" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "Jane",
    "last_name": "Smith",
    "email": "jane.smith@example.com",
    "phone": "+61400000000"
  }'
```

```javascript Node.js theme={null}
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/customer", {
  method: "POST",
  headers: {
    Authorization: "Basic " + Buffer.from("YOUR_UUID:YOUR_SECRET").toString("base64"),
    "X-API-Version": "1.2",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "first_name": "Jane",
    "last_name": "Smith",
    "email": "jane.smith@example.com",
    "phone": "+61400000000"
  }),
});

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/customer",
    auth=("YOUR_UUID", "YOUR_SECRET"),
    headers={
        "X-API-Version": "1.2",
    },
    json={
        "first_name": "Jane",
        "last_name": "Smith",
        "email": "jane.smith@example.com",
        "phone": "+61400000000",
    },
)

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")
request = Net::HTTP::Post.new(uri)
request.basic_auth("YOUR_UUID", "YOUR_SECRET")
request["X-API-Version"] = "1.2"
request["Content-Type"] = "application/json"
request.body = <<~JSON
  {
    "first_name": "Jane",
    "last_name": "Smith",
    "email": "jane.smith@example.com",
    "phone": "+61400000000"
  }
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/customer");

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_USERPWD => "YOUR_UUID:YOUR_SECRET",
    CURLOPT_HTTPHEADER => [
        "X-API-Version: 1.2",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => <<<'JSON'
{
  "first_name": "Jane",
  "last_name": "Smith",
  "email": "jane.smith@example.com",
  "phone": "+61400000000"
}
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",
            "{",
            "  \"first_name\": \"Jane\",",
            "  \"last_name\": \"Smith\",",
            "  \"email\": \"jane.smith@example.com\",",
            "  \"phone\": \"+61400000000\"",
            "}"
        );

        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/customer"))
            .header("Authorization", "Basic " + credentials)
            .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(`{
  "first_name": "Jane",
  "last_name": "Smith",
  "email": "jane.smith@example.com",
  "phone": "+61400000000"
}`)

	req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/customer", body)
	if err != nil {
		panic(err)
	}
	req.SetBasicAuth("YOUR_UUID", "YOUR_SECRET")
	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/customer");
request.Headers.Authorization = new AuthenticationHeaderValue(
    "Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes("YOUR_UUID:YOUR_SECRET")));
request.Headers.Add("X-API-Version", "1.2");
request.Content = new StringContent(@"{
  ""first_name"": ""Jane"",
  ""last_name"": ""Smith"",
  ""email"": ""jane.smith@example.com"",
  ""phone"": ""+61400000000""
}", Encoding.UTF8, "application/json");

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

**3. Check the response**

A successful request returns `201` with the new customer. Keep the `customer_id`. You use it for cards, intents, and charges.

```json Response theme={null}
{
  "status": 201,
  "message": "Customer created successfully",
  "my_gigster_id": "3e36d8a3-e013-4b0d-a72d-9b03c4ccb02e",
  "customer_id": "cus_hkdm99dbsh9iactpfvh",
  "save_card": "https://app-qa-payments.mygigsters.com.au/save-card/cus_hkdm99dbsh9iactpfvh/f2c1d9d2-c50d-460e-9e07-a1c58fa025f7"
}
```

The `save_card` link is where the customer can securely save a card.

**4. Fetch the customer back**

```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());
```

## Next steps

> [card] [Charge a customer](https://docs.mygigsters.com/guides/charge-a-customer.md)
>
> Take a payment.

> [card] [Onboard and pay a worker](https://docs.mygigsters.com/guides/onboard-and-pay-a-worker.md)
>
> Pay a worker.

> [card] [Receive webhooks](https://docs.mygigsters.com/security/webhooks.md)
>
> Get notified about events.


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