跳到主要内容

模拟银行票据注册和修改场景

要生成以账户持有人作为付款方的银行票据注册通知模拟,集成合作伙伴可以使用以下端点:

信息

要接收测试 Webhook,端点中指定的账户必须是请求方的有效账户且在 DDA 中处于活跃状态。

注册银行票据请求

ENDPOINT
/mock/account/ACCOUNT-KEY/dda/bank_slip
MÉTODO
POST
Request 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银行票据受益人对象。-
guarantorobject银行票据担保人对象。-
rebate_amountfloat折扣金额。-
interestlist利息对象列表。-
finelist罚款对象列表。-
discountslist折扣对象列表。-
calculationslist银行票据计算组列表。-
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/BARECODE
MÉTODO
PATCH
Request 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银行票据状态枚举值。-
amountfloat银行票据票面金额。-
expirationstring银行票据到期日期。10
max_payment_datestring银行票据最终支付日期。10
guarantorobject银行票据担保人对象。-
rebate_amountfloat折扣金额。-
interestlist利息对象列表。-
finelist罚款对象列表。-
discountslist折扣对象列表。-
calculationslist银行票据计算组列表。-
calculation_modelstring银行票据当前金额的计算方法。2

Response

STATUS
200
{}

因支付注销银行票据请求

ENDPOINT
/mock/account/ACCOUNT-KEY/dda/bank_slip/BARECODE
MÉTODO
PATCH
Request Body
{
"status": "paid",
"paid_amount": 1200,
}
字段类型描述字符数
status *enum银行票据状态枚举值。-
paid_amount *float银行票据已支付金额。-

Response

STATUS
200
{}

因取消注销银行票据请求

ENDPOINT
/mock/account/ACCOUNT-KEY/dda/bank_slip/BARECODE
MÉTODO
PATCH
Request Body
{
"status": "written_off",
}
字段类型描述字符数
status *enum银行票据状态枚举值。-

Response

STATUS
200
{}