Skip to main content

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_notice
METHOD
POST
Request Body
{
"bank_slip_key": "0d00b0e2-af11-472f-11f0-11f3330bae33",
"paid_amount": 12.0,
"payment_method": "cash",
"payment_type": "full_interbank"
}

Request Body Object

FieldTypeDescriptionMax. Chars.
bank_slip_key*stringBank slip unique key36
paid_amountfloatPayment amount. If not provided, uses the original bank slip value-
payment_methodstringPayment method used-
payment_typestringInterbank payment type-

payment_method Enumerators

EnumeratorDescription
cashCash
account_debitAccount debit
credit_cardCredit card
checkCheck

payment_type Enumerators

EnumeratorDescription
full_interbankFull interbank payment
partial_interbankPartial interbank payment
Behavior
  • If paid_amount is not provided, the original bank slip value will be used
  • If payment_type is 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_notice status 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/settlement
METHOD
POST
Request Body
{
"bank_slip_key": "0d00b0e2-af11-472f-11f0-11f3330bae33",
"paid_amount": 12.0,
"payment_method": "cash"
}

Request Body Object

FieldTypeDescriptionMax. Chars.
bank_slip_key*stringBank slip unique key36
paid_amountfloatSettlement payment amount. If not provided, uses the original bank slip value-
payment_methodstringPayment method used-

payment_method Enumerators

EnumeratorDescription
cashCash
account_debitAccount debit
credit_cardCredit card
checkCheck
Behavior
  • If paid_amount is 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 paid status after simulation