curl -X POST https://qa-payments.mygigsters.com.au/api/v1/customer/refund \
-u "YOUR_UUID:YOUR_SECRET" \
-H "idempotency-Key: f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7" \
-H "X-API-Version: 1.2" \
-H "Content-Type: application/json" \
-d '{
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7"
}'
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/customer/refund", {
method: "POST",
headers: {
Authorization: "Basic " + Buffer.from("YOUR_UUID:YOUR_SECRET").toString("base64"),
"idempotency-Key": "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7",
"X-API-Version": "1.2",
"Content-Type": "application/json",
},
body: JSON.stringify({
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7"
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://qa-payments.mygigsters.com.au/api/v1/customer/refund",
auth=("YOUR_UUID", "YOUR_SECRET"),
headers={
"idempotency-Key": "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7",
"X-API-Version": "1.2",
},
json={
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7",
},
)
print(response.json())
require "net/http"
require "json"
require "uri"
uri = URI("https://qa-payments.mygigsters.com.au/api/v1/customer/refund")
request = Net::HTTP::Post.new(uri)
request.basic_auth("YOUR_UUID", "YOUR_SECRET")
request["idempotency-Key"] = "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7"
request["X-API-Version"] = "1.2"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7"
}
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/customer/refund");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_USERPWD => "YOUR_UUID:YOUR_SECRET",
CURLOPT_HTTPHEADER => [
"idempotency-Key: f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7",
"X-API-Version: 1.2",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7"
}
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",
"{",
" \"amount\": 50,",
" \"currency\": \"AUD\",",
" \"payment_intent_id\": \"int_hkdmn5lcqh5eo1jfsg7\"",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/customer/refund"))
.header("Authorization", "Basic " + credentials)
.header("idempotency-Key", "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7")
.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(`{
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7"
}`)
req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/customer/refund", body)
if err != nil {
panic(err)
}
req.SetBasicAuth("YOUR_UUID", "YOUR_SECRET")
req.Header.Set("idempotency-Key", "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7")
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/customer/refund");
request.Headers.Authorization = new AuthenticationHeaderValue(
"Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes("YOUR_UUID:YOUR_SECRET")));
request.Headers.Add("idempotency-Key", "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7");
request.Headers.Add("X-API-Version", "1.2");
request.Content = new StringContent(@"{
""amount"": 50,
""currency"": ""AUD"",
""payment_intent_id"": ""int_hkdmn5lcqh5eo1jfsg7""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"status": 200,
"message": "Refund initiated successfully",
"refund_status": "RECEIVED",
"refund_id": "rfd_hkdmngfmqh5w5s87hdp_1jfsg7"
}
Payments
Create refund
The Refund Customer endpoint is used to initiate a refund for a customer.
POST
/
customer
/
refund
curl -X POST https://qa-payments.mygigsters.com.au/api/v1/customer/refund \
-u "YOUR_UUID:YOUR_SECRET" \
-H "idempotency-Key: f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7" \
-H "X-API-Version: 1.2" \
-H "Content-Type: application/json" \
-d '{
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7"
}'
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/customer/refund", {
method: "POST",
headers: {
Authorization: "Basic " + Buffer.from("YOUR_UUID:YOUR_SECRET").toString("base64"),
"idempotency-Key": "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7",
"X-API-Version": "1.2",
"Content-Type": "application/json",
},
body: JSON.stringify({
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7"
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://qa-payments.mygigsters.com.au/api/v1/customer/refund",
auth=("YOUR_UUID", "YOUR_SECRET"),
headers={
"idempotency-Key": "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7",
"X-API-Version": "1.2",
},
json={
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7",
},
)
print(response.json())
require "net/http"
require "json"
require "uri"
uri = URI("https://qa-payments.mygigsters.com.au/api/v1/customer/refund")
request = Net::HTTP::Post.new(uri)
request.basic_auth("YOUR_UUID", "YOUR_SECRET")
request["idempotency-Key"] = "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7"
request["X-API-Version"] = "1.2"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7"
}
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/customer/refund");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_USERPWD => "YOUR_UUID:YOUR_SECRET",
CURLOPT_HTTPHEADER => [
"idempotency-Key: f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7",
"X-API-Version: 1.2",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7"
}
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",
"{",
" \"amount\": 50,",
" \"currency\": \"AUD\",",
" \"payment_intent_id\": \"int_hkdmn5lcqh5eo1jfsg7\"",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/customer/refund"))
.header("Authorization", "Basic " + credentials)
.header("idempotency-Key", "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7")
.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(`{
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7"
}`)
req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/customer/refund", body)
if err != nil {
panic(err)
}
req.SetBasicAuth("YOUR_UUID", "YOUR_SECRET")
req.Header.Set("idempotency-Key", "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7")
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/customer/refund");
request.Headers.Authorization = new AuthenticationHeaderValue(
"Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes("YOUR_UUID:YOUR_SECRET")));
request.Headers.Add("idempotency-Key", "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7");
request.Headers.Add("X-API-Version", "1.2");
request.Content = new StringContent(@"{
""amount"": 50,
""currency"": ""AUD"",
""payment_intent_id"": ""int_hkdmn5lcqh5eo1jfsg7""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"status": 200,
"message": "Refund initiated successfully",
"refund_status": "RECEIVED",
"refund_id": "rfd_hkdmngfmqh5w5s87hdp_1jfsg7"
}
Headers
string
default:"1.2"
required
The API version to use. Supported versions are
1.1 and 1.2.Headers
string
required
A unique UUID string used to prevent duplicate operations.
Request Body Parameters
number
required
The amount to be refunded in decimal dollars (e.g. 50.00). Do not pass cents.
string
required
The currency of the payment.
string
required
The ID of the payment intent associated with the refund.
Response Body
number
The HTTP status code of the response.
string
Provides information about the refund initiation result.
string
The current status of the refund request (e.g., “RECEIVED”, “PROCESSING”, “COMPLETED”).
string
The unique identifier for the refund transaction.
Response Codes
| Code | Description |
|---|---|
| 200 | If the request is successful, the refund is initiated and the response includes the refund details and status. |
| 400 | Bad Request. Missing required parameters (returns ‘amount is required, payment_intent_id is required’) or invalid amount format. |
| 401 | Unauthorized. Missing or invalid credentials. |
| 404 | Not Found. The specified payment intent does not exist. |
| 409 | Conflict. Duplicate idempotency key with mismatching parameters or refund already requested. |
| 500 | Internal Server Error. |
curl -X POST https://qa-payments.mygigsters.com.au/api/v1/customer/refund \
-u "YOUR_UUID:YOUR_SECRET" \
-H "idempotency-Key: f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7" \
-H "X-API-Version: 1.2" \
-H "Content-Type: application/json" \
-d '{
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7"
}'
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/customer/refund", {
method: "POST",
headers: {
Authorization: "Basic " + Buffer.from("YOUR_UUID:YOUR_SECRET").toString("base64"),
"idempotency-Key": "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7",
"X-API-Version": "1.2",
"Content-Type": "application/json",
},
body: JSON.stringify({
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7"
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://qa-payments.mygigsters.com.au/api/v1/customer/refund",
auth=("YOUR_UUID", "YOUR_SECRET"),
headers={
"idempotency-Key": "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7",
"X-API-Version": "1.2",
},
json={
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7",
},
)
print(response.json())
require "net/http"
require "json"
require "uri"
uri = URI("https://qa-payments.mygigsters.com.au/api/v1/customer/refund")
request = Net::HTTP::Post.new(uri)
request.basic_auth("YOUR_UUID", "YOUR_SECRET")
request["idempotency-Key"] = "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7"
request["X-API-Version"] = "1.2"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7"
}
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/customer/refund");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_USERPWD => "YOUR_UUID:YOUR_SECRET",
CURLOPT_HTTPHEADER => [
"idempotency-Key: f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7",
"X-API-Version: 1.2",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7"
}
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",
"{",
" \"amount\": 50,",
" \"currency\": \"AUD\",",
" \"payment_intent_id\": \"int_hkdmn5lcqh5eo1jfsg7\"",
"}"
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/customer/refund"))
.header("Authorization", "Basic " + credentials)
.header("idempotency-Key", "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7")
.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(`{
"amount": 50,
"currency": "AUD",
"payment_intent_id": "int_hkdmn5lcqh5eo1jfsg7"
}`)
req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/customer/refund", body)
if err != nil {
panic(err)
}
req.SetBasicAuth("YOUR_UUID", "YOUR_SECRET")
req.Header.Set("idempotency-Key", "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7")
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/customer/refund");
request.Headers.Authorization = new AuthenticationHeaderValue(
"Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes("YOUR_UUID:YOUR_SECRET")));
request.Headers.Add("idempotency-Key", "f92cd86b-a25e-4c7b-b0b2-eb9c537da4b7");
request.Headers.Add("X-API-Version", "1.2");
request.Content = new StringContent(@"{
""amount"": 50,
""currency"": ""AUD"",
""payment_intent_id"": ""int_hkdmn5lcqh5eo1jfsg7""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
"status": 200,
"message": "Refund initiated successfully",
"refund_status": "RECEIVED",
"refund_id": "rfd_hkdmngfmqh5w5s87hdp_1jfsg7"
}
Last modified on November 10, 2026
Was this page helpful?
