List all PaymentIntents
curl --request GET \
--url https://api-sandbox.uqpaytech.com/api/v2/payment_intents \
--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"
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', 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",
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"
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")
.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")
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_intent_id": "b1c2d3e4-f5a6-b7c8-d9e0-f1a2b3c4d5e6",
"amount": "10.12",
"currency": "SGD",
"description": "<string>",
"available_payment_method_types": [
"<string>"
],
"captured_amount": "10.12",
"customer": {
"id": "cus_hkduz3gvz1feg25e87fjcahsxq",
"external_customer_id": "CUS_1715740800123",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone_number": "+1 123456789",
"address": {
"country_code": "SG",
"city": "Singapore",
"street": "444 Orchard Rd, Midpoint Orchard, Singapore ",
"postcode": "924011",
"state": ""
},
"metadata": {
"key1": "value1",
"key2": "value2"
},
"create_time": "2025-03-21T17:17:32+08:00",
"update_time": "2025-03-21T17:17:32+08:00"
},
"customer_id": "cus_asyknf3wlfxhs1s6plamk80i8v",
"cancel_time": "2024-03-01T00:00:00+08:00",
"cancellation_reason": "Order cancelled",
"client_secret": "eyJhbGciOiJI***********ujNdZ1DF9CqWEfF1jphxI",
"merchant_order_id": "1bf70d90-9ed0-48ce-9370-9bd7ef6ab9ee",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"next_action": {
"redirect_to_url": {
"url": "https://example.checkout-page.com",
"return_url": "https://example.payment-result-page.com"
},
"redirect_iframe": {
"iframe": "<string>"
},
"display_qr_code": {
"qr_code_url": "https://sg-acquiring-bucket-sandbox.s3.ap-southeast-1.amazonaws.com/payment/20250829/qrcode_PA1961262701099356160?X-Amz-Algorithm=AWS4-HMAC-SHA256\\u0026X-Amz-Credential=ASIAY******f987429",
"expires_at": "2023-11-07T05:31:56Z"
},
"display_bank_details": {
"bank_name": "<string>",
"account_number": "GB71950018692652646598",
"routing_number": "012345678"
}
},
"return_url": "https://127.0.0.1:8080/api/v1/callback",
"create_time": "2024-03-01T00:00:00+08:00",
"complete_time": "2024-03-01T00:00:00+08:00",
"update_time": "2024-03-01T00:00:00+08:00",
"latest_payment_attempt": {
"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 Intents
List all PaymentIntents
返回 PaymentIntent 列表。
GET
/
v2
/
payment_intents
List all PaymentIntents
curl --request GET \
--url https://api-sandbox.uqpaytech.com/api/v2/payment_intents \
--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"
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', 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",
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"
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")
.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")
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_intent_id": "b1c2d3e4-f5a6-b7c8-d9e0-f1a2b3c4d5e6",
"amount": "10.12",
"currency": "SGD",
"description": "<string>",
"available_payment_method_types": [
"<string>"
],
"captured_amount": "10.12",
"customer": {
"id": "cus_hkduz3gvz1feg25e87fjcahsxq",
"external_customer_id": "CUS_1715740800123",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone_number": "+1 123456789",
"address": {
"country_code": "SG",
"city": "Singapore",
"street": "444 Orchard Rd, Midpoint Orchard, Singapore ",
"postcode": "924011",
"state": ""
},
"metadata": {
"key1": "value1",
"key2": "value2"
},
"create_time": "2025-03-21T17:17:32+08:00",
"update_time": "2025-03-21T17:17:32+08:00"
},
"customer_id": "cus_asyknf3wlfxhs1s6plamk80i8v",
"cancel_time": "2024-03-01T00:00:00+08:00",
"cancellation_reason": "Order cancelled",
"client_secret": "eyJhbGciOiJI***********ujNdZ1DF9CqWEfF1jphxI",
"merchant_order_id": "1bf70d90-9ed0-48ce-9370-9bd7ef6ab9ee",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"next_action": {
"redirect_to_url": {
"url": "https://example.checkout-page.com",
"return_url": "https://example.payment-result-page.com"
},
"redirect_iframe": {
"iframe": "<string>"
},
"display_qr_code": {
"qr_code_url": "https://sg-acquiring-bucket-sandbox.s3.ap-southeast-1.amazonaws.com/payment/20250829/qrcode_PA1961262701099356160?X-Amz-Algorithm=AWS4-HMAC-SHA256\\u0026X-Amz-Credential=ASIAY******f987429",
"expires_at": "2023-11-07T05:31:56Z"
},
"display_bank_details": {
"bank_name": "<string>",
"account_number": "GB71950018692652646598",
"routing_number": "012345678"
}
},
"return_url": "https://127.0.0.1:8080/api/v1/callback",
"create_time": "2024-03-01T00:00:00+08:00",
"complete_time": "2024-03-01T00:00:00+08:00",
"update_time": "2024-03-01T00:00:00+08:00",
"latest_payment_attempt": {
"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。
请求头
指定代表哪个子账户发起该请求。应设置为 account_id,可通过 List Connected Accounts 获取。若省略或为空,则使用主账户执行请求。
更多信息见 Connected Accounts。
UQPAY 生成的 API 客户端 ID
查询参数
每页返回的最大条目数,取值范围 1 - 100。
必填范围:
1 <= x <= 100示例:
10
用于获取下一批条目的页码,取值必须大于 1。
必填范围:
x >= 1示例:
1
PaymentIntent 的状态。 该 PaymentIntent 的状态。
REQUIRES_PAYMENT_METHOD:PaymentIntent 正在等待确认请求。REQUIRES_CUSTOMER_ACTION:PaymentIntent 正在等待客户进一步的认证操作,例如 3DS 验证和扫描二维码。请查看next_action。REQUIRES_CAPTURE:PaymentIntent 正在等待你请款以完成支付。PENDING:PaymentIntent 正在等待支付渠道返回最终结果,无需进一步操作。SUCCEEDED:PaymentIntent 已成功,支付完成。CANCELLED:PaymentIntent 已按你的请求取消,支付已关闭。FAILED:PaymentIntent 已失败。
可用选项:
REQUIRES_PAYMENT_METHOD, REQUIRES_CUSTOMER_ACTION, REQUIRES_CAPTURE, PENDING, SUCCEEDED, CANCELLED, FAILED 用于按 create_time 筛选的起始时间(不含)。ISO 8601 格式。
示例:
"2024-03-01T00:00:00+08:00"
用于按 create_time 筛选的结束时间(不含)。ISO 8601 格式。
示例:
"2024-03-02T00:00:00+08:00"
⌘I

