cURL
curl --request POST \
--url https://api-sandbox.paychoice.com.au/api/v5/Refund \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1,
"charge_id": "<string>",
"reference": "<string>",
"merchant_guid": "<string>",
"meta_data_reference": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 1,
charge_id: '<string>',
reference: '<string>',
merchant_guid: '<string>',
meta_data_reference: '<string>'
})
};
fetch('https://api-sandbox.paychoice.com.au/api/v5/Refund', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-sandbox.paychoice.com.au/api/v5/Refund"
payload = {
"amount": 1,
"charge_id": "<string>",
"reference": "<string>",
"merchant_guid": "<string>",
"meta_data_reference": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api-sandbox.paychoice.com.au/api/v5/Refund");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Basic <encoded-value>");
request.AddJsonBody("{\n \"amount\": 1,\n \"charge_id\": \"<string>\",\n \"reference\": \"<string>\",\n \"merchant_guid\": \"<string>\",\n \"meta_data_reference\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.paychoice.com.au/api/v5/Refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 1,
'charge_id' => '<string>',
'reference' => '<string>',
'merchant_guid' => '<string>',
'meta_data_reference' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"refund": {
"id": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"reference": "REFUND-INV-4325454",
"amount": 10.0,
"status": "Approved",
"status_code": 0,
"error": "Transaction Approved",
"error_code": "00",
"created": "2026-11-04T03:02:11.402Z",
"merchantguid": "315564b9-b863-4016-8c53-02c9d8cc80b7",
"aggregator_reference": "123456789013",
"meta_data_reference": null,
"link": { "href": "/api/v5/refund/a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d", "rel": "self" }
},
"object_type": "refund",
"from_item": 0,
"to_item": 0,
"total_count": 0
}
Refunds and pre-authorisations
Refund a charge
POST
/
api
/
v5
/
Refund
cURL
curl --request POST \
--url https://api-sandbox.paychoice.com.au/api/v5/Refund \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1,
"charge_id": "<string>",
"reference": "<string>",
"merchant_guid": "<string>",
"meta_data_reference": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 1,
charge_id: '<string>',
reference: '<string>',
merchant_guid: '<string>',
meta_data_reference: '<string>'
})
};
fetch('https://api-sandbox.paychoice.com.au/api/v5/Refund', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-sandbox.paychoice.com.au/api/v5/Refund"
payload = {
"amount": 1,
"charge_id": "<string>",
"reference": "<string>",
"merchant_guid": "<string>",
"meta_data_reference": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api-sandbox.paychoice.com.au/api/v5/Refund");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Basic <encoded-value>");
request.AddJsonBody("{\n \"amount\": 1,\n \"charge_id\": \"<string>\",\n \"reference\": \"<string>\",\n \"merchant_guid\": \"<string>\",\n \"meta_data_reference\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.paychoice.com.au/api/v5/Refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 1,
'charge_id' => '<string>',
'reference' => '<string>',
'merchant_guid' => '<string>',
'meta_data_reference' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"refund": {
"id": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"reference": "REFUND-INV-4325454",
"amount": 10.0,
"status": "Approved",
"status_code": 0,
"error": "Transaction Approved",
"error_code": "00",
"created": "2026-11-04T03:02:11.402Z",
"merchantguid": "315564b9-b863-4016-8c53-02c9d8cc80b7",
"aggregator_reference": "123456789013",
"meta_data_reference": null,
"link": { "href": "/api/v5/refund/a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d", "rel": "self" }
},
"object_type": "refund",
"from_item": 0,
"to_item": 0,
"total_count": 0
}
Refunds all or part of an approved charge, identified by its charge ID. The refund is in the original charge’s currency. A refund also triggers a webhook notification with
object_type: "refund".
{
"refund": {
"id": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"reference": "REFUND-INV-4325454",
"amount": 10.0,
"status": "Approved",
"status_code": 0,
"error": "Transaction Approved",
"error_code": "00",
"created": "2026-11-04T03:02:11.402Z",
"merchantguid": "315564b9-b863-4016-8c53-02c9d8cc80b7",
"aggregator_reference": "123456789013",
"meta_data_reference": null,
"link": { "href": "/api/v5/refund/a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d", "rel": "self" }
},
"object_type": "refund",
"from_item": 0,
"to_item": 0,
"total_count": 0
}
uuid
The refund ID.
number
Amount refunded.
integer
0 Approved, 4 Blocked, 5 Dishonoured, 6 Errored, 9 Processing.Authorizations
Basic Authorization header using the Bearer scheme.
Body
application/jsontext/jsonapplication/*+json
Response
200
OK

