curl --request POST \
--url https://api-test.paiera.com/v1/refund/create \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"refund_reference_id": "merchant-refund-202609170001",
"payment_reference_id": "merchant-order-202609170001",
"refund_amount": "1.20",
"refund_currency": "USDT",
"refund_reason": "Customer requested a refund",
"metadata": {
"merchant_case_id": "CASE_20260917_001"
},
"notify_url": "https://merchant.example.com/webhooks/paiera",
"redirect_url": "https://merchant.example.com/refund/result",
"cancel_url": "https://merchant.example.com/refund/cancelled"
}
'import requests
url = "https://api-test.paiera.com/v1/refund/create"
payload = {
"refund_reference_id": "merchant-refund-202609170001",
"payment_reference_id": "merchant-order-202609170001",
"refund_amount": "1.20",
"refund_currency": "USDT",
"refund_reason": "Customer requested a refund",
"metadata": { "merchant_case_id": "CASE_20260917_001" },
"notify_url": "https://merchant.example.com/webhooks/paiera",
"redirect_url": "https://merchant.example.com/refund/result",
"cancel_url": "https://merchant.example.com/refund/cancelled"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
refund_reference_id: 'merchant-refund-202609170001',
payment_reference_id: 'merchant-order-202609170001',
refund_amount: '1.20',
refund_currency: 'USDT',
refund_reason: 'Customer requested a refund',
metadata: {merchant_case_id: 'CASE_20260917_001'},
notify_url: 'https://merchant.example.com/webhooks/paiera',
redirect_url: 'https://merchant.example.com/refund/result',
cancel_url: 'https://merchant.example.com/refund/cancelled'
})
};
fetch('https://api-test.paiera.com/v1/refund/create', 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-test.paiera.com/v1/refund/create",
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([
'refund_reference_id' => 'merchant-refund-202609170001',
'payment_reference_id' => 'merchant-order-202609170001',
'refund_amount' => '1.20',
'refund_currency' => 'USDT',
'refund_reason' => 'Customer requested a refund',
'metadata' => [
'merchant_case_id' => 'CASE_20260917_001'
],
'notify_url' => 'https://merchant.example.com/webhooks/paiera',
'redirect_url' => 'https://merchant.example.com/refund/result',
'cancel_url' => 'https://merchant.example.com/refund/cancelled'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://api-test.paiera.com/v1/refund/create"
payload := strings.NewReader("{\n \"refund_reference_id\": \"merchant-refund-202609170001\",\n \"payment_reference_id\": \"merchant-order-202609170001\",\n \"refund_amount\": \"1.20\",\n \"refund_currency\": \"USDT\",\n \"refund_reason\": \"Customer requested a refund\",\n \"metadata\": {\n \"merchant_case_id\": \"CASE_20260917_001\"\n },\n \"notify_url\": \"https://merchant.example.com/webhooks/paiera\",\n \"redirect_url\": \"https://merchant.example.com/refund/result\",\n \"cancel_url\": \"https://merchant.example.com/refund/cancelled\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://api-test.paiera.com/v1/refund/create")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"refund_reference_id\": \"merchant-refund-202609170001\",\n \"payment_reference_id\": \"merchant-order-202609170001\",\n \"refund_amount\": \"1.20\",\n \"refund_currency\": \"USDT\",\n \"refund_reason\": \"Customer requested a refund\",\n \"metadata\": {\n \"merchant_case_id\": \"CASE_20260917_001\"\n },\n \"notify_url\": \"https://merchant.example.com/webhooks/paiera\",\n \"redirect_url\": \"https://merchant.example.com/refund/result\",\n \"cancel_url\": \"https://merchant.example.com/refund/cancelled\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-test.paiera.com/v1/refund/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"refund_reference_id\": \"merchant-refund-202609170001\",\n \"payment_reference_id\": \"merchant-order-202609170001\",\n \"refund_amount\": \"1.20\",\n \"refund_currency\": \"USDT\",\n \"refund_reason\": \"Customer requested a refund\",\n \"metadata\": {\n \"merchant_case_id\": \"CASE_20260917_001\"\n },\n \"notify_url\": \"https://merchant.example.com/webhooks/paiera\",\n \"redirect_url\": \"https://merchant.example.com/refund/result\",\n \"cancel_url\": \"https://merchant.example.com/refund/cancelled\"\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"message": "success",
"trace_id": "00000000000000000000000000000001",
"timestamp": 1789349610318,
"data": {
"refund_reference_id": "merchant-refund-202609170001",
"refund_id": "rfd_example_001",
"transaction_id": "acq_example_001",
"payment_reference_id": "merchant-order-202609170001",
"refund_claim_url": "https://checkout-test.paiera.com/refund/?key=<REFUND_KEY>",
"refund_amount": "1.2",
"refund_currency": "USDT",
"status": "CREATED",
"created_at": "2026-09-17T10:00:00Z",
"expires_at": "2026-09-18T10:00:00Z"
},
"success": true
}Create Refund
Create a refund claim for a COMPLETED payment. The refund currency must match the actual payment currency. The requested amount plus historical refunds must not exceed the refundable amount. The current merchant and refund_reference_id form the idempotency key. See Error codes for business errors. payment_reference_id identifies the original merchant payment reference, not its platform transaction ID. Order status, refundable amount, risk and fee rules still apply.
curl --request POST \
--url https://api-test.paiera.com/v1/refund/create \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"refund_reference_id": "merchant-refund-202609170001",
"payment_reference_id": "merchant-order-202609170001",
"refund_amount": "1.20",
"refund_currency": "USDT",
"refund_reason": "Customer requested a refund",
"metadata": {
"merchant_case_id": "CASE_20260917_001"
},
"notify_url": "https://merchant.example.com/webhooks/paiera",
"redirect_url": "https://merchant.example.com/refund/result",
"cancel_url": "https://merchant.example.com/refund/cancelled"
}
'import requests
url = "https://api-test.paiera.com/v1/refund/create"
payload = {
"refund_reference_id": "merchant-refund-202609170001",
"payment_reference_id": "merchant-order-202609170001",
"refund_amount": "1.20",
"refund_currency": "USDT",
"refund_reason": "Customer requested a refund",
"metadata": { "merchant_case_id": "CASE_20260917_001" },
"notify_url": "https://merchant.example.com/webhooks/paiera",
"redirect_url": "https://merchant.example.com/refund/result",
"cancel_url": "https://merchant.example.com/refund/cancelled"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
refund_reference_id: 'merchant-refund-202609170001',
payment_reference_id: 'merchant-order-202609170001',
refund_amount: '1.20',
refund_currency: 'USDT',
refund_reason: 'Customer requested a refund',
metadata: {merchant_case_id: 'CASE_20260917_001'},
notify_url: 'https://merchant.example.com/webhooks/paiera',
redirect_url: 'https://merchant.example.com/refund/result',
cancel_url: 'https://merchant.example.com/refund/cancelled'
})
};
fetch('https://api-test.paiera.com/v1/refund/create', 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-test.paiera.com/v1/refund/create",
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([
'refund_reference_id' => 'merchant-refund-202609170001',
'payment_reference_id' => 'merchant-order-202609170001',
'refund_amount' => '1.20',
'refund_currency' => 'USDT',
'refund_reason' => 'Customer requested a refund',
'metadata' => [
'merchant_case_id' => 'CASE_20260917_001'
],
'notify_url' => 'https://merchant.example.com/webhooks/paiera',
'redirect_url' => 'https://merchant.example.com/refund/result',
'cancel_url' => 'https://merchant.example.com/refund/cancelled'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://api-test.paiera.com/v1/refund/create"
payload := strings.NewReader("{\n \"refund_reference_id\": \"merchant-refund-202609170001\",\n \"payment_reference_id\": \"merchant-order-202609170001\",\n \"refund_amount\": \"1.20\",\n \"refund_currency\": \"USDT\",\n \"refund_reason\": \"Customer requested a refund\",\n \"metadata\": {\n \"merchant_case_id\": \"CASE_20260917_001\"\n },\n \"notify_url\": \"https://merchant.example.com/webhooks/paiera\",\n \"redirect_url\": \"https://merchant.example.com/refund/result\",\n \"cancel_url\": \"https://merchant.example.com/refund/cancelled\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://api-test.paiera.com/v1/refund/create")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"refund_reference_id\": \"merchant-refund-202609170001\",\n \"payment_reference_id\": \"merchant-order-202609170001\",\n \"refund_amount\": \"1.20\",\n \"refund_currency\": \"USDT\",\n \"refund_reason\": \"Customer requested a refund\",\n \"metadata\": {\n \"merchant_case_id\": \"CASE_20260917_001\"\n },\n \"notify_url\": \"https://merchant.example.com/webhooks/paiera\",\n \"redirect_url\": \"https://merchant.example.com/refund/result\",\n \"cancel_url\": \"https://merchant.example.com/refund/cancelled\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-test.paiera.com/v1/refund/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"refund_reference_id\": \"merchant-refund-202609170001\",\n \"payment_reference_id\": \"merchant-order-202609170001\",\n \"refund_amount\": \"1.20\",\n \"refund_currency\": \"USDT\",\n \"refund_reason\": \"Customer requested a refund\",\n \"metadata\": {\n \"merchant_case_id\": \"CASE_20260917_001\"\n },\n \"notify_url\": \"https://merchant.example.com/webhooks/paiera\",\n \"redirect_url\": \"https://merchant.example.com/refund/result\",\n \"cancel_url\": \"https://merchant.example.com/refund/cancelled\"\n}"
response = http.request(request)
puts response.read_body{
"code": "success",
"message": "success",
"trace_id": "00000000000000000000000000000001",
"timestamp": 1789349610318,
"data": {
"refund_reference_id": "merchant-refund-202609170001",
"refund_id": "rfd_example_001",
"transaction_id": "acq_example_001",
"payment_reference_id": "merchant-order-202609170001",
"refund_claim_url": "https://checkout-test.paiera.com/refund/?key=<REFUND_KEY>",
"refund_amount": "1.2",
"refund_currency": "USDT",
"status": "CREATED",
"created_at": "2026-09-17T10:00:00Z",
"expires_at": "2026-09-18T10:00:00Z"
},
"success": true
}payment_reference_id identifies the original merchant payment reference, not its platform transaction ID. Order status, refundable amount, risk and fee rules still apply.
See response objects.
Merchant integration sequence
The merchant backend creates a refund and shares the hosted claim link with the payer. Webhook delivery and merchant polling are independent and may occur in either order. Confirm success after a verifiedrefund.refunded event or a refund lookup returns REFUNDED. Use that backend-confirmed result when the payer returns to your site. Deduplicate deliveries by event_id and apply each refund outcome once, even when both channels report it.
Use the currency and network of the original payment, and make sure the recipient address is valid on that network. Keep enough available balance for the refund amount and fees. When retrying refund creation, reuse the same refund_reference_id with the same original payment, amount, and currency.
Set notify_url for a refund-specific notification address, or configure an enabled Portal webhook that subscribes to the refund event. See Webhook rules for verification and acknowledgements.Authorizations
Use HTTP Basic authentication with api_key as username and api_secret as password. Obtain credentials in Portal > Settings > Developer.
Body
payment_reference_id identifies the original merchant payment reference, not its platform transaction ID. Order status, refundable amount, risk and fee rules still apply.
Merchant refund reference. 1..64; letters, digits, underscores and hyphens. Yes.
1 - 64^[A-Za-z0-9_-]+$Original merchant payment reference. 1..64; letters, digits, underscores and hyphens. Yes.
1 - 64^[A-Za-z0-9_-]+$Refund amount. Positive; at most 2 decimal places. Yes.
^(?!0+(?:\.0+)?$)[0-9]+(?:\.[0-9]{1,2})?$Refund currency. 4 uppercase letters; valid currency enum. Yes.
^[A-Z]{4}$Refund reason. <=256. No.
Merchant metadata.
Explicit webhook URL. Up to 256; HTTP/HTTPS. No.
256^https?://Completion redirect URL. Up to 256; HTTP/HTTPS. No.
256^https?://Cancellation redirect URL. Up to 256; HTTP/HTTPS. No.
256^https?://Response
Create Refund successful
Business result code; success indicates a successful request
"success"Result message; success indicates a successful request
"success"Response time as a Unix timestamp in milliseconds
Declared response fields; null values may be omitted. payment_reference_id identifies the original merchant payment reference, not its platform transaction ID. Order status, refundable amount, risk and fee rules still apply.
Show child attributes
Show child attributes
Whether the request succeeded
Trace ID used for troubleshooting
