Retrieve Refund Status
curl --request GET \
--url https://api-stg.pandablue.com/v3/refunds/{refund_id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--header 'X-Date: <x-date>' \
--header 'X-Login: <x-login>'import requests
url = "https://api-stg.pandablue.com/v3/refunds/{refund_id}"
headers = {
"Content-Type": "<content-type>",
"X-Date": "<x-date>",
"X-Login": "<x-login>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'Content-Type': '<content-type>',
'X-Date': '<x-date>',
'X-Login': '<x-login>',
Authorization: '<authorization>'
}
};
fetch('https://api-stg.pandablue.com/v3/refunds/{refund_id}', 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://api-stg.pandablue.com/v3/refunds/{refund_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>",
"X-Date: <x-date>",
"X-Login: <x-login>"
],
]);
$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://api-stg.pandablue.com/v3/refunds/{refund_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-Date", "<x-date>")
req.Header.Add("X-Login", "<x-login>")
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-stg.pandablue.com/v3/refunds/{refund_id}")
.header("Content-Type", "<content-type>")
.header("X-Date", "<x-date>")
.header("X-Login", "<x-login>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-stg.pandablue.com/v3/refunds/{refund_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["X-Date"] = '<x-date>'
request["X-Login"] = '<x-login>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"deposit_id": 123,
"merchant_invoice_id": "<string>",
"status": "PENDING",
"amount": 123,
"voucher": "aSDinaTvuI8gbWludGxpZnk="
}{
"code": 123,
"description": "<string>"
}{
"code": 123,
"description": "<string>",
"type": "<string>"
}Manage refunds
Get refund status
Retrieve the status of a previously created refund. You can trigger the check of the status of a refund at any moment you consider pertinent. However, every time a refund changes its status, we will send you a notification containing the ID of the refund so that you can check its status back to retrieve the new refund’s status.
Regarding the Authorization value, since the body of the requests will be empty, you should use an empty ("") string or nothing as the jsonPayload field for generating the signature.
GET
/
refunds
/
{refund_id}
Retrieve Refund Status
curl --request GET \
--url https://api-stg.pandablue.com/v3/refunds/{refund_id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--header 'X-Date: <x-date>' \
--header 'X-Login: <x-login>'import requests
url = "https://api-stg.pandablue.com/v3/refunds/{refund_id}"
headers = {
"Content-Type": "<content-type>",
"X-Date": "<x-date>",
"X-Login": "<x-login>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'Content-Type': '<content-type>',
'X-Date': '<x-date>',
'X-Login': '<x-login>',
Authorization: '<authorization>'
}
};
fetch('https://api-stg.pandablue.com/v3/refunds/{refund_id}', 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://api-stg.pandablue.com/v3/refunds/{refund_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>",
"X-Date: <x-date>",
"X-Login: <x-login>"
],
]);
$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://api-stg.pandablue.com/v3/refunds/{refund_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-Date", "<x-date>")
req.Header.Add("X-Login", "<x-login>")
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-stg.pandablue.com/v3/refunds/{refund_id}")
.header("Content-Type", "<content-type>")
.header("X-Date", "<x-date>")
.header("X-Login", "<x-login>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-stg.pandablue.com/v3/refunds/{refund_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["X-Date"] = '<x-date>'
request["X-Login"] = '<x-login>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"deposit_id": 123,
"merchant_invoice_id": "<string>",
"status": "PENDING",
"amount": 123,
"voucher": "aSDinaTvuI8gbWludGxpZnk="
}{
"code": 123,
"description": "<string>"
}{
"code": 123,
"description": "<string>",
"type": "<string>"
}Retrieve Refund Status
Retrieve the status of a previously created refund.
You can trigger the check of the status of a refund at any moment you consider pertinent.
However, every time a refund changes its status, we will send you a notification containing
the ID of the refund so that you can check its status back to retrieve the new refund’s status.
Regarding the Authorization value, since the body of the requests will be empty, you should use \
Headers
Query Parameters
Response
Refund status successfully retrieved.
Details of the refund status. The API may add more fields to this response object in the future; integrations should be tolerant of new fields.
Status of the refund. Possible values:
PENDING: The refund request has been created and is awaiting processing.DELIVERED: The refund has been sent for processing.COMPLETED: The refund has been successfully processed.INCORRECT_DETAILS: More information is needed, or details were incorrect.REJECTED: The refund was rejected (e.g., by the bank).CANCELLED: The refund was manually cancelled (only possible in PENDING or INCORRECT_DETAILS).
Available options:
PENDING, DELIVERED, COMPLETED, INCORRECT_DETAILS, REJECTED, CANCELLED