Create PAN Token
curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id}/token \
--header 'x-auth-token: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>'import requests
url = "https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id}/token"
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-auth-token": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-idempotency-key': '<x-idempotency-key>', 'x-auth-token': '<api-key>'}
};
fetch('https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id}/token', 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/v1/issuing/cards/{id}/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-auth-token: <api-key>",
"x-idempotency-key: <x-idempotency-key>"
],
]);
$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/v1/issuing/cards/{id}/token"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
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.post("https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id}/token")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-auth-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id}/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["x-auth-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"token": "pan_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
"expires_in": 60,
"expires_at": "2025-11-13T10:31:00Z"
}Card Secure Data
Create PAN Token
创建一次性 PAN Token,用于通过 secure iframe 访问敏感卡数据。这让商户无需具备 PCI DSS 合规资质即可展示卡信息(卡号、过期日期、CVV)。
该 Token 在 60 秒后过期,且只能使用一次。
集成说明参见 Secure iFrame 指南。
POST
/
v1
/
issuing
/
cards
/
{id}
/
token
Create PAN Token
curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id}/token \
--header 'x-auth-token: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>'import requests
url = "https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id}/token"
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-auth-token": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-idempotency-key': '<x-idempotency-key>', 'x-auth-token': '<api-key>'}
};
fetch('https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id}/token', 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/v1/issuing/cards/{id}/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-auth-token: <api-key>",
"x-idempotency-key: <x-idempotency-key>"
],
]);
$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/v1/issuing/cards/{id}/token"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
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.post("https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id}/token")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-auth-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id}/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["x-auth-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"token": "pan_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
"expires_in": 60,
"expires_at": "2025-11-13T10:31:00Z"
}授权
由 UQPAY 提供的登录 API Token。
请求头
指定代表哪个子账户发起请求。应设置为 account_id,该值可通过 List Connected Accounts 接口获取。若省略或为空,则请求以主账户身份执行。
更多信息参见 关联账户。
用于维持操作幂等性的唯一标识符(UUID),确保同一操作的重复执行不会产生意外影响或重复。它有助于在网络错误、重试或失败的情况下保持数据一致性。
路径参数
资源的全局唯一标识符(UUID v4)。
示例:
"71fdb0fe-9682-457a-9361-e8868694f12f"

