修改静态码扩展信息
curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v2/payment/static_qrs/{code_no} \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--header 'x-client-id: <x-client-id>' \
--data '
{
"extension": "without key"
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment/static_qrs/{code_no}"
payload = { "extension": "without key" }
headers = {
"x-client-id": "<x-client-id>",
"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-client-id': '<x-client-id>',
'x-auth-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({extension: 'without key'})
};
fetch('https://api-sandbox.uqpaytech.com/api/v2/payment/static_qrs/{code_no}', 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/static_qrs/{code_no}",
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([
'extension' => 'without key'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.uqpaytech.com/api/v2/payment/static_qrs/{code_no}"
payload := strings.NewReader("{\n \"extension\": \"without key\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-id", "<x-client-id>")
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/v2/payment/static_qrs/{code_no}")
.header("x-client-id", "<x-client-id>")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"extension\": \"without key\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v2/payment/static_qrs/{code_no}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-id"] = '<x-client-id>'
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"extension\": \"without key\"\n}"
response = http.request(request)
puts response.read_body{
"code_no": "D5610f5e1",
"status": "SUCCEEDED",
"payment_methods": [
"ALIPAY"
],
"currency": "SGD",
"amount_mode": "DYNAMIC",
"amount": null,
"store_name": "Docs Test",
"city": "Singapore",
"extension": "without key",
"create_time": "2026-10-28T10:18:45+08:00",
"updated_time": "2026-10-28T10:18:52+08:00"
}{
"code": "<string>",
"message": "<string>",
"type": "static_qr_error"
}{
"code": "STATIC_QR_NOT_FOUND",
"message": "The requested static QR resource or endpoint was not found.",
"type": "static_qr_error"
}Static QR Codes
修改静态码扩展信息
仅替换 extension。此操作不能修改支付方式、币种、金额模式或金额。不要求幂等键,也不会按幂等键回放先前的更新。
POST
/
v2
/
payment
/
static_qrs
/
{code_no}
修改静态码扩展信息
curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v2/payment/static_qrs/{code_no} \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--header 'x-client-id: <x-client-id>' \
--data '
{
"extension": "without key"
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment/static_qrs/{code_no}"
payload = { "extension": "without key" }
headers = {
"x-client-id": "<x-client-id>",
"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-client-id': '<x-client-id>',
'x-auth-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({extension: 'without key'})
};
fetch('https://api-sandbox.uqpaytech.com/api/v2/payment/static_qrs/{code_no}', 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/static_qrs/{code_no}",
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([
'extension' => 'without key'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.uqpaytech.com/api/v2/payment/static_qrs/{code_no}"
payload := strings.NewReader("{\n \"extension\": \"without key\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-id", "<x-client-id>")
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/v2/payment/static_qrs/{code_no}")
.header("x-client-id", "<x-client-id>")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"extension\": \"without key\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v2/payment/static_qrs/{code_no}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-id"] = '<x-client-id>'
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"extension\": \"without key\"\n}"
response = http.request(request)
puts response.read_body{
"code_no": "D5610f5e1",
"status": "SUCCEEDED",
"payment_methods": [
"ALIPAY"
],
"currency": "SGD",
"amount_mode": "DYNAMIC",
"amount": null,
"store_name": "Docs Test",
"city": "Singapore",
"extension": "without key",
"create_time": "2026-10-28T10:18:45+08:00",
"updated_time": "2026-10-28T10:18:52+08:00"
}{
"code": "<string>",
"message": "<string>",
"type": "static_qr_error"
}{
"code": "STATIC_QR_NOT_FOUND",
"message": "The requested static QR resource or endpoint was not found.",
"type": "static_qr_error"
}授权
UQPAY 提供的登录 API Token。
请求头
UQPAY 生成的 API 客户端 ID
要操作的已授权关联子账户。省略或传空值时使用凭证账户。同一码的所有操作应使用相同目标账户。不要将凭证账户 ID 显式作为子账户传入。
路径参数
区分大小写的码牌号,须保留前导零。历史码牌号可能超过新建码的长度限制。
Required string length:
1 - 64Pattern:
^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$请求体
application/json
响应
请求已处理,资源状态需单独判断。
码的创建状态,不是付款状态。INITIATED 表示已开始创建,SUCCEEDED 表示码已创建。
此码关联的支付方式。 付款通知的 data.payment_method.type 表示本次交易实际使用的单一支付方式,不回传此数组。
可用选项:
ALIPAY, WECHAT, PAYNOW, UNIONPAY 此码收款使用的币种。 付款通知的 data.currency 表示单笔交易的币种。
FIXED 使用指定金额;DYNAMIC 由付款人输入金额。
可用选项:
FIXED, DYNAMIC 以主货币单位表示的固定付款金额;DYNAMIC 模式下为 null。响应的小数位数可能与创建请求不同。 对账时读取付款通知中的单笔交易金额 data.amount,不要使用 DYNAMIC 静态码的 null 金额。
此码关联的门店名称。
此码关联的城市。
带时区偏移的创建时间。
最近更新时间;无更新时间时为 null。

