List all PaymentAttempts
curl --request GET \
--url https://api-sandbox.uqpaytech.com/api/v2/payment/payment_attempts \
--header 'x-auth-token: <api-key>' \
--header 'x-client-id: <x-client-id>'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment/payment_attempts"
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/payment_attempts', 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/payment_attempts",
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/payment_attempts"
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/payment_attempts")
.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/payment_attempts")
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": [
{
"attempt_id": "24fc62b4-90d1-42e3-96ab-dd54ccc648b3",
"amount": "9.98",
"currency": "SGD",
"captured_amount": "0.00",
"refunded_amount": "0.00",
"create_time": "2025-03-21T17:17:32+08:00",
"update_time": "2025-03-21T17:17:32+08:00",
"complete_time": "2024-03-01T00:00:00+08:00",
"cancellation_reason": "Order cancelled",
"auth_code": "A12B3C",
"arn": "74537604221222132710572",
"rrn": "123456789012",
"advice_code": "01",
"authentication_data": {
"avs_result": "Y",
"three_ds": {
"three_ds_version": "2.2.0",
"eci": "05",
"cavv": "AAABCZIhcQAAAABZlyFxAAAAAAA=",
"three_ds_authentication_status": "Y",
"three_ds_cancellation_reason": "01"
}
},
"payment_method": {
"type": "card",
"card": {
"card_name": "john doe",
"card_number": "541333******4047",
"brand": "visa",
"bin": "541333",
"last4": "4047",
"expiry_month": "12",
"expiry_year": "2027",
"billing": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"address": {
"country_code": "SG",
"city": "Singapore",
"street": "444 Orchard Rd, Midpoint Orchard, Singapore ",
"postcode": "924011",
"state": ""
},
"phone_number": "12025550123"
},
"auto_capture": true
}
},
"failure_code": "",
"attempt_status": "INITIATED"
}
]
}Payment Attempts
List all PaymentAttempts
查询 PaymentAttempt 列表,支持可选的筛选条件
GET
/
v2
/
payment
/
payment_attempts
List all PaymentAttempts
curl --request GET \
--url https://api-sandbox.uqpaytech.com/api/v2/payment/payment_attempts \
--header 'x-auth-token: <api-key>' \
--header 'x-client-id: <x-client-id>'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment/payment_attempts"
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/payment_attempts', 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/payment_attempts",
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/payment_attempts"
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/payment_attempts")
.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/payment_attempts")
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": [
{
"attempt_id": "24fc62b4-90d1-42e3-96ab-dd54ccc648b3",
"amount": "9.98",
"currency": "SGD",
"captured_amount": "0.00",
"refunded_amount": "0.00",
"create_time": "2025-03-21T17:17:32+08:00",
"update_time": "2025-03-21T17:17:32+08:00",
"complete_time": "2024-03-01T00:00:00+08:00",
"cancellation_reason": "Order cancelled",
"auth_code": "A12B3C",
"arn": "74537604221222132710572",
"rrn": "123456789012",
"advice_code": "01",
"authentication_data": {
"avs_result": "Y",
"three_ds": {
"three_ds_version": "2.2.0",
"eci": "05",
"cavv": "AAABCZIhcQAAAABZlyFxAAAAAAA=",
"three_ds_authentication_status": "Y",
"three_ds_cancellation_reason": "01"
}
},
"payment_method": {
"type": "card",
"card": {
"card_name": "john doe",
"card_number": "541333******4047",
"brand": "visa",
"bin": "541333",
"last4": "4047",
"expiry_month": "12",
"expiry_year": "2027",
"billing": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"address": {
"country_code": "SG",
"city": "Singapore",
"street": "444 Orchard Rd, Midpoint Orchard, Singapore ",
"postcode": "924011",
"state": ""
},
"phone_number": "12025550123"
},
"auto_capture": true
}
},
"failure_code": "",
"attempt_status": "INITIATED"
}
]
}授权
UQPay 提供的登录 API Token。
请求头
UQPAY 生成的 API 客户端 ID
查询参数
每页返回的最大条目数,取值范围 1 - 100。
必填范围:
1 <= x <= 100示例:
10
用于获取下一批条目的页码,取值必须大于 1。
必填范围:
x >= 1示例:
1
按 PaymentIntent ID 筛选 PaymentAttempt
示例:
"PI1234567890123456789"
按状态筛选 PaymentAttempt。
INITIATED:根据初始请求创建。AUTHENTICATION_REDIRECTED:等待客户身份验证。PENDING_AUTHORIZATION:等待支付渠道的最终决定。AUTHORIZED:授权成功完成。CAPTURE_REQUESTED:已提交请款,支付视为完成。SETTLED:资金已由支付渠道结算并由 UQPAY 收到。SUCCEEDED:UQPAY 已将资金结算到你的钱包。CANCELLED:PaymentAttempt 已取消。EXPIRED:未在允许的时间窗口内完成。FAILED:PaymentAttempt 失败。
可用选项:
INITIATED, AUTHENTICATION_REDIRECTED, PENDING_AUTHORIZATION, AUTHORIZED, CAPTURE_REQUESTED, SETTLED, SUCCEEDED, CANCELLED, EXPIRED, FAILED 示例:
"INITIATED"
⌘I

