Create a refund
curl --request POST \
--url https://uat-secure.float.co.za/api/refunds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"checkout_id": {},
"amount": 123
}
'import requests
url = "https://uat-secure.float.co.za/api/refunds"
payload = {
"checkout_id": {},
"amount": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({checkout_id: {}, amount: 123})
};
fetch('https://uat-secure.float.co.za/api/refunds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://uat-secure.float.co.za/api/refunds",
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([
'checkout_id' => [
],
'amount' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://uat-secure.float.co.za/api/refunds"
payload := strings.NewReader("{\n \"checkout_id\": {},\n \"amount\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://uat-secure.float.co.za/api/refunds")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"checkout_id\": {},\n \"amount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://uat-secure.float.co.za/api/refunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"checkout_id\": {},\n \"amount\": 123\n}"
response = http.request(request)
puts response.read_body{
"data.id": {},
"data.attributes.status": "<string>"
}Refunds
Create a refund
POST /api/refunds β request a full or partial refund for a checkout.
POST
/
api
/
refunds
Create a refund
curl --request POST \
--url https://uat-secure.float.co.za/api/refunds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"checkout_id": {},
"amount": 123
}
'import requests
url = "https://uat-secure.float.co.za/api/refunds"
payload = {
"checkout_id": {},
"amount": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({checkout_id: {}, amount: 123})
};
fetch('https://uat-secure.float.co.za/api/refunds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://uat-secure.float.co.za/api/refunds",
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([
'checkout_id' => [
],
'amount' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://uat-secure.float.co.za/api/refunds"
payload := strings.NewReader("{\n \"checkout_id\": {},\n \"amount\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://uat-secure.float.co.za/api/refunds")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"checkout_id\": {},\n \"amount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://uat-secure.float.co.za/api/refunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"checkout_id\": {},\n \"amount\": 123\n}"
response = http.request(request)
puts response.read_body{
"data.id": {},
"data.attributes.status": "<string>"
}Creates an asynchronous refund request against a successful checkout. See the refunds guide for the lifecycle and constraints.
Rate limited to 1 request per second.
Request
Headers:Authorization: Bearer <client_secret>, Content-Type: application/json, and X-Signature (request signing).
The ID of the checkout to refund β the
data.id from create checkout.Amount to refund, in cents. Up to the checkout amount minus any previously refunded amounts. Partial refunds are supported; issue several if needed.
Example
curl -X POST https://uat-secure.float.co.za/api/refunds \
-H "Authorization: Bearer $FLOAT_CLIENT_SECRET" \
-H "Content-Type: application/json" \
-H "X-Signature: $SIGNATURE" \
-d '{
"checkout_id": "9b2f61c4-6c1e-4b7a-9a1d-3f2a8c0de111",
"amount": 100000
}'
Response
200
{
"data": {
"id": "5d1a7c9e-2222-4444-8888-aa11bb22cc33",
"type": "refund_requests",
"attributes": {
"amount": 100000,
"currency": "ZAR",
"status": "requested",
"created_at": "2026-07-17T11:00:00Z"
}
}
}
The refund request ID β persist it and poll get refund to track completion.
Starts at
requested; progresses through pending to complete (or failed). See the refund lifecycle.Errors
| HTTP | When | Example detail |
|---|---|---|
400 | Signature mismatch | Request signature does not match... |
401 | Bad Bearer token | |
404 | Unknown checkout_id | |
422 | Outside the 100-day refund window | Orders can only be refunded within 100 days of the purchase date. |
422 | Same-day refund on an auto-refund integration | Order can't be refunded on the day of purchase. |
422 | Amount exceeds the refundable remainder | |
429 | More than 1 request per second |
βI