Refund an order
curl --request POST \
--url https://billing.funnelfox.com/{org_id}/v1/payment/refund \
--header 'Content-Type: application/json' \
--header 'ff-secret-key: <api-key>' \
--data '
{
"external_id": "<string>",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "",
"comment": "",
"amount": 123,
"soft_refund": false
}
'import requests
url = "https://billing.funnelfox.com/{org_id}/v1/payment/refund"
payload = {
"external_id": "<string>",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "",
"comment": "",
"amount": 123,
"soft_refund": False
}
headers = {
"ff-secret-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'ff-secret-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: '<string>',
order_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
reason: '',
comment: '',
amount: 123,
soft_refund: false
})
};
fetch('https://billing.funnelfox.com/{org_id}/v1/payment/refund', 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://billing.funnelfox.com/{org_id}/v1/payment/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([
'external_id' => '<string>',
'order_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'reason' => '',
'comment' => '',
'amount' => 123,
'soft_refund' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"ff-secret-key: <api-key>"
],
]);
$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://billing.funnelfox.com/{org_id}/v1/payment/refund"
payload := strings.NewReader("{\n \"external_id\": \"<string>\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reason\": \"\",\n \"comment\": \"\",\n \"amount\": 123,\n \"soft_refund\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ff-secret-key", "<api-key>")
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://billing.funnelfox.com/{org_id}/v1/payment/refund")
.header("ff-secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"<string>\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reason\": \"\",\n \"comment\": \"\",\n \"amount\": 123,\n \"soft_refund\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.funnelfox.com/{org_id}/v1/payment/refund")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ff-secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_id\": \"<string>\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reason\": \"\",\n \"comment\": \"\",\n \"amount\": 123,\n \"soft_refund\": false\n}"
response = http.request(request)
puts response.read_body{}Payment management
Refund an order
Initiates a refund for a completed order.
POST
/
payment
/
refund
Refund an order
curl --request POST \
--url https://billing.funnelfox.com/{org_id}/v1/payment/refund \
--header 'Content-Type: application/json' \
--header 'ff-secret-key: <api-key>' \
--data '
{
"external_id": "<string>",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "",
"comment": "",
"amount": 123,
"soft_refund": false
}
'import requests
url = "https://billing.funnelfox.com/{org_id}/v1/payment/refund"
payload = {
"external_id": "<string>",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "",
"comment": "",
"amount": 123,
"soft_refund": False
}
headers = {
"ff-secret-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'ff-secret-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: '<string>',
order_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
reason: '',
comment: '',
amount: 123,
soft_refund: false
})
};
fetch('https://billing.funnelfox.com/{org_id}/v1/payment/refund', 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://billing.funnelfox.com/{org_id}/v1/payment/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([
'external_id' => '<string>',
'order_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'reason' => '',
'comment' => '',
'amount' => 123,
'soft_refund' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"ff-secret-key: <api-key>"
],
]);
$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://billing.funnelfox.com/{org_id}/v1/payment/refund"
payload := strings.NewReader("{\n \"external_id\": \"<string>\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reason\": \"\",\n \"comment\": \"\",\n \"amount\": 123,\n \"soft_refund\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ff-secret-key", "<api-key>")
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://billing.funnelfox.com/{org_id}/v1/payment/refund")
.header("ff-secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"<string>\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reason\": \"\",\n \"comment\": \"\",\n \"amount\": 123,\n \"soft_refund\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.funnelfox.com/{org_id}/v1/payment/refund")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ff-secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_id\": \"<string>\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reason\": \"\",\n \"comment\": \"\",\n \"amount\": 123,\n \"soft_refund\": false\n}"
response = http.request(request)
puts response.read_body{}Authorizations
Secret key for FunnelFox Billing API. Required for all requests.
Path Parameters
Organization ID
Body
application/json
Your unique identifier for the user
Maximum string length:
256Order ID (can include multiple transactions, fallbacks, and refunds)
Short reason code (e.g., "duplicate_payment", "unauthorized_charge")
Maximum string length:
256Human-readable comment or reference (e.g., support ticket link)
Maximum string length:
2048Refund amount (omit for full refund)
Keep subscription active (true) or cancel it (false)
Response
200 - application/json
The response is of type Ok200 · object.
Was this page helpful?
⌘I
