List all refunds
curl --request GET \
--url https://api-sandbox.uqpaytech.com/api/v2/payment/refunds \
--header 'x-auth-token: <api-key>' \
--header 'x-client-id: <x-client-id>'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment/refunds"
headers = {
"x-client-id": "<x-client-id>",
"x-auth-token": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-client-id': '<x-client-id>', 'x-auth-token': '<api-key>'}
};
fetch('https://api-sandbox.uqpaytech.com/api/v2/payment/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-sandbox.uqpaytech.com/api/v2/payment/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-auth-token: <api-key>",
"x-client-id: <x-client-id>"
],
]);
$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-sandbox.uqpaytech.com/api/v2/payment/refunds"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-client-id", "<x-client-id>")
req.Header.Add("x-auth-token", "<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://api-sandbox.uqpaytech.com/api/v2/payment/refunds")
.header("x-client-id", "<x-client-id>")
.header("x-auth-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v2/payment/refunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-client-id"] = '<x-client-id>'
request["x-auth-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total_pages": 10,
"total_items": 105,
"data": [
{
"payment_refund_id": "RF123456789",
"payment_attempt_id": "PA123456789",
"amount": "10.01",
"currency": "USD",
"refund_status": "SUCCEEDED",
"create_time": "2024-03-01T00:00:00+08:00",
"update_time": "2024-03-01T00:00:00+08:00",
"reason": "Order 1234 has been returned",
"metadata": {
"customer_id": "cust_12345",
"order_id": "order_6789"
}
}
]
}Payment Refunds
List all refunds
查询退款列表,支持可选的筛选条件
GET
/
v2
/
payment
/
refunds
List all refunds
curl --request GET \
--url https://api-sandbox.uqpaytech.com/api/v2/payment/refunds \
--header 'x-auth-token: <api-key>' \
--header 'x-client-id: <x-client-id>'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment/refunds"
headers = {
"x-client-id": "<x-client-id>",
"x-auth-token": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-client-id': '<x-client-id>', 'x-auth-token': '<api-key>'}
};
fetch('https://api-sandbox.uqpaytech.com/api/v2/payment/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-sandbox.uqpaytech.com/api/v2/payment/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-auth-token: <api-key>",
"x-client-id: <x-client-id>"
],
]);
$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-sandbox.uqpaytech.com/api/v2/payment/refunds"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-client-id", "<x-client-id>")
req.Header.Add("x-auth-token", "<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://api-sandbox.uqpaytech.com/api/v2/payment/refunds")
.header("x-client-id", "<x-client-id>")
.header("x-auth-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v2/payment/refunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-client-id"] = '<x-client-id>'
request["x-auth-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total_pages": 10,
"total_items": 105,
"data": [
{
"payment_refund_id": "RF123456789",
"payment_attempt_id": "PA123456789",
"amount": "10.01",
"currency": "USD",
"refund_status": "SUCCEEDED",
"create_time": "2024-03-01T00:00:00+08:00",
"update_time": "2024-03-01T00:00:00+08:00",
"reason": "Order 1234 has been returned",
"metadata": {
"customer_id": "cust_12345",
"order_id": "order_6789"
}
}
]
}授权
UQPay 提供的登录 API Token。
请求头
UQPAY 生成的 API 客户端 ID
查询参数
每页返回的最大条目数,取值范围 1 - 100。
必填范围:
1 <= x <= 100示例:
10
用于获取下一批条目的页码,取值必须大于 1。
必填范围:
x >= 1示例:
1
交易的起始时间。默认时间范围为 1 个月。
示例:
"2024-03-01T00:00:00+08:00"
交易的结束时间。最大时间范围为 3 个月。
示例:
"2024-03-01T00:00:00+08:00"
要查询退款的 PaymentIntent ID
商户系统中为该 PaymentIntent 创建的商户参考 ID。
⌘I

