curl --request GET \
--url https://api-sandbox.uqpaytech.com/api/v2/payment_intents/{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_intents/{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_intents/{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_intents/{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_intents/{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_intents/{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_intents/{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{
"amount": "1",
"available_payment_method_types": null,
"cancel_time": "2026-09-14T17:03:36+08:00",
"cancellation_reason": "abandoned",
"captured_amount": "0",
"client_secret": "<client-secret>",
"complete_time": "2026-09-14T17:03:36+08:00",
"create_time": "2026-09-14T17:03:35+08:00",
"currency": "SGD",
"customer_id": "",
"description": "Updated contract test",
"intent_status": "CANCELLED",
"latest_payment_attempt": null,
"merchant_order_id": "ce37d547-53c7-4648-988b-691a352b5446",
"metadata": null,
"next_action": null,
"payment_intent_id": "PI2099423807759454208",
"payment_method_flows": {},
"return_url": "https://example.com/return",
"update_time": "2026-09-14T17:03:36+08:00"
}Retrieve a PaymentIntent
查询客户付款的当前进度,以及客户是否需要执行额外操作。
传入该笔支付的 payment_intent_id。响应包含 intent_status 和 next_action;有支付尝试时,还包含 latest_payment_attempt。状态含义参见 Payment Intent 状态。
curl --request GET \
--url https://api-sandbox.uqpaytech.com/api/v2/payment_intents/{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_intents/{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_intents/{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_intents/{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_intents/{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_intents/{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_intents/{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{
"amount": "1",
"available_payment_method_types": null,
"cancel_time": "2026-09-14T17:03:36+08:00",
"cancellation_reason": "abandoned",
"captured_amount": "0",
"client_secret": "<client-secret>",
"complete_time": "2026-09-14T17:03:36+08:00",
"create_time": "2026-09-14T17:03:35+08:00",
"currency": "SGD",
"customer_id": "",
"description": "Updated contract test",
"intent_status": "CANCELLED",
"latest_payment_attempt": null,
"merchant_order_id": "ce37d547-53c7-4648-988b-691a352b5446",
"metadata": null,
"next_action": null,
"payment_intent_id": "PI2099423807759454208",
"payment_method_flows": {},
"return_url": "https://example.com/return",
"update_time": "2026-09-14T17:03:36+08:00"
}授权
UQPAY 提供的登录 API Token。
请求头
指定代表哪个子账户发起该请求。应设置为 account_id,可通过 List Connected Accounts 获取。若省略或为空,则使用主账户执行请求。
更多信息见 Connected Accounts。
UQPAY 生成的 API 客户端 ID
路径参数
PaymentIntent 的唯一 ID。
"PI1925112193204883441"
响应
成功获取 PaymentIntent
PaymentIntent 的唯一标识
36"b1c2d3e4-f5a6-b7c8-d9e0-f1a2b3c4d5e6"
支付金额。即你希望向客户收取的订单金额。
"10.12"
三位币种代码
"SGD"
该 PaymentIntent 的状态。
REQUIRES_PAYMENT_METHOD:PaymentIntent 正在等待确认请求。REQUIRES_CUSTOMER_ACTION:PaymentIntent 正在等待客户进一步的认证操作,例如 3DS 验证和扫描二维码。请查看next_action。REQUIRES_CAPTURE:PaymentIntent 正在等待你请款以完成支付。PENDING:PaymentIntent 正在等待支付渠道返回最终结果,无需进一步操作。SUCCEEDED:PaymentIntent 已成功,支付完成。CANCELLED:PaymentIntent 已按你的请求取消,支付已关闭。FAILED:PaymentIntent 已失败。PARTIALLY_CAPTURED: 部分请款的授权仍有待处理余额;不要再次提交请款。EXPIRED: 预授权已过期并释放。
PARTIALLY_CAPTURED, EXPIRED, REQUIRES_PAYMENT_METHOD, REQUIRES_CUSTOMER_ACTION, REQUIRES_CAPTURE, PENDING, SUCCEEDED, CANCELLED, FAILED "SUCCEEDED"
查询PaymentIntent详情或列表时,若存在则返回退款或授权释放详情。
查询PaymentIntent详情和列表时返回的请款记录。
Show child attributes
Show child attributes
本次支付的授权模式。
authorization, pre_authorization 预授权到期时间。未记录时为null。请使用返回的时间,不要假定固定冻结期限。
剩余可请款预授权额度。最终请款会消耗可用授权额度;渠道处理结果请查看capture_records。
剩余预授权额度,与available_to_capture相同。值大于零不代表一定允许撤销。
创建 PaymentIntent 时的描述符。
255该 PaymentIntent 可用的支付方式类型。
PaymentIntent记录的聚合请款金额。请款受理时可能早于渠道完成更新此值;处理结果请查看capture_records。
"10.12"
与该 PaymentIntent 关联的客户快照。在创建时提供了 customer 或 customer_id 时返回。客户的唯一标识在顶层以 customer_id 暴露;该对象内部不包含 id 字段。
Show child attributes
Show child attributes
与该 PaymentIntent 关联的客户 ID。访客结账时为空。
36"cus_asyknf3wlfxhs1s6plamk80i8v"
取消时间未记录时为空字符串。
取消该 PaymentIntent 的原因。
"Order cancelled"
用于浏览器或 App 的 PaymentIntent client secret。由 PaymentIntent 创建接口或查询接口返回。返回的 client_secret 有效期为 60 分钟。
"eyJhbGciOiJI***********ujNdZ1DF9CqWEfF1jphxI"
商户系统中为该 PaymentIntent 创建的商户参考 ID
36"1bf70d90-9ed0-48ce-9370-9bd7ef6ab9ee"
支付关联的元数据。未设置元数据时返回 null。
Show child attributes
Show child attributes
无可用的下一步操作时为 null;否则按返回的操作信息继续处理支付。
Show child attributes
Show child attributes
支付认证完成后用于跳转客户的网页 URL 或应用 scheme URI。
"https://127.0.0.1:8080/api/v1/callback"
该 PaymentIntent 的创建时间。
"2024-03-01T00:00:00+08:00"
完成时间未记录时为空字符串。
该 PaymentIntent 最近一次更新或操作的时间。
"2024-03-01T00:00:00+08:00"
最新 PaymentAttempt;没有可用的支付尝试时为 null。
- Latest payment attempt
- No payment attempt
Show child attributes
Show child attributes

