修改支付工具额度
修改支付工具额度允许更改现有支付工具的额度金额。
Request
ENDPOINT
/wallet/WALLET_KEY/payment_instrument/PAYMENT_INSTRUMENT_KEYMÉTODO
PATCH路径参数
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
wallet_key * | uuidv4 | UUID v4 格式的钱包唯一密钥 | 36 |
payment_instrument_key * | uuidv4 | UUID v4 格式的支付工具唯一密钥 | 36 |
Request Body
{
"limit_amount": 3000.00
}
请求体参数
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
limit_amount * | float | 支付工具的新额度金额 | - |
说明
- 新额度金额必须大于或等于已用额度(
used_limit) - 新额度金额不能超过钱包的后付费信用额度(
postpaid_credit_limit) - 只有
postpaid_card类型的支付工具可以更新其额度 - 只有
default类型的钱包可以更新其支付工具的额度 - 支付工具状态必须为
active才能更新其额度
Response
STATUS
200Response Body:已更新支付工具额度
{
"payment_instrument_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"limit_amount": 3000.00,
"payment_instrument_status": "active"
}
响应体参数
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
payment_instrument_key * | uuidv4 | UUID v4 格式的已更新工具唯一识别密钥 | 36 |
limit_amount * | float | 更新后的工具新额度金额 | - |
payment_instrument_status * | string | 支付工具状态 | payment_instrument_status 枚举值 |
payment_instrument_status 枚举值
| 枚举值 | 描述 |
|---|---|
| active | 工具已激活 |
| canceled | 工具已取消 |
错误响应
STATUS
4xxResponse Body: Error
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {}
}
HTTP 代码status | QI 代码code | 标题title | 描述(英文)description | 描述(葡文)translation |
|---|---|---|---|---|
| 400 | CIN000074 | Bad Request | Limit amount is greater than postpaid credit limit of the wallet. | Limite é maior que o limite de crédito pós-pago da carteira. |
| 400 | CIN000081 | Bad Request | Payment instrument is not active | Instrumento de pagamento não está ativo |
| 400 | CIN000110 | Bad Request | New limit amount is less than used limit | Novo valor do limite é menor que o valor utilizado |
| 403 | CIN000108 | Forbidden | Wallet type payroll is not allowed for this operation | Tipo de carteira payroll não é permitido para esta operação |
| 403 | CIN000113 | Forbidden | Payment instrument type is not allowed for this operation | Tipo de instrumento de pagamento não é permitido para esta operação |
| 404 | CIN000007 | Wallet not Found | Wallet with key: e503fa60-285e-4632-96b6-bf3ad908a23c was not found | Carteira com a chave: e503fa60-285e-4632-96b6-bf3ad908a23c não foi encontrado |
| 404 | CIN000080 | Payment Instrument Not Found | Payment instrument was not found | Instrumento de pagamento não foi encontrado |