API
创建支付
此 API 方法允许您通过 Pay2.House 支付服务初始化一笔新的支付。
| 参数 | 类型 | 描述 |
|---|---|---|
| external_number | string | 唯一的交易号或订单号。 |
| amount | number | 支付或交易金额。 |
| currency_code | string | 支付货币代码(例如,USD 表示美元,EUR 表示欧元,USDT 表示 Tether)。 |
| merchant_id | string | 您已添加的商户标识符(Merchant ID)。 |
| description | string | 支付或交易描述。 |
| deadline_seconds | number | 设置支付的付款时间间隔,单位为秒(例如,600 表示 10 分钟的付款期限)。最大值为 86400 秒(1 天)。 |
| return_url | string | 支付成功完成后应将客户返回到的 URL 地址。 |
| cancel_url | string | 支付取消时应将客户返回到的 URL 地址。 |
| handling_fee | number | 额外支付手续费。 |
| payer_email | string | 与支付交易关联的客户电子邮箱。 |
| payment_method | string | 此交易使用的支付方式。可用方式:“PAY2_HOUSE”、“USDT_TRC20”、“CARDS”。默认值为“ALL”,表示客户可以自行选择支付方式。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| invoice_number | string | 系统中用于识别支付交易的唯一发票号。 |
| approval_url | string | 必须将客户重定向到此 URL 链接以完成支付。 |
<?php
function create_payment($request_body = [])
{
$curl = curl_init('https://pay2.house/api/create_payment');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'external_number' => '10001',
'amount' => 1000,
'currency_code' => 'USD',
'payment_method' => 'ALL',
'merchant_id' => 'SN6829106944',
'description' => 'Payment for Merchant.Name',
'deadline_seconds' => 600,
'handling_fee' => 10,
'payer_email' => '[email protected]',
'return_url' => 'https://mysite.com/result',
'cancel_url' => 'https://mysite.com/cancel',
]);
$api_response = create_payment(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['approval_url'])) {
header('Location: ' . $api_response['approval_url'], TRUE, 302);
}
?>
支付信息
此 API 方法允许您在 Pay2.House 支付系统中查询您的支付信息。
| 参数 | 类型 | 描述 |
|---|---|---|
| merchant_id | string | 您已添加的商户标识符(Merchant ID)。 |
| invoice_number | string | 您的发票号。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| invoice_number | string | 系统中用于识别支付交易的唯一发票号。 |
| currency_code | string | 支付货币代码(例如,USD 表示美元,EUR 表示欧元,USDT 表示 Tether)。 |
| currency_symbol | string | 货币符号(例如,"$" 表示美元)。 |
| external_number | string | 与支付交易关联的外部编号。 |
| description | string | 支付交易或发票的描述。 |
| amount | number | 指定货币中的支付金额。 |
| handling_fee | number | 支付处理手续费金额。 |
| payment_status | string |
支付状态。 等待付款:pending 处理中:in_processing 已支付:paid 已取消:cancelled 已过期:overdue 部分支付:partially 支付错误:error 退款:refunded |
<?php
function show_payment_details($request_body = [])
{
$curl = curl_init('https://pay2.house/api/show_payment_details');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'merchant_id' => 'SN6829106938',
'invoice_number' => 'IN9036982986'
]);
$api_response = show_payment_details(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Amount: ' . $api_response['amount'] . '<br />';
echo 'Fee: ' . $api_response['handling_fee'] . '<br />';
echo 'Currency Code: ' . $api_response['currency_code'] . '<br />';
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
创建转账
此 API 方法允许您在 Pay2.House 系统中初始化一笔转入内部账户的新转账。
| 参数 | 类型 | 描述 |
|---|---|---|
| sender_account | string | 发送方账户。 |
| recipient_account | string | 接收方账户。 |
| amount | number | 转账金额。 |
| comment | string | 转账备注。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| transaction_number | string | 唯一转账编号。 |
<?php
function transfer_create($request_body = [])
{
$curl = curl_init('https://pay2.house/api/transfers/create');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'sender_account' => 'P2U49984694',
'recipient_account' => 'P2U93380055',
'amount' => 50,
'comment' => 'Transfer of funds to the client\'s account.'
]);
$api_response = transfer_create(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Payment successfully processed.';
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
转账信息
此 API 方法允许您获取转账的详细信息,包括状态、金额、执行日期和时间,以及其他相关数据。
| 参数 | 类型 | 描述 |
|---|---|---|
| transaction_number | string | 用于识别特定转账的唯一交易编号。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| transaction_number | string | 唯一交易编号。 |
| time_created | number | 交易创建时间,Unix timestamp 格式。 |
| date_created | string | 交易创建日期,YYYY-MM-DD 格式。 |
| sender_account | string | 资金发送方账户号码。 |
| recipient_account | string | 资金接收方账户号码。 |
| amount | number | 交易中转账的金额。 |
| fee_amount | number | 交易收取的手续费金额。 |
| currency_code | string | 交易货币代码(例如,USD 表示美元,EUR 表示欧元,USDT 表示 Tether)。 |
| payment_method | string |
此交易使用的支付方式。 Pay2.House: house_money Push.House: push_house Cloaking.House: cloaking_house Capitalist.Net: capitalist Virtual Card Pay: virtual_card Visa Card Pay: visa Tether USDT: tether SWIFT: swift |
| confirm_method | string |
交易确认方式。 短信确认:verification_phone Google Authenticator:verification_code API 确认:verification_api 无需确认:none |
| payment_type | string |
支付类型。 内部转账:transfer 账户充值:refill 货币兑换:exchange 开具发票:invoice Merchant API:merchant |
| transaction_type | string | 交易类型(incoming - 入账,withdrawal - 扣款)。 |
| transaction_status | string |
交易状态。 处理中:in_processing 已确认:confirmed 错误:error |
| comment | string | 交易的附加信息。 |
| error_message | string | 如果交易失败,则显示错误消息。 |
<?php
function transfer_details($request_body = [])
{
$curl = curl_init('https://pay2.house/api/transfers/details');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'transaction_number' => 'TN4395601712'
]);
$api_response = transfer_details(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Transaction Number: ' . $api_response['transaction_number'] . '<br />';
echo 'Status: ' . $api_response['transaction_status'] . '<br />';
echo 'Time Created: ' . $api_response['time_created'] . '<br />';
echo 'Date Created: ' . $api_response['date_created'] . '<br />';
echo 'Sender Account: ' . $api_response['sender_account'] . '<br />';
echo 'Recipient Account: ' . $api_response['recipient_account'] . '<br />';
echo 'Amount: ' . $api_response['amount'] . '<br />';
echo 'Fee Amount: ' . $api_response['fee_amount'] . '<br />';
echo 'Currency Code: ' . $api_response['currency_code'] . '<br />';
echo 'Payment Method: ' . $api_response['payment_method'] . '<br />';
echo 'Confirm Method: ' . $api_response['confirm_method'] . '<br />';
echo 'Payment Type: ' . $api_response['payment_type'] . '<br />';
echo 'Transaction Type: ' . $api_response['transaction_type'] . '<br />';
echo 'Comment: ' . $api_response['comment'] . '<br />';
echo 'Error Message: ' . $api_response['error_message'] . '<br />';
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
转账历史
此 API 方法允许您请求交易列表,提供所有已完成转账的信息。
| 参数 | 类型 | 描述 |
|---|---|---|
| per_page | number | 每页显示的记录数量。 |
| page | number | 分页页码。 |
| transaction_type | string | 按交易类型过滤(incoming - 入账,withdrawal - 扣款)。 |
| status | string |
按交易状态过滤。 处理中:in_processing 已确认:confirmed 错误:error |
| date_range | string | 按日期范围筛选的过滤器(格式为 DD.MM.YYYY - DD.MM.YYYY),也用于过滤。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| count | number | 符合请求的交易总数。 |
| transactions | array |
交易对象数组,包含每笔交易的信息(例如标识符、状态、余额等)。 请参阅 转账信息 部分中所有字段的说明。 |
<?php
function get_transfers($request_body = [])
{
$curl = curl_init('https://pay2.house/api/transfers');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'per_page' => 10,
'page' => 1,
'status' => 'confirmed'
]);
$api_response = get_transfers(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Count Transactions: ' . $api_response['count'] . '<br />';
if ( ! empty($api_response['transactions'])) {
foreach($api_response['transactions'] AS $item) {
echo '----------------------------------------';
echo 'Transaction Number: ' . $item['transaction_number'] . '<br />';
echo 'Status: ' . $item['transaction_status'] . '<br />';
echo 'Time Created: ' . $item['time_created'] . '<br />';
echo 'Date Created: ' . $item['date_created'] . '<br />';
echo 'Sender Account: ' . $item['sender_account'] . '<br />';
echo 'Recipient Account: ' . $item['recipient_account'] . '<br />';
echo 'Amount: ' . $item['amount'] . '<br />';
echo 'Fee Amount: ' . $item['fee_amount'] . '<br />';
echo 'Currency Code: ' . $item['currency_code'] . '<br />';
echo 'Payment Method: ' . $item['payment_method'] . '<br />';
echo 'Confirm Method: ' . $item['confirm_method'] . '<br />';
echo 'Payment Type: ' . $item['payment_type'] . '<br />';
echo 'Transaction Type: ' . $item['transaction_type'] . '<br />';
echo 'Comment: ' . $item['comment'] . '<br />';
echo 'Error Message: ' . $item['error_message'] . '<br />';
echo '----------------------------------------';
echo '<br />';
}
} else {
echo 'No Transactions Found.';
}
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
获取账户列表
此 API 方法允许您请求 Pay2.House 系统中与您的账户关联的所有账户列表。
| 参数 | 类型 | 描述 |
|---|---|---|
| delete_flag | number | 账户删除标志。值 0 表示活跃账户,值 1 表示已删除或已冻结账户。 |
| currency_code | string | 用于过滤账户的货币代码(例如,"USD" 表示美元,"EUR" 表示欧元,"USDT" 表示 Tether)。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| count | number | 符合请求的账户总数。 |
| wallets | array |
账户对象数组,包含每个账户的信息(例如标识符、状态、余额等)。 请参阅 账户信息 部分中所有字段的说明。 |
<?php
function get_wallets($request_body = [])
{
$curl = curl_init('https://pay2.house/api/wallets');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'delete_flag' => 0,
'currency_code' => 'USD'
]);
$api_response = get_wallets(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Count Wallets: ' . $api_response['count'] . '<br />';
if ( ! empty($api_response['wallets'])) {
foreach($api_response['wallets'] AS $item) {
echo '----------------------------------------';
echo 'Account Number: ' . $item['account_number'] . '<br />';
echo 'Name: ' . $item['name'] . '<br />';
echo 'Time Created: ' . $item['time_created'] . '<br />';
echo 'Date Created: ' . $item['date_created'] . '<br />';
echo 'Balance: ' . $item['balance'] . '<br />';
echo 'Bonus: ' . $item['bonus'] . '<br />';
echo 'Currency Code: ' . $item['currency_code'] . '<br />';
echo 'Currency Symbol: ' . $item['currency_symbol'] . '<br />';
echo 'Address TRC20: ' . $item['trc20_address'] . '<br />';
echo '----------------------------------------';
echo '<br />';
}
} else {
echo 'No Wallets Found.';
}
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
创建账户
此 API 方法允许您创建唯一账户,可用于 Pay2.House 系统内的支付和交易。
| 参数 | 类型 | 描述 |
|---|---|---|
| name | string | 账户名称。 |
| currency_code | string | 支付货币代码(例如,USD 表示美元,EUR 表示欧元,USDT 表示 Tether)。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| account_number | string | 已创建的账户号码。 |
<?php
function wallet_create($request_body = [])
{
$curl = curl_init('https://pay2.house/api/wallets/create');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'name' => 'Your Wallet Name',
'currency_code' => 'USD'
]);
$api_response = wallet_create(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Wallet created successfully.';
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
账户信息
此 API 方法允许您在 Pay2.House 支付系统中查询您的账户信息。
| 参数 | 类型 | 描述 |
|---|---|---|
| account_number | string | 您的账户号码。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| time_created | number | 账户创建时间,Unix timestamp 格式。 |
| date_created | string | 账户创建日期,YYYY-MM-DD 格式。 |
| delete_flag | number | 删除标志(0 — 未删除,1 — 已删除)。 |
| account_number | string | 账户号码。 |
| currency_code | string | 账户货币代码(例如,USD 表示美元,EUR 表示欧元,USDT 表示 Tether)。 |
| currency_symbol | string | 货币符号(例如,"$" 表示美元)。 |
| name | string | 账户名称。 |
| balance | number | 账户当前余额。 |
| bonus | number | 账户中可用的奖金资金金额,如适用。 |
| trc20_address | string | 代币的 TRC-20 地址,如适用。 |
<?php
function wallet_details($request_body = [])
{
$curl = curl_init('https://pay2.house/api/wallets/details');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'account_number' => 'P2U49984694'
]);
$api_response = wallet_details(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Account Number: ' . $api_response['account_number'] . '<br />';
echo 'Name: ' . $api_response['name'] . '<br />';
echo 'Time Created: ' . $api_response['time_created'] . '<br />';
echo 'Date Created: ' . $api_response['date_created'] . '<br />';
echo 'Balance: ' . $api_response['balance'] . '<br />';
echo 'Bonus: ' . $api_response['bonus'] . '<br />';
echo 'Currency Code: ' . $api_response['currency_code'] . '<br />';
echo 'Currency Symbol: ' . $api_response['currency_symbol'] . '<br />';
echo 'Address TRC20: ' . $api_response['trc20_address'] . '<br />';
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
获取账户流水
此 API 方法允许您获取所选账户的详细流水,包括所有交易和余额变动信息。
| 参数 | 类型 | 描述 |
|---|---|---|
| account_number | string | 您的账户号码。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| download_url | string | 用于下载 CSV 格式账户流水文件的 URL。 |
<?php
function wallet_statement($request_body = [])
{
$curl = curl_init('https://pay2.house/api/wallets/statement');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'account_number' => 'P2U49984694'
]);
$api_response = wallet_statement(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
header('Location: ' . $api_response['download_url'], TRUE, 302);
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
获取 BIN 列表
此 API 方法允许您获取 Pay2.House 系统中可用于发行虚拟卡的 BIN 列表。
| 参数 | 类型 | 描述 |
|---|---|---|
| currency_code | string | BIN 货币代码(例如 USD、EUR)。 |
| country_code | string | BIN 国家/地区代码,ISO 3166-1 alpha-2 格式(例如 US、HK)。 |
| card_type | string |
卡片类型。 虚拟卡:virtual 实体卡:physical |
| card_network | string |
支付系统。 Visa:visa MasterCard:mastercard |
| card_product_type | string |
卡片产品类型。 个人:personal 标准:standard |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| count | number | 符合请求的 BIN 总数。 |
| bins | array | BIN 对象数组,包含每个 BIN 的信息。 |
| bin | string | 银行识别号。 |
| currency_code | string | BIN 货币代码(例如 USD、EUR)。 |
| country_code | string | BIN 国家/地区代码,ISO 3166-1 alpha-2 格式(例如 US、HK)。 |
| card_type | string | 支付系统(例如 visa、mastercard)。 |
| card_product_type | string | 卡片产品类型(例如 standard、personal)。 |
| card_tier | string | 卡片等级(例如 premium、shared)。 |
| verification_required | number | 是否需要验证(1 — 是,0 — 否)。 |
<?php
function cards_bins($request_body = [])
{
$curl = curl_init('https://pay2.house/api/cards/bins');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'currency_code' => 'USD',
'country_code' => 'HK',
'card_type' => 'virtual',
'card_network' => 'mastercard',
'card_product_type' => 'standard',
]);
$api_response = cards_bins(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Count Bins: ' . $api_response['count'] . '<br />';
if ( ! empty($api_response['bins'])) {
foreach($api_response['bins'] AS $item) {
echo 'BIN: ' . $item['bin'] . '<br />';
echo 'Currency Code: ' . $item['currency_code'] . '<br />';
echo 'Country Code: ' . $item['country_code'] . '<br />';
echo 'Card Type: ' . $item['card_type'] . '<br />';
echo 'Card Network: ' . $item['card_network'] . '<br />';
echo 'Card Product Type: ' . $item['card_product_type'] . '<br />';
echo 'Card Tier: ' . $item['card_tier'] . '<br />';
echo '3DS Support: ' . $item['is_3ds_supported'] . '<br />';
echo 'Verification Required: ' . $item['verification_required'] . '<br />';
echo '----------------------------------------';
echo '<br />';
}
} else {
echo 'No Bins Found.';
}
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
获取卡片列表
此 API 方法允许您请求 Pay2.House 系统中为您的账户发行的虚拟卡列表。
| 参数 | 类型 | 描述 |
|---|---|---|
| per_page | number | 每页显示的记录数量。 |
| page | number | 分页页码。 |
| status | string |
按卡片状态过滤。 活跃:active 已冻结:blocked 已关闭:closed 等待发行:awaiting |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| count | number | 符合请求的卡片总数。 |
| cards | array |
卡片对象数组,包含每张卡片的信息(例如标识符、状态、余额等)。 请参阅 卡片信息 部分中所有字段的说明。 |
<?php
function get_cards($request_body = [])
{
$curl = curl_init('https://pay2.house/api/cards');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'per_page' => 10,
'page' => 1,
'status' => 'active'
]);
$api_response = get_cards(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Count Cards: ' . $api_response['count'] . '<br />';
if ( ! empty($api_response['cards'])) {
foreach($api_response['cards'] AS $item) {
echo '----------------------------------------';
echo 'Card Name: ' . $item['card_name'] . '<br />';
echo 'Card Number: ' . $item['card_number'] . '<br />';
echo 'Card ID: ' . $item['card_id'] . '<br />';
echo 'CVV: ' . $item['cvv'] . '<br />';
echo 'Expire Date: ' . $item['expiration_date'] . '<br />';
echo '3DS Password: ' . $item['password'] . '<br />';
echo 'Currency Code: ' . $item['currency_code'] . '<br />';
echo 'Currency Symbol: ' . $item['currency_symbol'] . '<br />';
echo 'Time Created: ' . $item['time_created'] . '<br />';
echo 'Date Created: ' . $item['date_created'] . '<br />';
echo 'Time Renewal: ' . $item['time_renewal'] . '<br />';
echo 'Date Renewal: ' . $item['date_renewal'] . '<br />';
echo 'Email: ' . $item['email'] . '<br />';
echo 'Phone Number: ' . $item['phone_number'] . '<br />';
echo 'Address Line 1: ' . $item['address_line_1'] . '<br />';
echo 'City: ' . $item['city'] . '<br />';
echo 'Country Code: ' . $item['country_code'] . '<br />';
echo 'Post Code: ' . $item['post_code'] . '<br />';
echo 'First Name: ' . $item['first_name'] . '<br />';
echo 'Last Name: ' . $item['last_name'] . '<br />';
echo 'Sur Name: ' . $item['sur_name'] . '<br />';
echo 'Date Birth: ' . $item['date_birth'] . '<br />';
echo 'Card Status: ' . $item['card_status'] . '<br />';
echo 'Balance: ' . $item['balance'] . '<br />';
echo 'Issuance Cost: ' . $item['issuance_cost'] . '<br />';
echo 'Renewal Cost: ' . $item['renewal_cost'] . '<br />';
echo 'Recharge Cost: ' . $item['recharge_cost'] . '<br />';
echo 'Recharge Type: ' . $item['recharge_type'] . '<br />';
echo 'Account Refund Cost: ' . $item['account_refund_cost'] . '<br />';
echo 'Account Refund Type: ' . $item['account_refund_type'] . '<br />';
echo 'Refund Min Amount: ' . $item['refund_min_amount'] . '<br />';
echo 'Min Recharge Amount: ' . $item['min_recharge_amount'] . '<br />';
echo 'Max Recharge Amount: ' . $item['max_recharge_amount'] . '<br />';
echo 'Block Status: ' . $item['block_status'] . '<br />';
echo 'Time Blocked: ' . $item['time_blocked'] . '<br />';
echo 'Date Blocked: ' . $item['date_blocked'] . '<br />';
echo '----------------------------------------';
echo '<br />';
}
} else {
echo 'No Cards Found.';
}
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
发行卡片
此 API 方法允许您在 Pay2.House 系统中发行一张新的虚拟卡。
| 参数 | 类型 | 描述 |
|---|---|---|
| account_number | string | 您的账户号码,卡片发行费用将从该账户扣除。 |
| first_name | string | 持卡人名字。 |
| last_name | string | 持卡人姓氏。 |
| sur_name | string | 持卡人中间名。 |
| date_birth | string | 持卡人出生日期,格式为 DD.MM.YYYY。 |
| phone_number | string | 持卡人电话号码,包括国家代码。 |
| address | string | 持卡人居住地址。 |
| city | string | 持卡人居住城市。 |
| region | string | 持卡人居住地区或州/省。 |
| post_code | string | 居住地址的邮政编码。 |
| string | 持卡人电子邮箱。 | |
| country_code | string | 符合 ISO 3166-1 alpha-2 标准的国家代码(例如,"US" 表示美国)。 |
| bin_number | string | 卡片的银行识别号(BIN)。需要通过技术支持工单申请。 |
| renewal_payment_flag | number | 此标志表示当卡片余额不足时,是否可以从 Pay2.House 主账户扣除卡片续费资金(1 - 是,0 - 否)。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| card_number | string | 已发行的卡号。 |
| card_id | string | 系统中唯一的卡片标识符,用于后续操作。 |
<?php
function card_issue($request_body = [])
{
$curl = curl_init('https://pay2.house/api/cards/issue');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'account_number' => 'P2U48633413',
'first_name' => 'John',
'last_name' => 'Doe',
'sur_name' => 'Smith',
'date_birth' => '01.01.1991',
'phone_number' => '+380990000000',
'address' => 'Kyiv, Ukraine',
'city' => 'Kyiv',
'region' => 'Kyiv',
'country_code' => 'UA',
'post_code' => '01001',
'email' => '[email protected]',
'bin_number' => '1122334455667788',
]);
$api_response = card_issue(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Card Number: ' . $api_response['card_number'] . '<br />';
echo 'Card ID: ' . $api_response['card_id'] . '<br />';
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
卡片信息
此 API 方法允许您获取虚拟卡的详细信息,包括卡号、状态、发行日期以及其他相关数据。
| 参数 | 类型 | 描述 |
|---|---|---|
| card_id | string | 系统中唯一的卡片标识符,用于获取其详细信息。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| card_name | string | 发行时指定的卡片名称。 |
| card_number | string | 已发行的卡号。 |
| card_id | string | 系统中唯一的卡片标识符。 |
| cvv | string | 授权所需的卡片安全码。 |
| expiration_date | string | 卡片到期日期,格式为 MM/YY。 |
| password | string | 用于在线交易额外安全验证的 3DS 密码。 |
| currency_code | string | 用于卡片操作的货币代码。 |
| currency_symbol | string | 货币符号(例如:$ 或 €)。 |
| time_created | number | 卡片创建时间,Unix timestamp 格式。 |
| date_created | string | 卡片创建日期,YYYY-MM-DD 格式。 |
| date_renewal | string | 下一次卡片续费扣款日期,YYYY-MM-DD 格式。 |
| time_renewal | number | 下一次卡片续费扣款时间,Unix timestamp 格式。 |
| string | 发行卡片时指定的电子邮箱地址。 | |
| phone_number | string | 发行卡片时指定的电话号码。 |
| address_line_1 | string | 发行卡片时指定的居住地址。 |
| city | string | 发行卡片时指定的居住城市。 |
| country_code | string | 符合 ISO 3166-1 alpha-2 标准的国家代码(例如,"US" 表示美国)。 |
| first_name | string | 卡片所有者名字。 |
| last_name | string | 卡片所有者姓氏。 |
| sur_name | string | 卡片所有者中间名。 |
| date_birth | string | 卡片所有者出生日期,格式为 DD.MM.YYYY。 |
| post_code | string | 邮政编码。 |
| card_status | string |
卡片状态。 活跃:active 已冻结:blocked 已关闭:closed 等待发行:awaiting |
| balance | number | 卡片当前余额。 |
| issuance_cost | number | 卡片发行费用。 |
| renewal_cost | number | 卡片续费费用。 |
| recharge_cost | number | 卡片充值手续费。 |
| recharge_type | string | 卡片充值手续费类型(可以是 "fixed" 固定手续费,或 "percent" 百分比手续费)。手续费值取自 recharge_cost 参数。 |
| account_refund_cost | number | 卡片退款手续费。 |
| account_refund_type | string | 卡片退款手续费类型(可以是 "fixed" 固定手续费,或 "percent" 百分比手续费)。手续费值取自 account_refund_cost 参数。 |
| refund_min_amount | number | 卡片退款的最低金额。 |
| min_recharge_amount | number | 卡片充值的最低金额。 |
| max_recharge_amount | number | 卡片充值的最高金额。 |
| block_status | string |
卡片冻结状态。 可能的值可在 卡片冻结状态 部分找到。 |
| date_blocked | string | 卡片冻结日期,YYYY-MM-DD 格式。 |
| time_blocked | number | 卡片冻结时间,Unix timestamp 格式。 |
<?php
function card_details($request_body = [])
{
$curl = curl_init('https://pay2.house/api/cards/details');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'card_id' => 'VC7914059264'
]);
$api_response = card_details(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Card Name: ' . $api_response['card_name'] . '<br />';
echo 'Card Number: ' . $api_response['card_number'] . '<br />';
echo 'Card ID: ' . $api_response['card_id'] . '<br />';
echo 'CVV: ' . $api_response['cvv'] . '<br />';
echo 'Expire Date: ' . $api_response['expiration_date'] . '<br />';
echo '3DS Password: ' . $api_response['password'] . '<br />';
echo 'Currency Code: ' . $api_response['currency_code'] . '<br />';
echo 'Currency Symbol: ' . $api_response['currency_symbol'] . '<br />';
echo 'Time Created: ' . $api_response['time_created'] . '<br />';
echo 'Date Created: ' . $api_response['date_created'] . '<br />';
echo 'Time Renewal: ' . $api_response['time_renewal'] . '<br />';
echo 'Date Renewal: ' . $api_response['date_renewal'] . '<br />';
echo 'Email: ' . $api_response['email'] . '<br />';
echo 'Phone Number: ' . $api_response['phone_number'] . '<br />';
echo 'Address Line 1: ' . $api_response['address_line_1'] . '<br />';
echo 'City: ' . $api_response['city'] . '<br />';
echo 'Country Code: ' . $api_response['country_code'] . '<br />';
echo 'Post Code: ' . $api_response['post_code'] . '<br />';
echo 'First Name: ' . $api_response['first_name'] . '<br />';
echo 'Last Name: ' . $api_response['last_name'] . '<br />';
echo 'Sur Name: ' . $api_response['sur_name'] . '<br />';
echo 'Date Birth: ' . $api_response['date_birth'] . '<br />';
echo 'Card Status: ' . $api_response['card_status'] . '<br />';
echo 'Balance: ' . $api_response['balance'] . '<br />';
echo 'Issuance Cost: ' . $api_response['issuance_cost'] . '<br />';
echo 'Renewal Cost: ' . $api_response['renewal_cost'] . '<br />';
echo 'Recharge Cost: ' . $api_response['recharge_cost'] . '<br />';
echo 'Recharge Type: ' . $api_response['recharge_type'] . '<br />';
echo 'Account Refund Cost: ' . $api_response['account_refund_cost'] . '<br />';
echo 'Account Refund Type: ' . $api_response['account_refund_type'] . '<br />';
echo 'Refund Min Amount: ' . $api_response['refund_min_amount'] . '<br />';
echo 'Min Recharge Amount: ' . $api_response['min_recharge_amount'] . '<br />';
echo 'Max Recharge Amount: ' . $api_response['max_recharge_amount'] . '<br />';
echo 'Block Status: ' . $api_response['block_status'] . '<br />';
echo 'Time Blocked: ' . $api_response['time_blocked'] . '<br />';
echo 'Date Blocked: ' . $api_response['date_blocked'] . '<br />';
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
重命名卡片
此 API 方法允许您在 Pay2.House 系统中更改虚拟卡的名称。
| 参数 | 类型 | 描述 |
|---|---|---|
| card_id | string | 系统中唯一的卡片标识符,用于获取其详细信息。 |
| name | string | 虚拟卡的新名称。最大长度为 100 个字符。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| card_name | string | 更改后的虚拟卡名称。 |
<?php
function card_rename($request_body = [])
{
$curl = curl_init('https://pay2.house/api/cards/rename');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'card_id' => 'VC7914059264',
'name' => 'New Card Name'
]);
$api_response = card_rename(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Card Name: ' . $api_response['card_name'] . '<br />';
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
卡片充值
此 API 方法允许您使用内部账户为虚拟卡余额充值。
充值请求创建后,资金将在 2-3 分钟内到账至卡片。
| 参数 | 类型 | 描述 |
|---|---|---|
| card_id | string | 您要充值的虚拟卡标识符。 |
| account_number | string | 您的内部账户号码,充值金额将从该账户扣除。 |
| amount | number | 您要存入虚拟卡的金额。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| transaction_number | string | 与卡片充值关联的交易编号。 |
<?php
function card_top_up($request_body = [])
{
$curl = curl_init('https://pay2.house/api/cards/top_up');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'card_id' => 'VC7914059264',
'account_number' => 'P2U48633413',
'amount' => 50
]);
$api_response = card_top_up(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Transaction Number: ' . $api_response['transaction_number'] . '<br />';
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
卡片退款
此 API 方法允许您发起从虚拟卡到内部账户的退款。
资金将退回到发行该卡片时所使用的同一账户。
您将收到扣除退款手续费后的金额,手续费按卡片资费计算。
例如,如果您退款 $10,退款手续费为 3%,则 $10 × 3% = $0.30 将作为手续费扣除,您的账户将入账 $9.70。
| 参数 | 类型 | 描述 |
|---|---|---|
| card_id | string | 执行退款的卡片唯一标识符。 |
| amount | number | 需要转入内部账户的退款金额。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| transaction_number | string | 与已完成卡片退款关联的唯一交易编号。 |
<?php
function card_refund($request_body = [])
{
$curl = curl_init('https://pay2.house/api/cards/refund');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'card_id' => 'VC7914059264',
'amount' => 10
]);
$api_response = card_refund(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Transaction Number: ' . $api_response['transaction_number'] . '<br />';
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
卡片操作历史
此 API 方法提供对您的虚拟卡全部操作列表的访问。
| 参数 | 类型 | 描述 |
|---|---|---|
| card_id | string | 您要获取操作历史的虚拟卡唯一标识符。 |
| per_page | number | 每页显示的记录数量。 |
| page | number | 分页页码。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| count | number | 该卡片操作历史中的交易总数。 |
| transactions | array | 对象列表,包含每笔交易的详细信息,包括日期、金额和操作类型。 |
<?php
function cards_history($request_body = [])
{
$curl = curl_init('https://pay2.house/api/cards/history');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'card_id' => 'VC7914059264',
'per_page' => 10,
'page' => 3
]);
$api_response = cards_history(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Count Transactions: ' . $api_response['count'] . '<br />';
if ( ! empty($api_response['transactions'])) {
foreach($api_response['transactions'] AS $item) {
echo 'Transaction Time: ' . $item['transaction_time'] . '<br />';
echo 'Transaction Number: ' . $item['transaction_number'] . '<br />';
echo 'Status: ' . $item['status'] . '<br />';
echo 'Type: ' . $item['type'] . '<br />';
echo 'Transaction Amount: ' . $item['transaction_amount'] . '<br />';
echo 'Transaction Currency Code: ' . $item['transaction_currency_code'] . '<br />';
echo 'Account Amount: ' . $item['account_amount'] . '<br />';
echo 'Account Currency Code: ' . $item['account_currency_code'] . '<br />';
echo 'Merchant Name: ' . $item['merchant_name'] . '<br />';
echo 'Merchant Url: ' . $item['merchant_url'] . '<br />';
echo 'Merchant Domain: ' . $item['merchant_domain'] . '<br />';
echo 'Merchant Icon Url: ' . $item['merchant_icon_url'] . '<br />';
echo 'Error Message: ' . $item['error_message'] . '<br />';
echo '----------------------------------------';
echo '<br />';
}
} else {
echo 'No Transactions Found.';
}
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
更新卡片余额
此 API 方法允许您发起虚拟卡余额更新,以确保获取卡片当前资金状态的最新数据。
| 参数 | 类型 | 描述 |
|---|---|---|
| card_id | string | 您要更新余额的虚拟卡唯一标识符。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| balance | number | 更新后的虚拟卡当前余额,显示可用资金。 |
<?php
function card_balance_refresh($request_body = [])
{
$curl = curl_init('https://pay2.house/api/cards/balance/refresh');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'card_id' => 'VC7914059264'
]);
$api_response = card_balance_refresh(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Card Balance: ' . $api_response['balance'] . '<br />';
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
卡片确认码
此 API 方法允许您获取授权虚拟卡操作所需的确认码列表。
| 参数 | 类型 | 描述 |
|---|---|---|
| card_id | string | 需要获取操作确认码的虚拟卡唯一标识符。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
| codes | array | 完成卡片交易所需的确认码列表。 |
<?php
function card_confirmation_codes($request_body = [])
{
$curl = curl_init('https://pay2.house/api/cards/confirmation_codes');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'card_id' => 'VC7914059264'
]);
$api_response = card_confirmation_codes(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
if ( ! empty($api_response['codes'])) {
foreach($api_response['codes'] AS $item) {
echo 'Time Created: ' . $item['time_created'] . '<br />';
echo 'Date Created: ' . $item['date_created'] . '<br />';
echo 'Otp Code: ' . $item['otp_code'] . '<br />';
echo '----------------------------------------';
echo '<br />';
}
} else {
echo 'No Confirmation Codes Found.';
}
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
冻结卡片
此 API 方法允许您冻结虚拟卡,从而停止其后续使用。
如果卡片余额中有资金,它们将根据退款资费退回到发行该卡片的内部账户。
但是,如果扣除手续费后的退款金额低于最低退款金额,则这些资金将从卡片余额中扣除。
| 参数 | 类型 | 描述 |
|---|---|---|
| card_id | string | 您要冻结的虚拟卡唯一标识符。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
<?php
function cards_block($request_body = [])
{
$curl = curl_init('https://pay2.house/api/cards/block');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'card_id' => 'VC7914059264'
]);
$api_response = cards_block(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Card Blocked Successfully.';
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
关闭卡片
此 API 方法允许您关闭虚拟卡,从而停止其后续使用。
需要注意的是,如果卡片上仍有资金,则不能使用此方法关闭卡片。
| 参数 | 类型 | 描述 |
|---|---|---|
| card_id | string | 您要关闭的虚拟卡唯一标识符。 |
响应参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| status | string | 请求执行状态(例如,"success" 表示请求成功执行)。 |
| code | string | 响应代码(例如,"REQUEST_SUCCESS" 表示请求成功)。 |
<?php
function card_close($request_body = [])
{
$curl = curl_init('https://pay2.house/api/cards/close');
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($request_body));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$body = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
if ( ! empty($info['http_code']) && $info['http_code'] === 200) {
return json_decode($body, TRUE);
}
}
$sign_token = create_token([
'card_id' => 'VC7914059264'
]);
$api_response = card_close(['sign_token' => $sign_token, 'api_key' => 'YOUR_API_KEY']);
if ( ! empty($api_response['status'])) {
if ($api_response['status'] == 'success') {
echo 'Card Closed Successfully.';
} else {
echo 'Error Code: ' . $api_response['code'] . '<br />';
echo 'Error Message: ' . $api_response['msg'] . '<br />';
}
} else {
echo 'Unknown Error';
}
?>
卡片冻结状态
可能的卡片冻结状态及其含义说明。
| 状态 | 描述 |
|---|---|
| terms_violation | 违反使用条款 |
| insufficient_funds | 资金不足 |
| unauthorized_topup | 未经授权的充值尝试 |
| high_refund_rate | 退款率过高 |
| prebilling | 首次计费 |
| subscription_delay | 订阅费用延迟 |
| invalid_personal_data | 个人数据不正确或不完整 |
| illegal_activity | 尝试非法操作 |
| verification_issues | 验证问题 |
| high_risk | 高风险等级 |
| terms_change | 卡片条款变更 |
| inactivity | 不活跃 |
| internal_errors | 内部错误 |
| regulatory_requirements | 监管要求 |
| user_blocked | 客户冻结了卡片 |
| not_blocked | 未冻结 |
Webhook Events
一旦支付状态变为“已支付”,Pay2.House 会自动以 webhook 格式向您为商户预先配置的 Webhook URL 发送通知。
我们将发送通知 100 次,直到收到 HTTP 状态 200 和响应文本 "OK"。
此外,我们的系统会自动在请求头中包含带有唯一令牌的 "Pay2-House-Signature" 参数。您可以使用此令牌验证请求的真实性。
<?php
// Function for decoding webhook data
function decrypt_webhook($data = NULL, $secret_key = NULL)
{
$decoded_data = base64_decode($data);
if ($decoded_data === FALSE) {
return FALSE;
}
list($iv, $signature, $encrypted_data) = explode('|', $decoded_data);
$calculated_signature = hash_hmac('sha256', $iv . '|' . $encrypted_data, $secret_key);
if (hash_equals($calculated_signature, $signature)) {
$decoded_encrypted_data = openssl_decrypt(
base64_decode($encrypted_data),
'AES-256-CBC',
hex2bin(hash('sha256', $secret_key)),
0,
hex2bin(bin2hex(hex2bin($iv)))
);
if ($decoded_encrypted_data !== FALSE) {
return $decoded_encrypted_data;
}
}
return FALSE;
}
// Retrieving the webhook request body and decoding the JSON
$payload_body = file_get_contents('php://input');
$payload_decode = json_decode($payload_body, TRUE);
// Checking for the presence of a signature in the request header
if ( ! empty($_SERVER['HTTP_PAY2_HOUSE_SIGNATURE'])) {
// Decoding webhook data and outputting the decoded data
$decrypt_webhook = decrypt_webhook($_SERVER['HTTP_PAY2_HOUSE_SIGNATURE'], 'YOUR_API_KEY');
if ($decrypt_webhook !== FALSE) {
$webhook_decode = json_decode($decrypt_webhook, TRUE);
}
}
// Example print of $payload_decode and $webhook_decode
// Array
// (
// [invoice_number] => IN4063112032
// [external_number] => test
// [amount] => 10
// [handling_fee] => 0
// [currency_code] => EUR
// [description] => Test Payment for Pay2.House
// [status] => paid
// )
// Setting HTTP status 200 and terminating the script with the response text "OK"
http_response_code(200);
exit('OK');
?>
可能的错误
以下是使用 API 时可能出现的一些错误。
| 错误代码 | 错误描述 |
|---|---|
| INVALID_TOKEN | 签名令牌无效或缺失。 |
| INVALID_API_KEY | API 密钥无效或缺失。 |
| API_KEY_NOT_FOUND | 未找到指定的 API 密钥。 |
| INACTIVE_API_KEY | 提供的 API 密钥未激活。 |
| SIGNATURE_DECODING_FAILED | 解码签名时出错。 |
| INVALID_SIGNATURE_DATA | 签名数据无效。 |
| EXPIRED_SIGNATURE | 签名已过期。 |
| MISMATCHED_SIGNATURE_ISSUER | Key ID 无效或缺失。 |
| INVALID_MERCHANT_ID | Merchant ID 无效或缺失。 |
| MERCHANT_ID_NOT_FOUND | 未找到 Merchant ID。 |
| ACCESS_DENIED_MERCHANT | 禁止访问指定的 Merchant ID。 |
| INVALID_EXTERNAL_NUMBER | 外部支付编号无效或缺失。 |
| INVALID_AMOUNT | 金额无效。 |
| INVALID_CURRENCY_CODE | 货币代码无效。 |
| INVALID_DESCRIPTION | 支付描述无效或缺失。 |
| SIGNATURE_VERIFICATION_FAILED | 由于错误导致签名验证失败。 |
| INVALID_RETURN_URL | 成功支付后返回的 URL 地址无效或缺失。 |
| INVALID_CANCEL_URL | 支付取消 URL 地址无效或缺失。 |
| INVALID_PAYER_EMAIL | 客户电子邮箱地址无效。 |
| INVALID_COMMENT | 备注无效或缺失。 |
| INSUFFICIENT_SENDER_BALANCE | 发送方账户余额不足。 |
| AMOUNT_EXCEEDS_SENDER_BALANCE | 转账金额超过发送方账户的可用余额。 |
| SENDER_ACCOUNT_NOT_FOUND | 未找到发送方账户。 |
| INVALID_SENDER_ACCOUNT | 发送方账户无效。 |
| RECIPIENT_ACCOUNT_NOT_FOUND | 未找到接收方账户。 |
| INVALID_RECIPIENT_ACCOUNT | 接收方账户无效。 |
| DIFFERENT_CURRENCY_CODES | 发送方和接收方账户的货币不同。 |
| INVALID_TRANSFER | 发送方账户和接收方账户不能相同。 |
| PROVIDER_NOT_FOUND | 未找到支付方式或支付方式未激活。 |
| PROVIDER_OPTION_NOT_FOUND | 未找到支付方式选项。 |
| AMOUNT_BELOW_MINIMUM | 转账金额低于最低阈值。 |
| AMOUNT_EXCEEDS_MAXIMUM | 转账金额超过最高限额。 |
| INSUFFICIENT_BALANCE_AFTER_FEE | 计入手续费后发送方账户余额不足。 |
| INVALID_NAME_WALLET | 账户名称无效或缺失。 |
| INVALID_PAYMENT_METHOD | 支付方式无效。 |
| PAY2_HOUSE_NOT_ENABLED | Pay2.House 支付方式不适用于您的商户。 |
| USDT_TRC20_NOT_ENABLED | Tether USDT 支付方式不适用于您的商户。 |
| CARDS_NOT_ENABLED | CARDS 支付方式不适用于您的商户。 |
| TRON_ACCOUNT_CREATION_ERROR | 创建 TRON 账户时出错。 |
| INVALID_INVOICE_NUMBER | 账户号码格式无效。 |
| INVOICE_NOT_FOUND | 未找到账户。 |
| MAX_WALLETS_REACHED | 已达到您的账户允许创建的最大账户数量。 |
| MERCHANT_NOT_APPROVED | 商户未获准处理支付。 |
| INVALID_DEADLINE_SECONDS | 支付到期时间间隔值无效。 |
| USER_DELETED | 用户已被删除。 |
| USER_BANNED | 用户已被封禁。 |
| USER_TEMPORARILY_BLOCKED | 用户被临时封禁。 |
| USER_NOT_FOUND | 未找到用户。 |
| INVALID_PER_PAGE | "per_page" 参数值无效。值必须在 10 到 100 之间。 |
| INVALID_PAGE | "page" 参数值无效。值必须为正整数。 |
| INVALID_STATUS | 状态无效。 |
| INSUFFICIENT_BALANCE | 账户资金不足,无法执行此操作。 |
| INVALID_FIRST_NAME | 名字填写不正确。 |
| INVALID_LAST_NAME | 姓氏填写不正确。 |
| INVALID_SUR_NAME | 中间名填写不正确。 |
| INVALID_ADDRESS | 居住地址填写不正确。 |
| INVALID_CITY | 居住城市填写不正确。 |
| INVALID_REGION | 居住地区填写不正确。 |
| INVALID_POST_CODE | 邮政编码填写不正确。 |
| INVALID_EMAIL | 电子邮箱填写不正确。 |
| INVALID_DATE_BIRTH | 出生日期填写不正确。 |
| FORBIDDEN_COUNTRY | 该国家/地区不允许使用。 |
| INVALID_PHONE_NUMBER | 电话号码填写不正确。 |
| INVALID_COUNTRY_CODE | 国家代码填写不正确。 |
| VERIFICATION_REQUIRED | 执行此操作需要账户验证。 |
| CARD_ISSUANCE_FAILED | 无法发行卡片。 |
| INVALID_BIN_NUMBER | BIN 号码无效或缺失。 |
| ACCOUNT_NOT_FOUND | 未找到指定账户。 |
| INVALID_ACCOUNT_NUMBER | 账户号码无效或缺失。 |
| CARD_NOT_FOUND | 未找到卡片。 |
| CARD_BLOCKED | 卡片已被冻结。 |
| CARD_CLOSED | 卡片已关闭。 |
| CARD_AWAITING | 卡片正在发行中。 |
| CARD_REFUND_FAILED | 卡片退款失败。 |
| CARD_BLOCKING_FAILED | 由于系统内部错误,卡片冻结失败。 |
| CARD_DETAILS_FAILED | 无法获取卡片详情。 |
| CARD_BALANCE_NOT_ZERO | 由于卡片上仍有资金,无法关闭卡片。 |
| CARD_CLOSING_FAILED | 由于系统内部错误,卡片关闭失败。 |
| REFUND_NOT_ALLOWED | 不允许退款。 |
| CARD_HAS_NO_BALANCE | 卡片没有余额。 |
| CARD_REFUND_MIN_AMOUNT | 未达到最低退款金额。 |
| CARD_REFUND_MAX_AMOUNT | 退款金额超过最高限额。 |
| CARD_REFUND_COST_GREATER | 扣除手续费后的退款金额低于允许的最低退款金额。 |
| CARD_REFUND_AMOUNT_ZERO | 退款金额必须大于零。 |
| ACCOUNT_DELETED | 指定账户已被删除。 |
| CARD_MINIMUM_AMOUNT | 充值金额必须高于最低金额。 |
| CARD_MAXIMUM_AMOUNT | 充值金额超过允许的最高金额。 |
| CARD_BALANCE_REFRESH_FAILED | 无法更新卡片余额。 |
| CARD_HISTORY_REFRESH_FAILED | 无法更新卡片操作历史。 |
| SENDER_ACCOUNT_DELETED | 由于发送方账户已被删除或停用,无法转移资金。 |
| RECIPIENT_ACCOUNT_DELETED | 由于接收方账户已被删除或停用,无法转移资金。 |
| TRANSACTION_NOT_PROCESSED | 由于错误或内部限制,交易未被处理。 |
| TRANSACTION_NOT_FOUND | 系统中未找到交易。 |
| INVALID_TRANSACTION_NUMBER | 交易编号无效或缺失。 |
| INVALID_DATE_RANGE | 指定的日期范围不正确。请检查格式和逻辑是否正确(开始日期不能晚于结束日期)。 |