curl -X POST https://qa-payments.mygigsters.com.au/api/v1/receipt/payment \
-u "YOUR_UUID:YOUR_SECRET" \
-H "X-API-Version: 1.2" \
-H "Content-Type: application/json" \
-d '{
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45:00Z"
}'
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/receipt/payment", {
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({
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45:00Z"
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://qa-payments.mygigsters.com.au/api/v1/receipt/payment",
auth=("YOUR_UUID", "YOUR_SECRET"),
headers={
"X-API-Version": "1.2",
},
json={
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45:00Z",
},
)
print(response.json())
require "net/http"
require "json"
require "uri"
uri = URI("https://qa-payments.mygigsters.com.au/api/v1/receipt/payment")
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
{
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45: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
$ch = curl_init("https://qa-payments.mygigsters.com.au/api/v1/receipt/payment");
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'
{
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45:00Z"
}
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",
"{",
" \"logo\": \"https://example.com/logo.png\",",
" \"customer_full_name\": \"John Doe\",",
" \"customer_first_name\": \"John\",",
" \"customer_contact_number\": \"+1234567890\",",
" \"customer_email\": \"jane.smith@example.com\",",
" \"receipt_date_time\": \"2024-03-28T14:30:00Z\",",
" \"receipt_id\": \"REC12345\",",
" \"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,",
" \"delivery_base_amount\": 2000,",
" \"discount_voucher_percentage\": 30,",
" \"discount_voucher_amount\": 500,",
" \"gst_amount\": 250,",
" \"total_paid_amount\": 1750,",
" \"card_last_digits\": \"1234\",",
" \"payment_date_time\": \"2024-03-28T14:45:00Z\"",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/receipt/payment"))
.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(`{
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45:00Z"
}`)
req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/receipt/payment", 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/payment");
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(@"{
""logo"": ""https://example.com/logo.png"",
""customer_full_name"": ""John Doe"",
""customer_first_name"": ""John"",
""customer_contact_number"": ""+1234567890"",
""customer_email"": ""jane.smith@example.com"",
""receipt_date_time"": ""2024-03-28T14:30:00Z"",
""receipt_id"": ""REC12345"",
""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,
""delivery_base_amount"": 2000,
""discount_voucher_percentage"": 30,
""discount_voucher_amount"": 500,
""gst_amount"": 250,
""total_paid_amount"": 1750,
""card_last_digits"": ""1234"",
""payment_date_time"": ""2024-03-28T14:45:00Z""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"status": 200,
"message": "Receipt sent successfully"
}
Invoices
Payment receipt
This endpoint enables you to generate and send a payment receipt for a business transaction. The receipt will be emailed to the address provided in the request.
POST
/
receipt
/
payment
curl -X POST https://qa-payments.mygigsters.com.au/api/v1/receipt/payment \
-u "YOUR_UUID:YOUR_SECRET" \
-H "X-API-Version: 1.2" \
-H "Content-Type: application/json" \
-d '{
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45:00Z"
}'
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/receipt/payment", {
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({
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45:00Z"
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://qa-payments.mygigsters.com.au/api/v1/receipt/payment",
auth=("YOUR_UUID", "YOUR_SECRET"),
headers={
"X-API-Version": "1.2",
},
json={
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45:00Z",
},
)
print(response.json())
require "net/http"
require "json"
require "uri"
uri = URI("https://qa-payments.mygigsters.com.au/api/v1/receipt/payment")
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
{
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45: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
$ch = curl_init("https://qa-payments.mygigsters.com.au/api/v1/receipt/payment");
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'
{
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45:00Z"
}
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",
"{",
" \"logo\": \"https://example.com/logo.png\",",
" \"customer_full_name\": \"John Doe\",",
" \"customer_first_name\": \"John\",",
" \"customer_contact_number\": \"+1234567890\",",
" \"customer_email\": \"jane.smith@example.com\",",
" \"receipt_date_time\": \"2024-03-28T14:30:00Z\",",
" \"receipt_id\": \"REC12345\",",
" \"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,",
" \"delivery_base_amount\": 2000,",
" \"discount_voucher_percentage\": 30,",
" \"discount_voucher_amount\": 500,",
" \"gst_amount\": 250,",
" \"total_paid_amount\": 1750,",
" \"card_last_digits\": \"1234\",",
" \"payment_date_time\": \"2024-03-28T14:45:00Z\"",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/receipt/payment"))
.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(`{
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45:00Z"
}`)
req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/receipt/payment", 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/payment");
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(@"{
""logo"": ""https://example.com/logo.png"",
""customer_full_name"": ""John Doe"",
""customer_first_name"": ""John"",
""customer_contact_number"": ""+1234567890"",
""customer_email"": ""jane.smith@example.com"",
""receipt_date_time"": ""2024-03-28T14:30:00Z"",
""receipt_id"": ""REC12345"",
""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,
""delivery_base_amount"": 2000,
""discount_voucher_percentage"": 30,
""discount_voucher_amount"": 500,
""gst_amount"": 250,
""total_paid_amount"": 1750,
""card_last_digits"": ""1234"",
""payment_date_time"": ""2024-03-28T14:45:00Z""
}", 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
URL of the company logo to be included in the receipt.
string
required
Full name of the customer.
string
required
First name of the customer.
string
required
Contact number of the customer.
string
required
Email address of the customer where the receipt will be sent.
string
required
Date and time when the receipt was generated (ISO 8601 format).
string
required
Unique identifier for the receipt.
string
required
Type of delivery (e.g., ‘Express’, ‘Standard’).
string
required
Address where the item was picked up from.
string
required
Date and time of pickup (ISO 8601 format).
string
required
Address where the item was dropped off.
string
required
Date and time of drop-off (ISO 8601 format).
number
required
Total distance covered for the delivery.
number
required
Base amount for the delivery service.
number
Percentage of discount applied via voucher.
number
Amount of discount applied via voucher.
number
required
GST amount applied to the transaction.
number
required
Total amount paid by the customer.
string
required
Last digits of the payment card used.
string
required
Date and time when the payment was processed (ISO 8601 format).
Response Body
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 payment receipt is generated and sent to the customer’s 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/payment \
-u "YOUR_UUID:YOUR_SECRET" \
-H "X-API-Version: 1.2" \
-H "Content-Type: application/json" \
-d '{
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45:00Z"
}'
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/receipt/payment", {
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({
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45:00Z"
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://qa-payments.mygigsters.com.au/api/v1/receipt/payment",
auth=("YOUR_UUID", "YOUR_SECRET"),
headers={
"X-API-Version": "1.2",
},
json={
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45:00Z",
},
)
print(response.json())
require "net/http"
require "json"
require "uri"
uri = URI("https://qa-payments.mygigsters.com.au/api/v1/receipt/payment")
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
{
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45: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
$ch = curl_init("https://qa-payments.mygigsters.com.au/api/v1/receipt/payment");
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'
{
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45:00Z"
}
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",
"{",
" \"logo\": \"https://example.com/logo.png\",",
" \"customer_full_name\": \"John Doe\",",
" \"customer_first_name\": \"John\",",
" \"customer_contact_number\": \"+1234567890\",",
" \"customer_email\": \"jane.smith@example.com\",",
" \"receipt_date_time\": \"2024-03-28T14:30:00Z\",",
" \"receipt_id\": \"REC12345\",",
" \"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,",
" \"delivery_base_amount\": 2000,",
" \"discount_voucher_percentage\": 30,",
" \"discount_voucher_amount\": 500,",
" \"gst_amount\": 250,",
" \"total_paid_amount\": 1750,",
" \"card_last_digits\": \"1234\",",
" \"payment_date_time\": \"2024-03-28T14:45:00Z\"",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/receipt/payment"))
.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(`{
"logo": "https://example.com/logo.png",
"customer_full_name": "John Doe",
"customer_first_name": "John",
"customer_contact_number": "+1234567890",
"customer_email": "jane.smith@example.com",
"receipt_date_time": "2024-03-28T14:30:00Z",
"receipt_id": "REC12345",
"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,
"delivery_base_amount": 2000,
"discount_voucher_percentage": 30,
"discount_voucher_amount": 500,
"gst_amount": 250,
"total_paid_amount": 1750,
"card_last_digits": "1234",
"payment_date_time": "2024-03-28T14:45:00Z"
}`)
req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/receipt/payment", 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/payment");
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(@"{
""logo"": ""https://example.com/logo.png"",
""customer_full_name"": ""John Doe"",
""customer_first_name"": ""John"",
""customer_contact_number"": ""+1234567890"",
""customer_email"": ""jane.smith@example.com"",
""receipt_date_time"": ""2024-03-28T14:30:00Z"",
""receipt_id"": ""REC12345"",
""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,
""delivery_base_amount"": 2000,
""discount_voucher_percentage"": 30,
""discount_voucher_amount"": 500,
""gst_amount"": 250,
""total_paid_amount"": 1750,
""card_last_digits"": ""1234"",
""payment_date_time"": ""2024-03-28T14:45:00Z""
}", 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?
