跳转至

钱包充值

以指定货币向钱包账户存入一定金额。

HTTP请求

POST /v1/accounts/wallet/topup

Request Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "您分配的api密钥"
}
Request Body
{
    "walletAccountId": "cde5843c-bbd0-46d2-9fbb-27b08f3ad021",
    "amountInCents": 100,
    "currency": "COP",
    "idempotencyKey": "65e85d27-1677-4a98-9f6e-dd03cfa07ea3"
}
Content-Type: application/json
{
    "id": "cde5843c-bbd0-46d2-9fbb-27b08f3ad021",
    "balanceInCents": 100,
    "status":"ACTIVE",
    "groupId": "0001",
    "country": "CO",
    "currency": "COP"
}
Content-Type: application/json
{
    "errors": [
        {
            "code": "404",
            "errorMessage": "No wallet account found for id: cde5843c-bbd0-46d2-9fbb-27b08f3ad021"
        }
    ]
}

HTTP Headers 字段说明

Key Value
Content-Type application/json
Authorization Bearer {{access_token}}
x-api-key 您分配的api密钥

Request Body 字段说明

参数 是否必填 类型 描述
walletAccountId String 希望充值的钱包账户的UUID。
amountInCents Int 充值的金额,单位为分。
currency String 用于结算的货币代码 (ISO 4217), 如哥伦比亚的为COP。
idempotencyKey String 由商户决定的唯一字符串,以防止请求重复。

Response Body 字段说明

参数 类型 描述
id String 钱包账户的UUID。
balanceInCents Int 钱包账户的余额,单位为分。
status String 钱包账户的状态,枚举:"ACTIVE"。
groupId String 钱包持有人归属的组id或者组名。
country String 钱包账户的国家代码。
currency String 钱包账户的结算货币代码。

请求失败的回复

Parameter Type Description
code String 表明具体错误类型的错误代码。
errorMessage String 错误信息。
回到页面顶部