Simulate Reversal
curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v1/simulation/issuing/reversal \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"transaction_id": "d110124a-069f-478f-9f49-5a92085b1d90"
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v1/simulation/issuing/reversal"
payload = { "transaction_id": "d110124a-069f-478f-9f49-5a92085b1d90" }
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({transaction_id: 'd110124a-069f-478f-9f49-5a92085b1d90'})
};
fetch('https://api-sandbox.uqpaytech.com/api/v1/simulation/issuing/reversal', 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/simulation/issuing/reversal",
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([
'transaction_id' => 'd110124a-069f-478f-9f49-5a92085b1d90'
]),
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/simulation/issuing/reversal"
payload := strings.NewReader("{\n \"transaction_id\": \"d110124a-069f-478f-9f49-5a92085b1d90\"\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/simulation/issuing/reversal")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transaction_id\": \"d110124a-069f-478f-9f49-5a92085b1d90\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v1/simulation/issuing/reversal")
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 \"transaction_id\": \"d110124a-069f-478f-9f49-5a92085b1d90\"\n}"
response = http.request(request)
puts response.read_body{
"authorization_code": "W6PPD7",
"billing_amount": "1",
"billing_currency": "SGD",
"card_available_balance": "1760.2",
"card_id": "e3577e62-5526-4284-a5b7-f718d83654ee",
"card_number": "************9892",
"cardholder_id": "3a1d3ce4-977b-4f1d-8076-8d2dd59e942c",
"failure_reason": "",
"merchant_data": {
"category_code": "5734",
"city": "",
"country": "",
"name": "Sandbox Contract Regression"
},
"origin_transaction_id": "d110124a-069f-478f-9f49-5a92085b1d90",
"posted_time": "2026-09-10T11:17:54.626009288+08:00",
"transaction_amount": "1",
"transaction_currency": "SGD",
"transaction_id": "2a05abbc-c4db-4fed-88ec-580afd0efa47",
"transaction_status": "APPROVED",
"transaction_time": "2026-09-10T11:17:54.626016332+08:00",
"transaction_type": "REVERSAL"
}Simulator
Simulate Reversal
模拟对一笔已通过授权的冲正。
POST
/
v1
/
simulation
/
issuing
/
reversal
Simulate Reversal
curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v1/simulation/issuing/reversal \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"transaction_id": "d110124a-069f-478f-9f49-5a92085b1d90"
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v1/simulation/issuing/reversal"
payload = { "transaction_id": "d110124a-069f-478f-9f49-5a92085b1d90" }
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({transaction_id: 'd110124a-069f-478f-9f49-5a92085b1d90'})
};
fetch('https://api-sandbox.uqpaytech.com/api/v1/simulation/issuing/reversal', 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/simulation/issuing/reversal",
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([
'transaction_id' => 'd110124a-069f-478f-9f49-5a92085b1d90'
]),
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/simulation/issuing/reversal"
payload := strings.NewReader("{\n \"transaction_id\": \"d110124a-069f-478f-9f49-5a92085b1d90\"\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/simulation/issuing/reversal")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transaction_id\": \"d110124a-069f-478f-9f49-5a92085b1d90\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v1/simulation/issuing/reversal")
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 \"transaction_id\": \"d110124a-069f-478f-9f49-5a92085b1d90\"\n}"
response = http.request(request)
puts response.read_body{
"authorization_code": "W6PPD7",
"billing_amount": "1",
"billing_currency": "SGD",
"card_available_balance": "1760.2",
"card_id": "e3577e62-5526-4284-a5b7-f718d83654ee",
"card_number": "************9892",
"cardholder_id": "3a1d3ce4-977b-4f1d-8076-8d2dd59e942c",
"failure_reason": "",
"merchant_data": {
"category_code": "5734",
"city": "",
"country": "",
"name": "Sandbox Contract Regression"
},
"origin_transaction_id": "d110124a-069f-478f-9f49-5a92085b1d90",
"posted_time": "2026-09-10T11:17:54.626009288+08:00",
"transaction_amount": "1",
"transaction_currency": "SGD",
"transaction_id": "2a05abbc-c4db-4fed-88ec-580afd0efa47",
"transaction_status": "APPROVED",
"transaction_time": "2026-09-10T11:17:54.626016332+08:00",
"transaction_type": "REVERSAL"
}授权
由 UQPAY 提供的登录 API Token。
请求头
指定代表哪个子账户发起请求。应设置为 account_id,该值可通过 List Connected Accounts 接口获取。若省略或为空,则请求以主账户身份执行。
更多信息参见 关联账户。
用于维持操作幂等性的唯一标识符(UUID),确保同一操作的重复执行不会产生意外影响或重复。它有助于在网络错误、重试或失败的情况下保持数据一致性。
请求体
application/json
你希望冲正的授权的交易 id。
示例:
"c0cef051-29c5-4796-b86a-cd5b684bfad7"
响应
200 - application/json
成功模拟冲正。
卡片的唯一标识符。
示例:
"c0cef051-29c5-4796-b86a-cd5b684bfad7"
脱敏卡号
示例:
"************5668"
持卡人的唯一标识符。
示例:
"7c4ff2cd-1bf6-4aaa-bf16-266771425011"
交易的唯一标识符。
示例:
"5135e6cc-28b6-4889-81dc-3b86a09e1395"
被模拟的交易类型。
可用选项:
AUTHORIZATION, REFUND, REVERSAL 示例:
"AUTHORIZATION"
卡片可用余额。
示例:
"2506.26"
授权码
示例:
"856268"
账单金额
示例:
"70.25"
账单币种
示例:
"SGD"
交易金额
示例:
"100.25"
交易币种
示例:
"USD"
交易发生时间
示例:
"2024-03-21T17:17:32+08:00"
交易失败原因。
示例:
"1107 - Invalid CVV2"
表示交易生命周期所处阶段的高层状态。
可用选项:
APPROVED, DECLINED 示例:
"APPROVED"
交易入账时间
示例:
"2024-03-21T17:17:32+08:00"
本次交易涉及的商户详情(如杂货店、电商网站等)。
Show child attributes
Show child attributes

