创建支付链接
POST
/api/v1/bank/wallet/payment-link/Bearer Token身份验证
需要 Bearer 令牌。参见身份验证。
请求字段
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
wallet_uuid | string (UUID) | 是 | 结算钱包 |
merchant_id | string | 是 | 商户标识符 |
region | string | 是 | 国家代码(BR、MX、CL) |
currency | string | 是 | ISO 货币代码(BRL、MXN、USD) |
billing_type | string | 是 | installment 或 single |
charge_type | array of strings | 是 | 接受的支付方式:credit_card、pix、pix_and_card、card_and_card |
name | string | 是 | 链接显示名称 |
description | string | 是 | 结账页面上显示的描述 |
value | number | 是 | 支付金额 |
max_installment_count | integer | 是 | 最大分期数(单次支付为 1) |
is_checkout | boolean | 否 | true 为一次性使用;false 为可重复使用 |
redirect_url | string | 否 | 支付完成后的客户跳转 URL |
webhook_url | string | 否 | 覆盖此链接的 Webhook URL |
请求示例
- cURL
- Python
curl -sS -X POST 'https://core-manager.a55.tech/api/v1/bank/wallet/payment-link/' \
-H 'Authorization: Bearer $ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"wallet_uuid": "00000000-0000-4000-8000-000000000001",
"merchant_id": "merchant_123",
"region": "BR",
"currency": "BRL",
"billing_type": "installment",
"charge_type": ["credit_card", "pix"],
"name": "月度发票",
"description": "发票 #INV-2026-042",
"value": 250.00,
"max_installment_count": 3,
"is_checkout": true,
"redirect_url": "https://merchant.example/thanks",
"webhook_url": "https://merchant.example/webhooks/a55"
}'
import os, requests
r = requests.post(
"https://core-manager.a55.tech/api/v1/bank/wallet/payment-link/",
headers={"Authorization": f"Bearer {os.environ['ACCESS_TOKEN']}"},
json={
"wallet_uuid": "00000000-0000-4000-8000-000000000001",
"merchant_id": "merchant_123",
"region": "BR",
"currency": "BRL",
"billing_type": "installment",
"charge_type": ["credit_card", "pix"],
"name": "月度发票",
"description": "发票 #INV-2026-042",
"value": 250.00,
"max_installment_count": 3,
"is_checkout": True,
},
timeout=30,
)
link_url = r.json()["url"]
print(f"分享此链接:{link_url}")
响应示例
{
"payment_link_uuid": "0b9bffcb-2d96-42bb-8641-279bfc8aac19",
"status": "active",
"url": "https://pay.a55.tech/checkout/0b9bffcb-2d96-42bb-8641-279bfc8aac19",
"local_currency": 250.00,
"currency": "BRL",
"usd_currency": 45.00,
"eur_currency": 41.25
}
分发渠道
| 渠道 | 方式 |
|---|---|
| 电子邮件 | 将 url 嵌入账单和提醒邮件 |
| WhatsApp / 短信 | 粘贴 HTTPS 链接 |
| 社交媒体 | 发布到营销活动 |
| 二维码 | 将 URL 编码为二维码用于线下或印刷 |
| SDK | A55Pay.open({ checkoutUuid: '<uuid>' }) |
安全分享
仅使用 HTTPS。切勿在公开渠道粘贴密钥或预授权令牌。