curl --request POST \
--url https://sandbox.birrpay.io/v2/refunds/list \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"start_time": "2023-11-07T05:31:56Z",
"refund_id": "<string>",
"end_time": "2023-11-07T05:31:56Z",
"payment_id": "<string>",
"limit": 123,
"offset": 123,
"amount_filter": {
"start_amount": 123,
"end_amount": 123
},
"connector": [
"<string>"
],
"connector_id_list": [
"<string>"
],
"currency": [],
"refund_status": []
}
'import requests
url = "https://sandbox.birrpay.io/v2/refunds/list"
payload = {
"start_time": "2023-11-07T05:31:56Z",
"refund_id": "<string>",
"end_time": "2023-11-07T05:31:56Z",
"payment_id": "<string>",
"limit": 123,
"offset": 123,
"amount_filter": {
"start_amount": 123,
"end_amount": 123
},
"connector": ["<string>"],
"connector_id_list": ["<string>"],
"currency": [],
"refund_status": []
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
start_time: '2023-11-07T05:31:56Z',
refund_id: '<string>',
end_time: '2023-11-07T05:31:56Z',
payment_id: '<string>',
limit: 123,
offset: 123,
amount_filter: {start_amount: 123, end_amount: 123},
connector: ['<string>'],
connector_id_list: ['<string>'],
currency: [],
refund_status: []
})
};
fetch('https://sandbox.birrpay.io/v2/refunds/list', 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://sandbox.birrpay.io/v2/refunds/list",
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([
'start_time' => '2023-11-07T05:31:56Z',
'refund_id' => '<string>',
'end_time' => '2023-11-07T05:31:56Z',
'payment_id' => '<string>',
'limit' => 123,
'offset' => 123,
'amount_filter' => [
'start_amount' => 123,
'end_amount' => 123
],
'connector' => [
'<string>'
],
'connector_id_list' => [
'<string>'
],
'currency' => [
],
'refund_status' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://sandbox.birrpay.io/v2/refunds/list"
payload := strings.NewReader("{\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"refund_id\": \"<string>\",\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"payment_id\": \"<string>\",\n \"limit\": 123,\n \"offset\": 123,\n \"amount_filter\": {\n \"start_amount\": 123,\n \"end_amount\": 123\n },\n \"connector\": [\n \"<string>\"\n ],\n \"connector_id_list\": [\n \"<string>\"\n ],\n \"currency\": [],\n \"refund_status\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://sandbox.birrpay.io/v2/refunds/list")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"refund_id\": \"<string>\",\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"payment_id\": \"<string>\",\n \"limit\": 123,\n \"offset\": 123,\n \"amount_filter\": {\n \"start_amount\": 123,\n \"end_amount\": 123\n },\n \"connector\": [\n \"<string>\"\n ],\n \"connector_id_list\": [\n \"<string>\"\n ],\n \"currency\": [],\n \"refund_status\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.birrpay.io/v2/refunds/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"refund_id\": \"<string>\",\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"payment_id\": \"<string>\",\n \"limit\": 123,\n \"offset\": 123,\n \"amount_filter\": {\n \"start_amount\": 123,\n \"end_amount\": 123\n },\n \"connector\": [\n \"<string>\"\n ],\n \"connector_id_list\": [\n \"<string>\"\n ],\n \"currency\": [],\n \"refund_status\": []\n}"
response = http.request(request)
puts response.read_body{
"count": 1,
"total_count": 123,
"data": [
{
"id": "<string>",
"payment_id": "<string>",
"amount": 6540,
"currency": "AED",
"status": "succeeded",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"connector": "authipay",
"profile_id": "<string>",
"merchant_connector_id": "<string>",
"merchant_reference_id": "ref_mbabizu24mvu3mela5njyhpit4",
"reason": "<string>",
"metadata": {},
"error_details": {
"code": "<string>",
"message": "<string>"
},
"connector_refund_reference_id": "<string>",
"raw_connector_response": "<string>"
}
]
}Refunds - List
To list the refunds associated with a payment_id or with the merchant, if payment_id is not provided
curl --request POST \
--url https://sandbox.birrpay.io/v2/refunds/list \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"start_time": "2023-11-07T05:31:56Z",
"refund_id": "<string>",
"end_time": "2023-11-07T05:31:56Z",
"payment_id": "<string>",
"limit": 123,
"offset": 123,
"amount_filter": {
"start_amount": 123,
"end_amount": 123
},
"connector": [
"<string>"
],
"connector_id_list": [
"<string>"
],
"currency": [],
"refund_status": []
}
'import requests
url = "https://sandbox.birrpay.io/v2/refunds/list"
payload = {
"start_time": "2023-11-07T05:31:56Z",
"refund_id": "<string>",
"end_time": "2023-11-07T05:31:56Z",
"payment_id": "<string>",
"limit": 123,
"offset": 123,
"amount_filter": {
"start_amount": 123,
"end_amount": 123
},
"connector": ["<string>"],
"connector_id_list": ["<string>"],
"currency": [],
"refund_status": []
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
start_time: '2023-11-07T05:31:56Z',
refund_id: '<string>',
end_time: '2023-11-07T05:31:56Z',
payment_id: '<string>',
limit: 123,
offset: 123,
amount_filter: {start_amount: 123, end_amount: 123},
connector: ['<string>'],
connector_id_list: ['<string>'],
currency: [],
refund_status: []
})
};
fetch('https://sandbox.birrpay.io/v2/refunds/list', 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://sandbox.birrpay.io/v2/refunds/list",
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([
'start_time' => '2023-11-07T05:31:56Z',
'refund_id' => '<string>',
'end_time' => '2023-11-07T05:31:56Z',
'payment_id' => '<string>',
'limit' => 123,
'offset' => 123,
'amount_filter' => [
'start_amount' => 123,
'end_amount' => 123
],
'connector' => [
'<string>'
],
'connector_id_list' => [
'<string>'
],
'currency' => [
],
'refund_status' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://sandbox.birrpay.io/v2/refunds/list"
payload := strings.NewReader("{\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"refund_id\": \"<string>\",\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"payment_id\": \"<string>\",\n \"limit\": 123,\n \"offset\": 123,\n \"amount_filter\": {\n \"start_amount\": 123,\n \"end_amount\": 123\n },\n \"connector\": [\n \"<string>\"\n ],\n \"connector_id_list\": [\n \"<string>\"\n ],\n \"currency\": [],\n \"refund_status\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://sandbox.birrpay.io/v2/refunds/list")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"refund_id\": \"<string>\",\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"payment_id\": \"<string>\",\n \"limit\": 123,\n \"offset\": 123,\n \"amount_filter\": {\n \"start_amount\": 123,\n \"end_amount\": 123\n },\n \"connector\": [\n \"<string>\"\n ],\n \"connector_id_list\": [\n \"<string>\"\n ],\n \"currency\": [],\n \"refund_status\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.birrpay.io/v2/refunds/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"refund_id\": \"<string>\",\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"payment_id\": \"<string>\",\n \"limit\": 123,\n \"offset\": 123,\n \"amount_filter\": {\n \"start_amount\": 123,\n \"end_amount\": 123\n },\n \"connector\": [\n \"<string>\"\n ],\n \"connector_id_list\": [\n \"<string>\"\n ],\n \"currency\": [],\n \"refund_status\": []\n}"
response = http.request(request)
puts response.read_body{
"count": 1,
"total_count": 123,
"data": [
{
"id": "<string>",
"payment_id": "<string>",
"amount": 6540,
"currency": "AED",
"status": "succeeded",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"connector": "authipay",
"profile_id": "<string>",
"merchant_connector_id": "<string>",
"merchant_reference_id": "ref_mbabizu24mvu3mela5njyhpit4",
"reason": "<string>",
"metadata": {},
"error_details": {
"code": "<string>",
"message": "<string>"
},
"connector_refund_reference_id": "<string>",
"raw_connector_response": "<string>"
}
]
}Authorizations
Format: api-key=<api_key>
Use the API key created under your merchant account from the HyperSwitch dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.
Body
A type representing a range of time for filtering, including a mandatory start time and an optional end time.
The start time to filter payments list or to get list of filters. To get list of filters start time is needed to be passed
The identifier for the refund
The end time to filter payments list or to get list of filters. If not passed the default time is now
The identifier for the payment
Limit on the number of objects to return
The starting point within a list of objects
Show child attributes
Show child attributes
The list of connectors to filter refunds list
The list of merchant connector ids to filter the refunds list for selected label
The list of currencies to filter refunds list
The three-letter ISO 4217 currency code (e.g., "USD", "EUR") for the payment amount. This field is mandatory for creating a payment.
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW, ZWL The list of refund statuses to filter refunds list
The status for refunds
succeeded, failed, pending, review