Create Refund
curl --request POST \
--url https://api-stg.pandablue.com/v3/refunds \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--header 'X-Date: <x-date>' \
--header 'X-Login: <x-login>' \
--data '
{
"deposit_id": 123,
"invoice_id": "<string>",
"amount": 123,
"comments": "<string>",
"notification_url": "<string>"
}
'import requests
url = "https://api-stg.pandablue.com/v3/refunds"
payload = {
"deposit_id": 123,
"invoice_id": "<string>",
"amount": 123,
"comments": "<string>",
"notification_url": "<string>"
}
headers = {
"Content-Type": "<content-type>",
"X-Date": "<x-date>",
"X-Login": "<x-login>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Content-Type': '<content-type>',
'X-Date': '<x-date>',
'X-Login': '<x-login>',
Authorization: '<authorization>'
},
body: JSON.stringify({
deposit_id: 123,
invoice_id: '<string>',
amount: 123,
comments: '<string>',
notification_url: '<string>'
})
};
fetch('https://api-stg.pandablue.com/v3/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://api-stg.pandablue.com/v3/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([
'deposit_id' => 123,
'invoice_id' => '<string>',
'amount' => 123,
'comments' => '<string>',
'notification_url' => '<string>'
]),
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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-stg.pandablue.com/v3/refunds"
payload := strings.NewReader("{\n \"deposit_id\": 123,\n \"invoice_id\": \"<string>\",\n \"amount\": 123,\n \"comments\": \"<string>\",\n \"notification_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api-stg.pandablue.com/v3/refunds")
.header("Content-Type", "<content-type>")
.header("X-Date", "<x-date>")
.header("X-Login", "<x-login>")
.header("Authorization", "<authorization>")
.body("{\n \"deposit_id\": 123,\n \"invoice_id\": \"<string>\",\n \"amount\": 123,\n \"comments\": \"<string>\",\n \"notification_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-stg.pandablue.com/v3/refunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["X-Date"] = '<x-date>'
request["X-Login"] = '<x-login>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"deposit_id\": 123,\n \"invoice_id\": \"<string>\",\n \"amount\": 123,\n \"comments\": \"<string>\",\n \"notification_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"refund_id": "<string>",
"deposit_id": 123,
"merchant_invoice_id": "<string>",
"refund_info": {
"type": "<string>",
"result": "SUCCESS",
"reason": "<string>",
"reason_code": "<string>",
"payment_method": "<string>",
"payment_method_name": "<string>",
"amount": 123,
"currency": "<string>",
"created_at": "<string>"
}
}{
"code": 123,
"description": "<string>",
"type": "<string>"
}{
"code": 123,
"description": "<string>",
"type": "<string>"
}{
"code": 123,
"description": "<string>",
"type": "<string>"
}Manage refunds
Create refund
Allows for the creation of a full or partial refund for a previously completed deposit.
- For credit card deposits, the refund is processed to the same card, requiring only deposit identification.
- For other payment methods, beneficiary bank account details are necessary.
- Multiple partial refunds can be issued for a single deposit, provided the total refunded amount does not exceed the original deposit amount.
POST
/
v3
/
refunds
Create Refund
curl --request POST \
--url https://api-stg.pandablue.com/v3/refunds \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--header 'X-Date: <x-date>' \
--header 'X-Login: <x-login>' \
--data '
{
"deposit_id": 123,
"invoice_id": "<string>",
"amount": 123,
"comments": "<string>",
"notification_url": "<string>"
}
'import requests
url = "https://api-stg.pandablue.com/v3/refunds"
payload = {
"deposit_id": 123,
"invoice_id": "<string>",
"amount": 123,
"comments": "<string>",
"notification_url": "<string>"
}
headers = {
"Content-Type": "<content-type>",
"X-Date": "<x-date>",
"X-Login": "<x-login>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Content-Type': '<content-type>',
'X-Date': '<x-date>',
'X-Login': '<x-login>',
Authorization: '<authorization>'
},
body: JSON.stringify({
deposit_id: 123,
invoice_id: '<string>',
amount: 123,
comments: '<string>',
notification_url: '<string>'
})
};
fetch('https://api-stg.pandablue.com/v3/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://api-stg.pandablue.com/v3/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([
'deposit_id' => 123,
'invoice_id' => '<string>',
'amount' => 123,
'comments' => '<string>',
'notification_url' => '<string>'
]),
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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-stg.pandablue.com/v3/refunds"
payload := strings.NewReader("{\n \"deposit_id\": 123,\n \"invoice_id\": \"<string>\",\n \"amount\": 123,\n \"comments\": \"<string>\",\n \"notification_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api-stg.pandablue.com/v3/refunds")
.header("Content-Type", "<content-type>")
.header("X-Date", "<x-date>")
.header("X-Login", "<x-login>")
.header("Authorization", "<authorization>")
.body("{\n \"deposit_id\": 123,\n \"invoice_id\": \"<string>\",\n \"amount\": 123,\n \"comments\": \"<string>\",\n \"notification_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-stg.pandablue.com/v3/refunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["X-Date"] = '<x-date>'
request["X-Login"] = '<x-login>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"deposit_id\": 123,\n \"invoice_id\": \"<string>\",\n \"amount\": 123,\n \"comments\": \"<string>\",\n \"notification_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"refund_id": "<string>",
"deposit_id": 123,
"merchant_invoice_id": "<string>",
"refund_info": {
"type": "<string>",
"result": "SUCCESS",
"reason": "<string>",
"reason_code": "<string>",
"payment_method": "<string>",
"payment_method_name": "<string>",
"amount": 123,
"currency": "<string>",
"created_at": "<string>"
}
}{
"code": 123,
"description": "<string>",
"type": "<string>"
}{
"code": 123,
"description": "<string>",
"type": "<string>"
}{
"code": 123,
"description": "<string>",
"type": "<string>"
}Create Refund
Allows for the creation of a full or partial refund for a previously completed deposit.
- For credit card deposits, the refund is processed to the same card, requiring only deposit identification.
- For other payment methods, beneficiary bank account details are necessary.\
Headers
Body
application/json
Details for the refund request.
Response
Refund request accepted and processing initiated, or completed synchronously (for some credit card refunds). The response structure might be more detailed for synchronously processed credit card refunds.