curl -X POST https://qa-payments.mygigsters.com.au/api/v1/receipt/payout \
-u "YOUR_UUID:YOUR_SECRET" \
-H "X-API-Version: 1.2" \
-H "Content-Type: application/json" \
-d '{
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321"
}'
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/receipt/payout", {
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({
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321"
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://qa-payments.mygigsters.com.au/api/v1/receipt/payout",
auth=("YOUR_UUID", "YOUR_SECRET"),
headers={
"X-API-Version": "1.2",
},
json={
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321",
},
)
print(response.json())
require "net/http"
require "json"
require "uri"
uri = URI("https://qa-payments.mygigsters.com.au/api/v1/receipt/payout")
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
{
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321"
}
JSON
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts JSON.parse(response.body)
<?php
$ch = curl_init("https://qa-payments.mygigsters.com.au/api/v1/receipt/payout");
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'
{
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321"
}
JSON,
]);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
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_full_name\": \"John Doe\",",
" \"worker_contact_number\": \"+1234567890\",",
" \"worker_email\": \"jane.smith@example.com\",",
" \"invoice_date_time\": \"2024-03-28T14:30:00Z\",",
" \"invoice_id\": \"INV12345\",",
" \"delivery_type\": \"Express\",",
" \"pick_up_address\": \"123 Main St, City, Country\",",
" \"pick_up_date_time\": \"2024-03-28T15:00:00Z\",",
" \"drop_off_address\": \"456 Elm St, City, Country\",",
" \"drop_off_date_time\": \"2024-03-28T16:30:00Z\",",
" \"total_distance\": 12.5,",
" \"total_earning_amount\": 5000,",
" \"payout_amount\": 4500,",
" \"bank_account_name\": \"John Doe\",",
" \"bsb\": \"123-456\",",
" \"account_number\": \"987654321\"",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/receipt/payout"))
.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());
}
}
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321"
}`)
req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/receipt/payout", 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))
}
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/receipt/payout");
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(@"{
""worker_full_name"": ""John Doe"",
""worker_contact_number"": ""+1234567890"",
""worker_email"": ""jane.smith@example.com"",
""invoice_date_time"": ""2024-03-28T14:30:00Z"",
""invoice_id"": ""INV12345"",
""delivery_type"": ""Express"",
""pick_up_address"": ""123 Main St, City, Country"",
""pick_up_date_time"": ""2024-03-28T15:00:00Z"",
""drop_off_address"": ""456 Elm St, City, Country"",
""drop_off_date_time"": ""2024-03-28T16:30:00Z"",
""total_distance"": 12.5,
""total_earning_amount"": 5000,
""payout_amount"": 4500,
""bank_account_name"": ""John Doe"",
""bsb"": ""123-456"",
""account_number"": ""987654321""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"status": 200,
"message": "Receipt sent successfully"
}
Invoices
Payout receipt
This endpoint enables you to generate and send a payout receipt for a business transaction. The receipt will be emailed to the address provided in the request.
POST
/
receipt
/
payout
curl -X POST https://qa-payments.mygigsters.com.au/api/v1/receipt/payout \
-u "YOUR_UUID:YOUR_SECRET" \
-H "X-API-Version: 1.2" \
-H "Content-Type: application/json" \
-d '{
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321"
}'
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/receipt/payout", {
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({
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321"
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://qa-payments.mygigsters.com.au/api/v1/receipt/payout",
auth=("YOUR_UUID", "YOUR_SECRET"),
headers={
"X-API-Version": "1.2",
},
json={
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321",
},
)
print(response.json())
require "net/http"
require "json"
require "uri"
uri = URI("https://qa-payments.mygigsters.com.au/api/v1/receipt/payout")
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
{
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321"
}
JSON
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts JSON.parse(response.body)
<?php
$ch = curl_init("https://qa-payments.mygigsters.com.au/api/v1/receipt/payout");
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'
{
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321"
}
JSON,
]);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
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_full_name\": \"John Doe\",",
" \"worker_contact_number\": \"+1234567890\",",
" \"worker_email\": \"jane.smith@example.com\",",
" \"invoice_date_time\": \"2024-03-28T14:30:00Z\",",
" \"invoice_id\": \"INV12345\",",
" \"delivery_type\": \"Express\",",
" \"pick_up_address\": \"123 Main St, City, Country\",",
" \"pick_up_date_time\": \"2024-03-28T15:00:00Z\",",
" \"drop_off_address\": \"456 Elm St, City, Country\",",
" \"drop_off_date_time\": \"2024-03-28T16:30:00Z\",",
" \"total_distance\": 12.5,",
" \"total_earning_amount\": 5000,",
" \"payout_amount\": 4500,",
" \"bank_account_name\": \"John Doe\",",
" \"bsb\": \"123-456\",",
" \"account_number\": \"987654321\"",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/receipt/payout"))
.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());
}
}
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321"
}`)
req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/receipt/payout", 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))
}
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/receipt/payout");
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(@"{
""worker_full_name"": ""John Doe"",
""worker_contact_number"": ""+1234567890"",
""worker_email"": ""jane.smith@example.com"",
""invoice_date_time"": ""2024-03-28T14:30:00Z"",
""invoice_id"": ""INV12345"",
""delivery_type"": ""Express"",
""pick_up_address"": ""123 Main St, City, Country"",
""pick_up_date_time"": ""2024-03-28T15:00:00Z"",
""drop_off_address"": ""456 Elm St, City, Country"",
""drop_off_date_time"": ""2024-03-28T16:30:00Z"",
""total_distance"": 12.5,
""total_earning_amount"": 5000,
""payout_amount"": 4500,
""bank_account_name"": ""John Doe"",
""bsb"": ""123-456"",
""account_number"": ""987654321""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"status": 200,
"message": "Receipt sent successfully"
}
Headers
string
default:"1.2"
required
The API version to use. Supported versions are
1.1 and 1.2.Request Body Parameters
string
required
Full name of the worker.
string
required
Contact number of the worker.
string
required
Email address of the worker where the receipt will be sent.
string
required
Date and time of the invoice (ISO 8601 format).
string
required
Unique identifier for the invoice.
string
required
Type of delivery (e.g., ‘Express’, ‘Standard’).
string
required
Address of the pickup location.
string
required
Date and time of the pickup (ISO 8601 format).
string
required
Address of the drop-off location.
string
required
Date and time of the drop-off (ISO 8601 format).
number
required
Total distance covered for the delivery.
number
required
Total earning amount for the delivery.
number
required
Payout amount transferred to the worker.
string
required
Name associated with the destination bank account.
string
required
The BSB code (6 digits, formatted as XXX-XXX or XXXXXX) for Australian bank accounts.
string
required
Destination bank account number.
Response Body
The response is in JSON format and contains:number
Indicates the status code of the response.
string
Confirmation message indicating whether the receipt was sent successfully.
Response Codes
| Code | Description |
|---|---|
| 200 | If the request is successful, the payout receipt is generated and sent to the provided email address. |
| 400 | Bad Request. Invalid parameters or validation failure. |
| 401 | Unauthorized. Missing or invalid credentials. |
| 409 | Conflict. Duplicate idempotency key or duplicate receipt ID. |
| 500 | Internal Server Error. |
curl -X POST https://qa-payments.mygigsters.com.au/api/v1/receipt/payout \
-u "YOUR_UUID:YOUR_SECRET" \
-H "X-API-Version: 1.2" \
-H "Content-Type: application/json" \
-d '{
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321"
}'
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/receipt/payout", {
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({
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321"
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://qa-payments.mygigsters.com.au/api/v1/receipt/payout",
auth=("YOUR_UUID", "YOUR_SECRET"),
headers={
"X-API-Version": "1.2",
},
json={
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321",
},
)
print(response.json())
require "net/http"
require "json"
require "uri"
uri = URI("https://qa-payments.mygigsters.com.au/api/v1/receipt/payout")
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
{
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321"
}
JSON
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts JSON.parse(response.body)
<?php
$ch = curl_init("https://qa-payments.mygigsters.com.au/api/v1/receipt/payout");
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'
{
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321"
}
JSON,
]);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
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_full_name\": \"John Doe\",",
" \"worker_contact_number\": \"+1234567890\",",
" \"worker_email\": \"jane.smith@example.com\",",
" \"invoice_date_time\": \"2024-03-28T14:30:00Z\",",
" \"invoice_id\": \"INV12345\",",
" \"delivery_type\": \"Express\",",
" \"pick_up_address\": \"123 Main St, City, Country\",",
" \"pick_up_date_time\": \"2024-03-28T15:00:00Z\",",
" \"drop_off_address\": \"456 Elm St, City, Country\",",
" \"drop_off_date_time\": \"2024-03-28T16:30:00Z\",",
" \"total_distance\": 12.5,",
" \"total_earning_amount\": 5000,",
" \"payout_amount\": 4500,",
" \"bank_account_name\": \"John Doe\",",
" \"bsb\": \"123-456\",",
" \"account_number\": \"987654321\"",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/receipt/payout"))
.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());
}
}
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"worker_full_name": "John Doe",
"worker_contact_number": "+1234567890",
"worker_email": "jane.smith@example.com",
"invoice_date_time": "2024-03-28T14:30:00Z",
"invoice_id": "INV12345",
"delivery_type": "Express",
"pick_up_address": "123 Main St, City, Country",
"pick_up_date_time": "2024-03-28T15:00:00Z",
"drop_off_address": "456 Elm St, City, Country",
"drop_off_date_time": "2024-03-28T16:30:00Z",
"total_distance": 12.5,
"total_earning_amount": 5000,
"payout_amount": 4500,
"bank_account_name": "John Doe",
"bsb": "123-456",
"account_number": "987654321"
}`)
req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/receipt/payout", 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))
}
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/receipt/payout");
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(@"{
""worker_full_name"": ""John Doe"",
""worker_contact_number"": ""+1234567890"",
""worker_email"": ""jane.smith@example.com"",
""invoice_date_time"": ""2024-03-28T14:30:00Z"",
""invoice_id"": ""INV12345"",
""delivery_type"": ""Express"",
""pick_up_address"": ""123 Main St, City, Country"",
""pick_up_date_time"": ""2024-03-28T15:00:00Z"",
""drop_off_address"": ""456 Elm St, City, Country"",
""drop_off_date_time"": ""2024-03-28T16:30:00Z"",
""total_distance"": 12.5,
""total_earning_amount"": 5000,
""payout_amount"": 4500,
""bank_account_name"": ""John Doe"",
""bsb"": ""123-456"",
""account_number"": ""987654321""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"status": 200,
"message": "Receipt sent successfully"
}
Last modified on November 10, 2026
Was this page helpful?
