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

# Onboard and pay out a worker

> Register a worker, collect their bank details, and send a payout.

Register a worker, collect their bank details, then pay them. You can pay out workers in 160+ countries.

**1. Create the worker**

Register the worker with [Worker Create](https://docs.mygigsters.com/api-reference/workers/worker-create.md). You can include bank details up front, or add them later. Keep the returned `worker_id`.

**2. Collect bank details — three options**

* **You already have them:** submit via [Add Bank Details](https://docs.mygigsters.com/api-reference/workers/add-bank-details.md). This takes Australian bank details.
* **Hosted form:** request a [Beneficiary URL](https://docs.mygigsters.com/api-reference/workers/beneficiary-url.md) and redirect the worker to a secure MyGigsters-hosted page. They enter details themselves and are returned to your `return_url`. The form shows the right fields for the worker's country.
* **Embedded form:** mount the [Beneficiary SDK](https://docs.mygigsters.com/sdks/beneficiary-sdk.md) directly in your web app for a fully in-context experience.

**3. Send the payout**

```bash cURL theme={null}
curl -X POST https://qa-payments.mygigsters.com.au/api/v1/worker-bank-payout \
  -u "YOUR_UUID:YOUR_SECRET" \
  -H "idempotency-Key: mx174dc0-281b-4cd3-847e-d3791a84f3ab" \
  -H "X-API-Version: 1.2" \
  -H "Content-Type: application/json" \
  -d '{
    "worker_id": "wkr_1042",
    "full_name": "Ravi Kumar",
    "amount": 320.50,
    "job_id": "job_8842",
    "reference": "Week 27 payout"
  }'
```

```javascript Node.js theme={null}
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/worker-bank-payout", {
  method: "POST",
  headers: {
    Authorization: "Basic " + Buffer.from("YOUR_UUID:YOUR_SECRET").toString("base64"),
    "idempotency-Key": "mx174dc0-281b-4cd3-847e-d3791a84f3ab",
    "X-API-Version": "1.2",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "worker_id": "wkr_1042",
    "full_name": "Ravi Kumar",
    "amount": 320.5,
    "job_id": "job_8842",
    "reference": "Week 27 payout"
  }),
});

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/worker-bank-payout",
    auth=("YOUR_UUID", "YOUR_SECRET"),
    headers={
        "idempotency-Key": "mx174dc0-281b-4cd3-847e-d3791a84f3ab",
        "X-API-Version": "1.2",
    },
    json={
        "worker_id": "wkr_1042",
        "full_name": "Ravi Kumar",
        "amount": 320.5,
        "job_id": "job_8842",
        "reference": "Week 27 payout",
    },
)

print(response.json())
```

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

uri = URI("https://qa-payments.mygigsters.com.au/api/v1/worker-bank-payout")
request = Net::HTTP::Post.new(uri)
request.basic_auth("YOUR_UUID", "YOUR_SECRET")
request["idempotency-Key"] = "mx174dc0-281b-4cd3-847e-d3791a84f3ab"
request["X-API-Version"] = "1.2"
request["Content-Type"] = "application/json"
request.body = <<~JSON
  {
    "worker_id": "wkr_1042",
    "full_name": "Ravi Kumar",
    "amount": 320.5,
    "job_id": "job_8842",
    "reference": "Week 27 payout"
  }
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/worker-bank-payout");

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_USERPWD => "YOUR_UUID:YOUR_SECRET",
    CURLOPT_HTTPHEADER => [
        "idempotency-Key: mx174dc0-281b-4cd3-847e-d3791a84f3ab",
        "X-API-Version: 1.2",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => <<<'JSON'
{
  "worker_id": "wkr_1042",
  "full_name": "Ravi Kumar",
  "amount": 320.5,
  "job_id": "job_8842",
  "reference": "Week 27 payout"
}
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",
            "{",
            "  \"worker_id\": \"wkr_1042\",",
            "  \"full_name\": \"Ravi Kumar\",",
            "  \"amount\": 320.5,",
            "  \"job_id\": \"job_8842\",",
            "  \"reference\": \"Week 27 payout\"",
            "}"
        );

        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/worker-bank-payout"))
            .header("Authorization", "Basic " + credentials)
            .header("idempotency-Key", "mx174dc0-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(`{
  "worker_id": "wkr_1042",
  "full_name": "Ravi Kumar",
  "amount": 320.5,
  "job_id": "job_8842",
  "reference": "Week 27 payout"
}`)

	req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/worker-bank-payout", body)
	if err != nil {
		panic(err)
	}
	req.SetBasicAuth("YOUR_UUID", "YOUR_SECRET")
	req.Header.Set("idempotency-Key", "mx174dc0-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/worker-bank-payout");
request.Headers.Authorization = new AuthenticationHeaderValue(
    "Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes("YOUR_UUID:YOUR_SECRET")));
request.Headers.Add("idempotency-Key", "mx174dc0-281b-4cd3-847e-d3791a84f3ab");
request.Headers.Add("X-API-Version", "1.2");
request.Content = new StringContent(@"{
  ""worker_id"": ""wkr_1042"",
  ""full_name"": ""Ravi Kumar"",
  ""amount"": 320.5,
  ""job_id"": ""job_8842"",
  ""reference"": ""Week 27 payout""
}", Encoding.UTF8, "application/json");

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

**4. Track the transfer**

Use the `transfer_id` from the payout response with [Payout Status](https://docs.mygigsters.com/api-reference/payouts/payout-status.md), or listen for `payout.succeeded` webhook events.

> [!NOTE]
>
> **One-off payouts:** to pay someone you haven’t registered as a worker, use [Talent Payouts](https://docs.mygigsters.com/api-reference/payouts/talent-payouts.md) with their bank details inline.


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