Scenario simulation
This page describes how to simulate the execution of actions performed by external agents to test the bank slip settlement flow. These simulations are useful for homologation and integration testing.
Information
There is no return payload (response body) in these requests. They simulate external actions and return only the HTTP status.
1 - Payment notice simulation
Simulates a bank slip payment notice, changing its status to payment_notice.
ENDPOINT
/mock/bank_slip/payment_noticeMETHOD
POSTRequest Body
{
"bank_slip_key": "0d00b0e2-af11-472f-11f0-11f3330bae33",
"paid_amount": 12.0,
"payment_method": "cash",
"payment_type": "full_interbank"
}
Request Body Object
| Field | Type | Description | Max. Chars. |
|---|---|---|---|
| bank_slip_key* | string | Bank slip unique key | 36 |
| paid_amount | float | Payment amount. If not provided, uses the original bank slip value | - |
| payment_method | string | Payment method used | - |
| payment_type | string | Interbank payment type | - |
payment_method Enumerators
| Enumerator | Description |
|---|---|
cash | Cash |
account_debit | Account debit |
credit_card | Credit card |
check | Check |
payment_type Enumerators
| Enumerator | Description |
|---|---|
full_interbank | Full interbank payment |
partial_interbank | Partial interbank payment |
Behavior
- If
paid_amountis not provided, the original bank slip value will be used - If
payment_typeis not provided, it will be considered as full payment (full_interbank) - The simulation creates a payment notice occurrence
- The bank slip will be moved to
payment_noticestatus after simulation - Important: For
partial_interbank, the bank slip status is not changed. This option is used to simulate cases of partial payment bank slips, as explained in the introduction
2 - Bank slip settlement simulation
Simulates payment and financial settlement of a bank slip, changing its status to paid.
ENDPOINT
/mock/bank_slip/settlementMETHOD
POSTRequest Body
{
"bank_slip_key": "0d00b0e2-af11-472f-11f0-11f3330bae33",
"paid_amount": 12.0,
"payment_method": "cash"
}
Request Body Object
| Field | Type | Description | Max. Chars. |
|---|---|---|---|
| bank_slip_key* | string | Bank slip unique key | 36 |
| paid_amount | float | Settlement payment amount. If not provided, uses the original bank slip value | - |
| payment_method | string | Payment method used | - |
payment_method Enumerators
| Enumerator | Description |
|---|---|
cash | Cash |
account_debit | Account debit |
credit_card | Credit card |
check | Check |
Behavior
- If
paid_amountis not provided, the original bank slip value will be used - The simulation creates a payment occurrence with code 65 (payment) by default
- The bank slip will be moved to
paidstatus after simulation