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

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

### Headers

**X-API-Version** `string` *required* (default: 1.2)

The API version to use. Supported versions are `1.1` and `1.2`.

### Request Body Parameters

**logo** `string` *required*

URL of the company logo to be included in the receipt.

**customer\_full\_name** `string` *required*

Full name of the customer.

**customer\_first\_name** `string` *required*

First name of the customer.

**customer\_contact\_number** `string` *required*

Contact number of the customer.

**customer\_email** `string` *required*

Email address of the customer where the receipt will be sent.

**receipt\_date\_time** `string` *required*

Date and time when the receipt was generated (ISO 8601 format).

**receipt\_id** `string` *required*

Unique identifier for the receipt.

**delivery\_type** `string` *required*

Type of delivery (e.g., 'Express', 'Standard').

**pick\_up\_address** `string` *required*

Address where the item was picked up from.

**pick\_up\_date\_time** `string` *required*

Date and time of pickup (ISO 8601 format).

**drop\_off\_address** `string` *required*

Address where the item was dropped off.

**drop\_off\_date\_time** `string` *required*

Date and time of drop-off (ISO 8601 format).

**total\_distance** `number` *required*

Total distance covered for the delivery.

**delivery\_base\_amount** `number` *required*

Base amount for the delivery service.

**discount\_voucher\_percentage** `number`

Percentage of discount applied via voucher.

**discount\_voucher\_amount** `number`

Amount of discount applied via voucher.

**gst\_amount** `number` *required*

GST amount applied to the transaction.

**total\_paid\_amount** `number` *required*

Total amount paid by the customer.

**card\_last\_digits** `string` *required*

Last digits of the payment card used.

**payment\_date\_time** `string` *required*

Date and time when the payment was processed (ISO 8601 format).

### Response Body

**status** `number`

Indicates the status code of the response.

**message** `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. |

```bash cURL theme={null}
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"
}'
```

```javascript Node.js theme={null}
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);
```

```python Python theme={null}
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())
```

```ruby Ruby theme={null}
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 PHP theme={null}
<?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));
```

```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",
            "{",
            "  \"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());
    }
}
```

```go Go theme={null}
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))
}
```

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

```json 200 theme={null}
{
  "status": 200,
  "message": "Receipt sent successfully"
}
```


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