创建钱包(Wallet)
创建钱包(wallet)允许为个人或法人注册新的信用钱包。
什么是 Wallet
wallet 代表客户的账单,作为管理所有关联支付手段的集中器。重要须知:
- 一个 wallet = 一张账单:每个钱包对应一个特定客户(由 CPF/CNPJ 标识)的账单
- 多种支付手段:同一个 wallet 可以有不同的支付工具(卡片、PIX 等)
- 独立的工具:创建 wallet 后,需要分别创建支付工具(信用卡、额度等)
- 集中管理:wallet 集中管理与该客户相关的所有操作和配置
Request
ENDPOINT
/walletMÉTODO
POSTRequest Body
{
"owner": {
"request_control_key": "f7947b9d-9be3-49d8-aca2-4b3249e5fa65",
"person_type": "natural",
"name": "João Silva",
"document_number": "12345678901",
"birthdate": "1990-01-01",
"email": "joao.silva@email.com",
"phone": {
"number": "99999999",
"area_code": "11",
"country_code": "55"
},
"address": {
"street": "Rua das Flores",
"number": "123",
"neighborhood": "Centro",
"postal_code": "01234567",
"city": "São Paulo",
"state": "SP",
"complement": "Apto 1"
}
},
"invoice_configuration": {
"closing_date_configuration": {
"type": "fixed",
"fixed_day": 15
},
"due_date_configuration": {
"type": "fixed",
"fixed_day": 20,
"offset_months": 0
},
"invoice_payment_type": "bank_slip",
"interest_base": "calendar_days",
"monthly_interest_percentage": 2.0,
"fine_percentage": 2.0
},
"limits": {
"postpaid_credit_limit": 5000.00
}
}
请求体参数
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
request_control_key | uuidv4 | 客户使用的请求唯一识别密钥 | 36 |
owner | object | 钱包所有者数据(个人或法人) | owner 对象 |
person_key | string | UUID v4 格式的人员唯一识别密钥 | 36 |
invoice_configuration * | object | 账单结账和到期配置 | invoice_configuration 对象 |
limits * | object | 钱包信用额度 | limits 对象 |
条件字段
owner:未发送person_key时为必填项person_key:未发送owner时为必填项- 两个字段互斥
owner 对象
个人(person_type: "natural")
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
person_type * | string | 人员类型(必须为 "natural") | - |
name * | string | 姓名 | 100 |
document_number * | string | CPF(仅数字) | 11 |
birthdate * | string | 出生日期(YYYY-MM-DD 格式) | 10 |
email * | string | 联系邮箱 | 254 |
phone * | object | 联系电话 | phone 对象 |
address * | object | 完整地址 | address 对象 |
法人(person_type: "legal")
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
person_type * | string | 人员类型(必须为 "legal") | - |
name * | string | 公司法定名称 | 100 |
trading_name * | string | 公司商业名称 | 100 |
document_number * | string | CNPJ(仅数字) | 14 |
foundation_date * | string | 成立日期(YYYY-MM-DD 格式) | 10 |
email * | string | 联系邮箱 | 254 |
phone * | object | 联系电话 | phone 对象 |
address * | object | 完整地址 | address 对象 |
legal_representatives * | array | 法定代表人列表(个人) | - |
phone 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
country_code * | string | 国家代码(DDI) | 2-3 |
area_code * | string | 地区代码(DDD) | 2 |
number * | string | 电话号码 | 8-9 |
address 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
street * | string | 街道/路名 | 500 |
number * | string | 门牌号 | 10 |
neighborhood * | string | 街区/社区 | 100 |
postal_code * | string | 邮政编码(仅数字) | 8 |
city * | string | 城市 | 100 |
state * | string | 州(UF) | state 枚举值 |
complement | string | 地址补充信息 | 500 |
state 枚举值
| 枚举值 | 描述 |
|---|---|
| AC | Acre |
| AL | Alagoas |
| AM | Amazonas |
| AP | Amapá |
| BA | Bahia |
| CE | Ceará |
| DF | Distrito Federal |
| ES | Espírito Santo |
| GO | Goiás |
| MA | Maranhão |
| MG | Minas Gerais |
| MS | Mato Grosso do Sul |
| MT | Mato Grosso |
| PA | Pará |
| PB | Paraíba |
| PE | Pernambuco |
| PI | Piauí |
| PR | Paraná |
| RJ | Rio de Janeiro |
| RN | Rio Grande do Norte |
| RO | Rondônia |
| RR | Roraima |
| RS | Rio Grande do Sul |
| SC | Santa Catarina |
| SE | Sergipe |
| SP | São Paulo |
| TO | Tocantins |
| EX | 例外 |
invoice_configuration 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
closing_date_configuration * | object | 账单结账日配置 | closing_date_configuration 对象 |
due_date_configuration * | object | 账单到期日配置 | due_date_configuration 对象 |
invoice_payment_type * | string | 账单支付类型 | invoice_payment_type 枚举值 |
interest_base * | string | 利息计算基础 | interest_base 枚举值 |
monthly_interest_percentage * | float | 逾期月利率(0-100) | - |
fine_percentage * | float | 逾期罚款比例(0-100) | - |
closing_date_configuration 对象
固定配置(type: "fixed")
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
type * | string | 配置类型(必须为 "fixed") | - |
fixed_day * | integer | 每月固定结账日(1-27) | - |