Update Card
curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id} \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"card_limit": 2100.02,
"name_on_card": "MARSHALL HU",
"no_pin_payment_amount": 100,
"spending_controls": [
{
"amount": 100.03,
"interval": "PER_TRANSACTION"
}
],
"risk_controls": {
"enable_3ds": "Y",
"allow_3ds_transactions": "Y",
"allowed_mcc": null,
"blocked_mcc": [
"5999",
"6011"
]
},
"metadata": {
"key1": "value1",
"key2": "value2"
},
"card_art_id": "01KD52BKQWDMFF63R1NNQN7A79"
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id}"
payload = {
"card_limit": 2100.02,
"name_on_card": "MARSHALL HU",
"no_pin_payment_amount": 100,
"spending_controls": [
{
"amount": 100.03,
"interval": "PER_TRANSACTION"
}
],
"risk_controls": {
"enable_3ds": "Y",
"allow_3ds_transactions": "Y",
"allowed_mcc": None,
"blocked_mcc": ["5999", "6011"]
},
"metadata": {
"key1": "value1",
"key2": "value2"
},
"card_art_id": "01KD52BKQWDMFF63R1NNQN7A79"
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
'x-auth-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
card_limit: 2100.02,
name_on_card: 'MARSHALL HU',
no_pin_payment_amount: 100,
spending_controls: [{amount: 100.03, interval: 'PER_TRANSACTION'}],
risk_controls: {
enable_3ds: 'Y',
allow_3ds_transactions: 'Y',
allowed_mcc: null,
blocked_mcc: ['5999', '6011']
},
metadata: {key1: 'value1', key2: 'value2'},
card_art_id: '01KD52BKQWDMFF63R1NNQN7A79'
})
};
fetch('https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{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/v1/issuing/cards/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'card_limit' => 2100.02,
'name_on_card' => 'MARSHALL HU',
'no_pin_payment_amount' => 100,
'spending_controls' => [
[
'amount' => 100.03,
'interval' => 'PER_TRANSACTION'
]
],
'risk_controls' => [
'enable_3ds' => 'Y',
'allow_3ds_transactions' => 'Y',
'allowed_mcc' => null,
'blocked_mcc' => [
'5999',
'6011'
]
],
'metadata' => [
'key1' => 'value1',
'key2' => 'value2'
],
'card_art_id' => '01KD52BKQWDMFF63R1NNQN7A79'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id}"
payload := strings.NewReader("{\n \"card_limit\": 2100.02,\n \"name_on_card\": \"MARSHALL HU\",\n \"no_pin_payment_amount\": 100,\n \"spending_controls\": [\n {\n \"amount\": 100.03,\n \"interval\": \"PER_TRANSACTION\"\n }\n ],\n \"risk_controls\": {\n \"enable_3ds\": \"Y\",\n \"allow_3ds_transactions\": \"Y\",\n \"allowed_mcc\": null,\n \"blocked_mcc\": [\n \"5999\",\n \"6011\"\n ]\n },\n \"metadata\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n },\n \"card_art_id\": \"01KD52BKQWDMFF63R1NNQN7A79\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("x-auth-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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}")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"card_limit\": 2100.02,\n \"name_on_card\": \"MARSHALL HU\",\n \"no_pin_payment_amount\": 100,\n \"spending_controls\": [\n {\n \"amount\": 100.03,\n \"interval\": \"PER_TRANSACTION\"\n }\n ],\n \"risk_controls\": {\n \"enable_3ds\": \"Y\",\n \"allow_3ds_transactions\": \"Y\",\n \"allowed_mcc\": null,\n \"blocked_mcc\": [\n \"5999\",\n \"6011\"\n ]\n },\n \"metadata\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n },\n \"card_art_id\": \"01KD52BKQWDMFF63R1NNQN7A79\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id}")
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>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"card_limit\": 2100.02,\n \"name_on_card\": \"MARSHALL HU\",\n \"no_pin_payment_amount\": 100,\n \"spending_controls\": [\n {\n \"amount\": 100.03,\n \"interval\": \"PER_TRANSACTION\"\n }\n ],\n \"risk_controls\": {\n \"enable_3ds\": \"Y\",\n \"allow_3ds_transactions\": \"Y\",\n \"allowed_mcc\": null,\n \"blocked_mcc\": [\n \"5999\",\n \"6011\"\n ]\n },\n \"metadata\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n },\n \"card_art_id\": \"01KD52BKQWDMFF63R1NNQN7A79\"\n}"
response = http.request(request)
puts response.read_body{
"card_id": "c0cef051-29c5-4796-b86a-cd5b684bfad7",
"card_order_id": "c0cef051-29c5-4796-b86a-cd5ee34bfad7",
"card_status": "ACTIVE",
"order_status": "SUCCESS"
}Card Lifecycle
Update Card
通过传入的参数值更新指定的签发卡片对象。未提供的参数保持不变。
POST
/
v1
/
issuing
/
cards
/
{id}
Update Card
curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id} \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"card_limit": 2100.02,
"name_on_card": "MARSHALL HU",
"no_pin_payment_amount": 100,
"spending_controls": [
{
"amount": 100.03,
"interval": "PER_TRANSACTION"
}
],
"risk_controls": {
"enable_3ds": "Y",
"allow_3ds_transactions": "Y",
"allowed_mcc": null,
"blocked_mcc": [
"5999",
"6011"
]
},
"metadata": {
"key1": "value1",
"key2": "value2"
},
"card_art_id": "01KD52BKQWDMFF63R1NNQN7A79"
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id}"
payload = {
"card_limit": 2100.02,
"name_on_card": "MARSHALL HU",
"no_pin_payment_amount": 100,
"spending_controls": [
{
"amount": 100.03,
"interval": "PER_TRANSACTION"
}
],
"risk_controls": {
"enable_3ds": "Y",
"allow_3ds_transactions": "Y",
"allowed_mcc": None,
"blocked_mcc": ["5999", "6011"]
},
"metadata": {
"key1": "value1",
"key2": "value2"
},
"card_art_id": "01KD52BKQWDMFF63R1NNQN7A79"
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
'x-auth-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
card_limit: 2100.02,
name_on_card: 'MARSHALL HU',
no_pin_payment_amount: 100,
spending_controls: [{amount: 100.03, interval: 'PER_TRANSACTION'}],
risk_controls: {
enable_3ds: 'Y',
allow_3ds_transactions: 'Y',
allowed_mcc: null,
blocked_mcc: ['5999', '6011']
},
metadata: {key1: 'value1', key2: 'value2'},
card_art_id: '01KD52BKQWDMFF63R1NNQN7A79'
})
};
fetch('https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{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/v1/issuing/cards/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'card_limit' => 2100.02,
'name_on_card' => 'MARSHALL HU',
'no_pin_payment_amount' => 100,
'spending_controls' => [
[
'amount' => 100.03,
'interval' => 'PER_TRANSACTION'
]
],
'risk_controls' => [
'enable_3ds' => 'Y',
'allow_3ds_transactions' => 'Y',
'allowed_mcc' => null,
'blocked_mcc' => [
'5999',
'6011'
]
],
'metadata' => [
'key1' => 'value1',
'key2' => 'value2'
],
'card_art_id' => '01KD52BKQWDMFF63R1NNQN7A79'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id}"
payload := strings.NewReader("{\n \"card_limit\": 2100.02,\n \"name_on_card\": \"MARSHALL HU\",\n \"no_pin_payment_amount\": 100,\n \"spending_controls\": [\n {\n \"amount\": 100.03,\n \"interval\": \"PER_TRANSACTION\"\n }\n ],\n \"risk_controls\": {\n \"enable_3ds\": \"Y\",\n \"allow_3ds_transactions\": \"Y\",\n \"allowed_mcc\": null,\n \"blocked_mcc\": [\n \"5999\",\n \"6011\"\n ]\n },\n \"metadata\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n },\n \"card_art_id\": \"01KD52BKQWDMFF63R1NNQN7A79\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("x-auth-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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}")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"card_limit\": 2100.02,\n \"name_on_card\": \"MARSHALL HU\",\n \"no_pin_payment_amount\": 100,\n \"spending_controls\": [\n {\n \"amount\": 100.03,\n \"interval\": \"PER_TRANSACTION\"\n }\n ],\n \"risk_controls\": {\n \"enable_3ds\": \"Y\",\n \"allow_3ds_transactions\": \"Y\",\n \"allowed_mcc\": null,\n \"blocked_mcc\": [\n \"5999\",\n \"6011\"\n ]\n },\n \"metadata\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n },\n \"card_art_id\": \"01KD52BKQWDMFF63R1NNQN7A79\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/{id}")
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>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"card_limit\": 2100.02,\n \"name_on_card\": \"MARSHALL HU\",\n \"no_pin_payment_amount\": 100,\n \"spending_controls\": [\n {\n \"amount\": 100.03,\n \"interval\": \"PER_TRANSACTION\"\n }\n ],\n \"risk_controls\": {\n \"enable_3ds\": \"Y\",\n \"allow_3ds_transactions\": \"Y\",\n \"allowed_mcc\": null,\n \"blocked_mcc\": [\n \"5999\",\n \"6011\"\n ]\n },\n \"metadata\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n },\n \"card_art_id\": \"01KD52BKQWDMFF63R1NNQN7A79\"\n}"
response = http.request(request)
puts response.read_body{
"card_id": "c0cef051-29c5-4796-b86a-cd5b684bfad7",
"card_order_id": "c0cef051-29c5-4796-b86a-cd5ee34bfad7",
"card_status": "ACTIVE",
"order_status": "SUCCESS"
}授权
由 UQPay 提供的登录 API Token。
请求头
指定代表哪个子账户发起请求。应设置为 account_id,该值可通过 List Connected Accounts 接口获取。若省略或为空,则请求以主账户身份执行。
更多信息参见 关联账户。
用于维持操作幂等性的唯一标识符(UUID),确保同一操作的重复执行不会产生意外影响或重复。它有助于在网络错误、重试或失败的情况下保持数据一致性。
路径参数
资源的全局唯一标识符(UUID v4)。
示例:
"71fdb0fe-9682-457a-9361-e8868694f12f"
请求体
application/json
分配给该卡片的总信用额度,币种参见 card_currency。这不是累计余额,而是类似信用卡的固定信用额度。
- 当卡片 mode_type 为
SINGLE时留空。
必填范围:
x >= 0示例:
2100.02
卡片上显示的持卡人姓名。当 Secure iFrame 渲染持卡人姓名(cardholder_name=true)时,此值作为默认值;若省略,iframe 回退到持卡人记录中的 first_name + last_name。
Maximum string length:
26示例:
"MARSHALL HU"
控制该卡片消费的规则。
Show child attributes
Show child attributes
任意键值对象。最大长度 = 3200 字节。必须是有效的 JSON 数据。
Show child attributes
Show child attributes
示例:
{ "key1": "value1", "key2": "value2" }
响应
200 - application/json
成功更新卡片。
卡片的唯一标识符。
示例:
"c0cef051-29c5-4796-b86a-cd5b684bfad7"
卡订单的 ID。
示例:
"c0cef051-29c5-4796-b86a-cd5ee34bfad7"
卡片状态枚举。更多信息参见卡生命周期与状态指南。
PENDING:创建卡片的请求已收到,正在审核中。ACTIVE:创建卡片的请求成功,卡片可以使用。FROZEN:所有进入的授权请求都将被拒绝。卡片可以重新激活以接受新的授权。BLOCKED:因可疑活动,卡片被 UQPAY 锁定。PRE_CANCEL:卡片已被安排注销,处于等待期,期间所有进入的授权请求都将被拒绝。等待期结束后转为CANCELLED。CANCELLED:卡片无法再从此状态重新激活,所有进入的授权请求都将被永久拒绝。LOST:卡片已向 UQPAY 报失。STOLEN:卡片已向 UQPAY 报被盗。FAILED:使用 创建卡片 创建卡片的请求失败。
可用选项:
PENDING, ACTIVE, FROZEN, BLOCKED, PRE_CANCEL, CANCELLED, LOST, STOLEN, FAILED 示例:
"ACTIVE"
此字段包含请求处理后的状态。
PENDING- 订单请求的初始状态。PROCESSING- 此状态将通过 webhooks 通知。SUCCESS- 订单请求的最终状态为成功。FAILED- 订单请求的最终状态为失败。
可用选项:
PENDING, PROCESSING, SUCCESS, FAILED 示例:
"SUCCESS"
⌘I

