跳转到主要内容

创建 Payout

Quick Reference

What发起由钱包提供资金的付款(payout)
Why通过单一统一端点向拉美各地的供应商、合作伙伴和客户付款
Reading Time10 分钟
DifficultyIntermediate
Prerequisites身份验证 → 一个有余额的钱包 → 已注册的 merchant(当您的账户需要时)
POST/api/v1/bank/wallet/payout/Bearer Token创建从钱包扣款的 payout

Payout 的工作原理

Payout 是出账流程——资金离开平台,与收款相反。单一端点处理所有支付通道;type_payout 字段选择使用哪个通道,每种类型都需要其对应的目标对象。


Payout 流程


Payout 状态

状态含义终态?
pending已创建,等待处理
issued已发送至 provider
realized已确认并结算
returned被接收银行退回
canceled已取消
error处理失败
expired已过期

请求头

Header必填
AuthorizationBearer {A55_ACCESS_TOKEN}
Content-Typeapplication/json

请求体

字段类型必填说明
wallet_uuidstring (UUID)为 payout 提供资金的钱包
type_payoutstring支付通道:pixbank_transfertedspeicash_pickup
valuenumber (float)发送金额。必须大于零
descriptionstringpayout 的自由文本描述
currencystringISO 4217 代码。省略时使用钱包货币
merchant_idstring (UUID)payout 所属的 merchant。当您的账户使用 merchant 时必填
transaction_referencestring外部幂等键(按钱包范围)。省略时生成 UUID
schedule_datestringYYYY-MM-DD 用于排定 payout
country_codestring目标地的 ISO 3166-1 alpha-2
providersstring[]用于强制路由到特定 provider 的 UUID
webhook_urlstring (URL)状态变更时通知的 URL
pix_destinationobject条件性type_payoutpix 时必填
bank_destinationobject条件性type_payoutbank_transfertedspei 时必填
cash_destinationobject条件性type_payoutcash_pickup 时必填

pix_destination

字段类型必填说明
pix_address_keystringPIX 密钥值
pix_address_key_typestringPIX 密钥类型(cpfcnpjemailphoneevp
beneficiary_namestring受益人全名
beneficiary_tax_idstring受益人 CPF/CNPJ。email/phone/evp 密钥必填;cpf/cnpj 密钥可选(用密钥作为证件)

bank_destination(bank_transfer / ted / spei)

字段类型必填说明
country_codestringISO-3166 alpha-2 或 alpha-3
beneficiary_namestring受益人名
beneficiary_last_namestring受益人姓
document_typestringCedula / RUC / DPI / RUT / CPF 等
beneficiary_tax_idstring受益人证件号
account_numberstring条件性账号、CBU/CVU、CCI、CLABE 等。除非使用 bank_alias 否则必填
bank_aliasstring条件性阿根廷 CBU 别名(6-20 字符)。account_number 的替代项
bank_codestringprovider 银行代码。巴西 TED:8 位 ISPB 或 COMPE(如 001
account_typestring储蓄/活期/Cash/RUT 等(因国家而异)
account_agencystring银行分行/网点(巴西 TED)
bank_namestring银行名称
beneficiary_emailstringaccount_typeCash 时必填
beneficiary_phonestring受益人电话
expiration_datestringYYYY-MM-DD(现金网络)

cash_destination(cash_pickup)

字段类型必填说明
country_codestring目标国家
bank_codestring现金网络代码(如 010456
beneficiary_namestring受益人姓名
beneficiary_emailstring提取码将发送到此邮箱
document_typestring受益人证件类型
beneficiary_tax_idstring受益人证件号
beneficiary_last_namestring受益人姓
beneficiary_phonestring受益人电话
expiration_datestringYYYY-MM-DD 提取过期日

响应字段

字段类型说明
payout_uuidstringpayout 内部标识符
external_idstringprovider 的 payout id
statusstring当前 payout 状态(见上表)
type_payoutstring使用的通道
amountnumber (float)payout 金额
feenumber (float)provider 费用
currencystringISO 4217 货币
descriptionstringpayout 描述
country_codestring目标国家
beneficiary_namestring受益人姓名
transaction_referencestring使用的幂等键
submitted_datestring发送至 provider 的日期
confirmed_datestring确认日期
schedule_datestring排定日期(如适用)
payment_codestring现金提取码(仅现金 payout)
authorization_codestringprovider 授权码(如可用)
authorization_datestring授权日期(如可用)
transaction_idstringprovider 交易 id(如可用)
destinationobject目标数据回显
messagearrayprovider/处理消息
createdstring创建时间戳(ISO 8601)
updatedstring最后更新时间戳(ISO 8601)

错误响应

状态码代码说明
400errors.payout.validate_error载荷校验失败(缺少 type_payoutvalue <= 0、缺少目标字段等)
400errors.payout.destination_invalid目标对象对所选 type_payout 无效
400errors.payout.provider_not_valid没有符合此 payout 的 provider
400errors.wallet.payout_already_exists该钱包已存在相同 transaction_reference 的 payout
400errors.wallet.daily_transaction_limit_exceeded将超出钱包每日限额
400errors.wallet.merchant_invalidmerchant 不属于钱包的账户
401unauthorizedBearer 令牌无效或过期
404errors.wallet.not_found钱包未找到
404errors.payout.merchant_not_foundmerchant 未找到
422errors.payout.insufficient_balance钱包余额不足以支付此 payout

代码示例

PIX out(巴西)

curl -s -X POST "https://sandbox.api.a55.tech/api/v1/bank/wallet/payout/" \
-H "Authorization: Bearer $A55_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"wallet_uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"type_payout": "pix",
"value": 100.00,
"currency": "BRL",
"description": "供应商付款 #2048",
"transaction_reference": "PAY-2048",
"webhook_url": "https://your-app.com/webhooks/a55/payouts",
"pix_destination": {
"pix_address_key": "joao@example.com",
"pix_address_key_type": "email",
"beneficiary_name": "João Silva",
"beneficiary_tax_id": "12345678901"
}
}'

TED(巴西)

curl -s -X POST "https://sandbox.api.a55.tech/api/v1/bank/wallet/payout/" \
-H "Authorization: Bearer $A55_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"wallet_uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"type_payout": "ted",
"value": 500.00,
"currency": "BRL",
"description": "供应商结算",
"transaction_reference": "PAY-2049",
"bank_destination": {
"country_code": "BR",
"bank_code": "341",
"account_type": "checking",
"account_number": "12345-6",
"account_agency": "0001",
"bank_name": "Itaú",
"beneficiary_name": "Maria",
"beneficiary_last_name": "Costa",
"document_type": "CPF",
"beneficiary_tax_id": "98765432100"
}
}'

SPEI(墨西哥)

curl -s -X POST "https://sandbox.api.a55.tech/api/v1/bank/wallet/payout/" \
-H "Authorization: Bearer $A55_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"wallet_uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"type_payout": "spei",
"value": 1500.00,
"currency": "MXN",
"description": "Payout MXN",
"transaction_reference": "PAY-2050",
"bank_destination": {
"country_code": "MX",
"account_number": "012180012345678901",
"beneficiary_name": "Carlos",
"beneficiary_last_name": "Hernández",
"document_type": "RFC",
"beneficiary_tax_id": "HEGC800101XXX"
}
}'

银行转账(LATAM)

curl -s -X POST "https://sandbox.api.a55.tech/api/v1/bank/wallet/payout/" \
-H "Authorization: Bearer $A55_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"wallet_uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"type_payout": "bank_transfer",
"value": 250.00,
"currency": "ARS",
"description": "Payout 阿根廷",
"transaction_reference": "PAY-2051",
"bank_destination": {
"country_code": "AR",
"bank_alias": "mi.alias.cbu",
"beneficiary_name": "Lucía",
"beneficiary_last_name": "Gómez",
"document_type": "DNI",
"beneficiary_tax_id": "20304050607"
}
}'

现金提取(厄瓜多尔)

curl -s -X POST "https://sandbox.api.a55.tech/api/v1/bank/wallet/payout/" \
-H "Authorization: Bearer $A55_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"wallet_uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"type_payout": "cash_pickup",
"value": 200.00,
"currency": "USD",
"description": "现金提取 payout",
"transaction_reference": "PAY-2052",
"cash_destination": {
"country_code": "EC",
"bank_code": "456",
"beneficiary_name": "Pedro",
"beneficiary_email": "pedro@example.com",
"document_type": "Cedula",
"beneficiary_tax_id": "1234567890"
}
}'

完整响应示例

PIX payout 已接受

{
"payout_uuid": "9b1f0c88-3a3c-4f2f-9d6e-1f0a2d4e88c1",
"external_id": "MN-20260616-0001",
"status": "issued",
"type_payout": "pix",
"amount": 100.00,
"fee": 0.50,
"currency": "BRL",
"description": "供应商付款 #2048",
"country_code": "BR",
"beneficiary_name": "João Silva",
"transaction_reference": "PAY-2048",
"submitted_date": "2026-06-16",
"confirmed_date": null,
"schedule_date": null,
"destination": {
"pix_address_key": "joao@example.com",
"pix_address_key_type": "email"
},
"message": [],
"created": "2026-06-16T18:00:00Z",
"updated": "2026-06-16T18:00:00Z"
}

现金提取已接受(含提取码)

{
"payout_uuid": "5c2a13f0-5e74-4b21-9c6a-2bd9d9b0aa10",
"external_id": "MN-20260616-0002",
"status": "issued",
"type_payout": "cash_pickup",
"amount": 200.00,
"fee": 1.20,
"currency": "USD",
"description": "现金提取 payout",
"country_code": "EC",
"beneficiary_name": "Pedro",
"transaction_reference": "PAY-2052",
"payment_code": "EC-PICKUP-7788",
"message": [],
"created": "2026-06-16T18:05:00Z",
"updated": "2026-06-16T18:05:00Z"
}
务必通过 Webhook 确认

同步响应返回初始状态。payout 通常会从 issued 异步推进到 realized。设置 webhook_url 并将 Webhook 视为最终结果的事实来源。参见 Payout Webhook