List refunds
curl --request GET \
--url https://us.api.flexprice.io/v1/refunds \
--header 'x-api-key: <api-key>'import requests
url = "https://us.api.flexprice.io/v1/refunds"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://us.api.flexprice.io/v1/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://us.api.flexprice.io/v1/refunds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-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"
"net/http"
"io"
)
func main() {
url := "https://us.api.flexprice.io/v1/refunds"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://us.api.flexprice.io/v1/refunds")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.api.flexprice.io/v1/refunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"amount": "<string>",
"attempt": 123,
"cancelled_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"credit_note_id": "<string>",
"currency": "<string>",
"environment_id": "<string>",
"failed_at": "2023-11-07T05:31:56Z",
"failure_reason": "<string>",
"gateway_idempotency_token": "<string>",
"gateway_metadata": {},
"gateway_refund_id": "<string>",
"gateway_tracking_id": "<string>",
"id": "<string>",
"idempotency_key": "<string>",
"initiated_at": "2023-11-07T05:31:56Z",
"invoice_id": "<string>",
"metadata": {},
"payment_gateway": "<string>",
"payment_id": "<string>",
"refund_destination": "GATEWAY",
"refund_destination_id": "<string>",
"refund_reason": "DUPLICATE",
"refund_status": "PENDING",
"settled_amount": "<string>",
"status": "published",
"succeeded_at": "2023-11-07T05:31:56Z",
"tenant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Refunds
List refunds
Use to see where refunded money actually went and whether it has settled. Filter by invoice_ids to get every settlement row for one invoice.
GET
/
refunds
List refunds
curl --request GET \
--url https://us.api.flexprice.io/v1/refunds \
--header 'x-api-key: <api-key>'import requests
url = "https://us.api.flexprice.io/v1/refunds"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://us.api.flexprice.io/v1/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://us.api.flexprice.io/v1/refunds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-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"
"net/http"
"io"
)
func main() {
url := "https://us.api.flexprice.io/v1/refunds"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://us.api.flexprice.io/v1/refunds")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.api.flexprice.io/v1/refunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"amount": "<string>",
"attempt": 123,
"cancelled_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"credit_note_id": "<string>",
"currency": "<string>",
"environment_id": "<string>",
"failed_at": "2023-11-07T05:31:56Z",
"failure_reason": "<string>",
"gateway_idempotency_token": "<string>",
"gateway_metadata": {},
"gateway_refund_id": "<string>",
"gateway_tracking_id": "<string>",
"id": "<string>",
"idempotency_key": "<string>",
"initiated_at": "2023-11-07T05:31:56Z",
"invoice_id": "<string>",
"metadata": {},
"payment_gateway": "<string>",
"payment_id": "<string>",
"refund_destination": "GATEWAY",
"refund_destination_id": "<string>",
"refund_reason": "DUPLICATE",
"refund_status": "PENDING",
"settled_amount": "<string>",
"status": "published",
"succeeded_at": "2023-11-07T05:31:56Z",
"tenant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Authorizations
Enter your API key in the format x-api-key <api-key>*
Query Parameters
Filter by invoice IDs
Filter by payment IDs
Filter by credit note IDs
Filter by refund status
Filter by refund destination
Filter by payment gateway
Only refunds that have settled
Limit
Offset

