模拟银行票据注册和修改场景
要生成以账户持有人作为付款方的银行票据注册通知模拟,集成合作伙伴可以使用以下端点:
信息
要接收测试 Webhook,端点中指定的账户必须是请求方的有效账户且在 DDA 中处于活跃状态。
注册银行票据请求
ENDPOINT
/mock/account/ACCOUNT-KEY/dda/bank_slipMÉTODO
POSTRequest Body
{
"status": "registered",
"amount": 1050,
"partial_payment_allowed": false,
"expiration": "2024-05-30",
"max_payment_date": "2024-07-01",
"beneficiary": {
"name": "Tech Solutions Ltda.",
"bank_code": "123",
"bank_ispb": "12345678",
"person_type": "legal",
"document_number": "12345678000100"
},
"guarantor": {
"name": "Maria Junior",
"person_type": "natural",
"document_number": "03903984900"
},
"rebate_amount": 30.0,
"interest": [
{
"interest_amount_type": "workdays_daily_amount",
"interest_billing_start_date": "2024-05-21",
"interest_amount": 10.0
}
],
"fine": [
{
"fine_billing_start_date": "2024-05-29",
"fine_amount_type": "absolute",
"fine_amount": 100.0
}
],
"discounts": [
{
"discount_limit_date": "2024-05-05",
"discount_type": "absolute",
"discount_amount": 50.0
}
],
"calculations": [],
"calculation_model": "01"
}
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
status * | enum | 银行票据状态枚举值。 | - |
amount * | float | 银行票据票面金额。 | - |
partial_payment_allowed * | boolean | 是否接受部分付款的指标。 | - |
expiration * | string | 银行票据到期日期。 | 10 |
max_payment_date * | string | 银行票据最终支付日期。 | 10 |
beneficiary * | object | 银行票据受益人对象。 | - |
guarantor | object | 银行票据担保人对象。 | - |
rebate_amount | float | 折扣金额。 | - |
interest | list | 利息对象列表。 | - |
fine | list | 罚款对象列表。 | - |
discounts | list | 折扣对象列表。 | - |
calculations | list | 银行票据计算组列表。 | - |
calculation_model * | string | 银行票据当前金额的计算方法。 | 2 |
状态枚举值
| 枚举值 | 描述 |
|---|---|
registered | 已注册的银行票据条形码。 |
paid | 已支付的银行票据。 |
partially_paid | 部分支付的银行票据。 |
written_off | 已注销的银行票据。 |
Beneficiary 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
name * | string | 受益人姓名。 | - |
person_type * | string | 受益人的人员类型。 | 7 |
document_number * | string | 受益人的文件号码。 | 14 |
bank_code * | string | 受益人银行代码。 | 3 |
bank_ispb * | string | 受益人银行的 ISPB。 | 8 |
guarantor 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
name * | string | 担保人姓名。 | - |
person_type * | string | 担保人的人员类型。 | 7 |
document_number * | string | 担保人的文件号码。 | 14 |
interest 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
interest_billing_start_date * | string | 利息开始日期。 | 10 |
interest_amount_type * | string | 利息类型。 | - |
interest_amount * | string | 利息金额。 | - |
fine 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
fine_billing_start_date * | string | 罚款开始日期。 | 10 |
fine_amount_type * | string | 罚款类型。 | - |
fine_amount * | string | 罚款金额。 | - |
discount 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
discount_limit_date * | string | 折扣截止日期。 | 10 |
discount_type * | string | 折扣类型。 | - |
discount_amount * | string | 折扣金额。 | - |
Response
STATUS
200{}
修改银行票据请求
只有银行票据的某些字段可以修改,如下面的请求所示。受益人、付款人和部分付款接受等字段不接受修改。
信息
对象列表字段在不希望修 改时不应传递。如果传递空列表或列表中传递任何其他值,所有对象都将被替换。
ENDPOINT
/mock/account/ACCOUNT-KEY/dda/bank_slip/BARECODEMÉTODO
PATCHRequest Body
{
"status": "registered",
"amount": 1200,
"expiration": "2024-05-30",
"max_payment_date": "2024-07-01",
"guarantor": {
"name": "Maria Junior",
"person_type": "natural",
"document_number": "03903984900"
},
"rebate_amount": 30.0,
"interest": [],
"fine": [
{
"fine_billing_start_date": "2024-05-29",
"fine_amount_type": "absolute",
"fine_amount": 100.0
},
{
"fine_billing_start_date": "2024-06-29",
"fine_amount_type": "absolute",
"fine_amount": 100.0
}
],
"discounts": [
{
"discount_limit_date": "2024-05-05",
"discount_type": "absolute",
"discount_amount": 50.0
}
],
"calculations": [],
"calculation_model": "01"
}
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
status * | enum | 银行票据状态枚举值。 | - |
amount | float | 银行票据票面金额。 | - |
expiration | string | 银行票据到期日期。 | 10 |
max_payment_date | string | 银行票据最终支付日期。 | 10 |
guarantor | object | 银行票据担保人对象。 | - |
rebate_amount | float | 折扣金额。 | - |
interest | list | 利息对象列表。 | - |
fine | list | 罚款对象列表。 | - |
discounts | list | 折扣对象列表。 | - |
calculations | list | 银行票据计算组列表。 | - |
calculation_model | string | 银行票据当前金额的计算方法。 | 2 |
Response
STATUS
200{}
因支付注销银行票据请求
ENDPOINT
/mock/account/ACCOUNT-KEY/dda/bank_slip/BARECODEMÉTODO
PATCHRequest Body
{
"status": "paid",
"paid_amount": 1200,
}
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
status * | enum | 银行票据状态枚举值。 | - |
paid_amount * | float | 银行票据已支付金额。 | - |
Response
STATUS
200{}