为虚拟账户创建别名
curl --request POST \
--url https://api.stage.localpayment.com/api/virtual-account/{externalId}/alias \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "C",
"value": "alias.example"
}
'import requests
url = "https://api.stage.localpayment.com/api/virtual-account/{externalId}/alias"
payload = {
"type": "C",
"value": "alias.example"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'C', value: 'alias.example'})
};
fetch('https://api.stage.localpayment.com/api/virtual-account/{externalId}/alias', 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.stage.localpayment.com/api/virtual-account/{externalId}/alias",
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([
'type' => 'C',
'value' => 'alias.example'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.stage.localpayment.com/api/virtual-account/{externalId}/alias"
payload := strings.NewReader("{\n \"type\": \"C\",\n \"value\": \"alias.example\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.stage.localpayment.com/api/virtual-account/{externalId}/alias")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"C\",\n \"value\": \"alias.example\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/virtual-account/{externalId}/alias")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"C\",\n \"value\": \"alias.example\"\n}"
response = http.request(request)
puts response.read_body{
"externalId": "94c6faee-0b35-4304-915b-e857981b4c01",
"alias": {
"type": "C",
"value": "alias.example"
},
"status": {
"code": "100",
"description": "INPROGRESS",
"detail": "Alias creation pending confirmation"
}
}
虚拟账户别名
为虚拟账户创建别名
POST
/
api
/
virtual-account
/
{externalId}
/
alias
为虚拟账户创建别名
curl --request POST \
--url https://api.stage.localpayment.com/api/virtual-account/{externalId}/alias \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "C",
"value": "alias.example"
}
'import requests
url = "https://api.stage.localpayment.com/api/virtual-account/{externalId}/alias"
payload = {
"type": "C",
"value": "alias.example"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'C', value: 'alias.example'})
};
fetch('https://api.stage.localpayment.com/api/virtual-account/{externalId}/alias', 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.stage.localpayment.com/api/virtual-account/{externalId}/alias",
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([
'type' => 'C',
'value' => 'alias.example'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.stage.localpayment.com/api/virtual-account/{externalId}/alias"
payload := strings.NewReader("{\n \"type\": \"C\",\n \"value\": \"alias.example\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.stage.localpayment.com/api/virtual-account/{externalId}/alias")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"C\",\n \"value\": \"alias.example\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/virtual-account/{externalId}/alias")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"C\",\n \"value\": \"alias.example\"\n}"
response = http.request(request)
puts response.read_body{
"externalId": "94c6faee-0b35-4304-915b-e857981b4c01",
"alias": {
"type": "C",
"value": "alias.example"
},
"status": {
"code": "100",
"description": "INPROGRESS",
"detail": "Alias creation pending confirmation"
}
}
适用地区:阿根廷
此操作允许商家将自定义的、易于理解的别名(CVU 别名)与阿根廷现有的有效虚拟账户关联起来。
别名会将 22 位 CVU 替换为简短易记的文本字符串,从而减少共享付款详情时的错误。
信息
别名格式规则
- 仅允许使用字母(a–z、A–Z)、数字(0–9)和英文句点(
.)。 - 不允许使用空格、连字符、下划线、@ 符号(
@)以及其他特殊字符。 - 长度必须介于 5 到 20 个字符之间。
- 有效示例:
alias.example、alias.example2026、alias.example.test
最佳实践
- 使用有意义、一致的别名来帮助内部核对和支持流程。
- 记录别名创建响应,并将其与内部交易记录关联,以便于审计。
- 定期或在收款前使用状态检查 endpoint 来验证别名是否处于活动状态并已正确映射。
授权
请求体
application/json
最后修改于 2026年11月10日

