curl --request GET \
--url https://api-sandbox.uqpaytech.com/api/v2/payment/payment_attempts/{id} \
--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/{id}"
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/{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-sandbox.uqpaytech.com/api/v2/payment/payment_attempts/{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 => [
"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/{id}"
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/{id}")
.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/{id}")
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{
"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": {
"cvv_result": "M",
"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",
"network": "visa",
"authorization_type": "authorization",
"brand": "visa",
"bin": "541333",
"last4": "4047",
"card_type": "credit",
"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"
}Retrieve a PaymentAttempt
按 ID 查询指定 PaymentAttempt 的详细信息
curl --request GET \
--url https://api-sandbox.uqpaytech.com/api/v2/payment/payment_attempts/{id} \
--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/{id}"
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/{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-sandbox.uqpaytech.com/api/v2/payment/payment_attempts/{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 => [
"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/{id}"
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/{id}")
.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/{id}")
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{
"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": {
"cvv_result": "M",
"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",
"network": "visa",
"authorization_type": "authorization",
"brand": "visa",
"bin": "541333",
"last4": "4047",
"card_type": "credit",
"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
路径参数
要查询的 PaymentAttempt ID
"PA1234567890123456789"
响应
成功获取 PaymentAttempt 详情
该 PaymentAttempt 的唯一标识。
"24fc62b4-90d1-42e3-96ab-dd54ccc648b3"
该 PaymentAttempt 的金额。
"9.98"
三位币种代码
"SGD"
已请款金额。
"0.00"
已退款金额。
"0.00"
该 PaymentAttempt 的创建时间。
"2025-03-21T17:17:32+08:00"
该 PaymentAttempt 最近一次更新或操作的时间。
"2025-03-21T17:17:32+08:00"
该 PaymentAttempt 的完成时间。
"2024-03-01T00:00:00+08:00"
取消该 PaymentIntent 的原因。
"Order cancelled"
授权成功后由发卡行返回的授权码。
"A12B3C"
收单参考号(ARN)。一个 23 位标识,用于跨机构对账和拒付追踪。
"74537604221222132710572"
检索参考号(RRN)。一个 12 位标识,用于交易查询和客服查询。
"123456789012"
发卡行建议码,指示拒绝后的推荐操作。帮助商户实施智能重试策略。
01:新的尝试可能成功。建议重试。02:请勿重试。请尝试其他支付方式。03:请勿重试。持卡人应联系其发卡行。21:取消所有待处理的授权。卡片可能已泄露。85:请勿重试。发卡行不会批准此类交易。
01, 02, 03, 21, 85 "01"
该 PaymentAttempt 的认证与验证数据。
Show child attributes
Show child attributes
该 PaymentAttempt 所使用的支付方式详情。
- card
- applepay
- googlepay
- alipaycn
- alipayhk
- unionpay
- wechatpay
- grabpay
- crypto
- paynow
- truemoney
- tng
- gcash
- dana
- kakaopay
- toss
- naverpay
Show child attributes
Show child attributes
PaymentAttempt 失败码。可能的取值见 Error Code Reference.payment_error 部分。
""
该 PaymentAttempt 的状态。
INITIATED:已根据初始请求创建 PaymentAttempt。AUTHENTICATION_REDIRECTED:等待客户完成身份验证,例如 3D Secure 或扫描二维码。PENDING_AUTHORIZATION:已收到授权请求,正在等待支付渠道的最终决定。AUTHORIZED:授权已成功完成。将根据配置自动或手动请款。CAPTURE_REQUESTED:请款请求已成功提交,支付视为完成。SETTLED:资金已从支付渠道结算并由 UQPAY 收到。SUCCEEDED:UQPAY 已将资金结算至你的钱包。CANCELLED:PaymentAttempt 已取消。若有已授权资金,将退回给客户。EXPIRED:PaymentAttempt 未在允许的时间窗口内完成,已过期。FAILED:PaymentAttempt 已失败。请创建新的 PaymentAttempt 重试。
INITIATED, AUTHENTICATION_REDIRECTED, PENDING_AUTHORIZATION, AUTHORIZED, CAPTURE_REQUESTED, SETTLED, SUCCEEDED, CANCELLED, EXPIRED, FAILED "INITIATED"

