Scenario Simulation
Step-by-step guide to simulate the completion of actions performed by external agents. These simulations include receiving and updating refund requests.
There is no payload response (response body) for these requests, only a response status of 201.
1 - Simulating the Receipt of a Refund Request
Simulates the receipt of a refund request opened by another institution.
It is essential to have a valid pix_transfer_key to send the request, regardless of the information from the other party of the transfer, as all information from the second participant will be replaced in the mock process.
Request
Request Body
If the refund type is FRAUD, there must be a closed infraction report for the same pix_transfer_key.
{
"pix_transfer_key": "d5856a5f-378f-43ed-818b-df33b9fae703",
"refund_request_type": "fraud",
"refund_request_details": "Foi identificada uma fraude na transação.",
"refund_request_status": "open",
}
Object Request Body
Field | Type | Description | Max. Characters |
---|---|---|---|
pix_transfer_key * | string | Unique identifier of the Pix transfer in the QI system (UUIDv4) | 36 |
refund_request_type * | enum | Type of refund request. | Enumerators refund_request_type |
refund_request_status * | string | Initial status of the refund request. "open" | 36 |
refund_request_details | string | Details of the refund request | 2000 |
Enumerators refund_request_type
Field | Type | Description |
---|---|---|
fraud | string | Refund Request originating from fraud. |
operational_flaw | string | Refund Request originating from an internal error. |
2 - Simulating the Update of a Refund Request
Simulates the status update of a refund request opened by the indirect participant.
The simulation options for updating a refund request are: 1 - Cancellation: Simulates the cancellation (cancel), made by a "target" participant, of a refund request previously opened by them.
2 - Closure: Simulates the closure (close), made by a "target" participant, of a refund request opened by the indirect participant. It is important that this report has already been acknowledged as open.
Request
Request Body - Cancelled
The Refund Request identified by the refund_request_key must have been previously created in the simulation of creating a refund request.
{
"refund_request_status": "cancelled",
"refund_request_key": "c3e5664f-04bb-4625-9ef3-c8555d210c71"
}
Request Body - Total Acceptance Closure
The Refund Request identified by the refund_request_key must have been previously created by the indirect participant.
The refund transfer key must have been previously created by the refund receipt mock with a value EQUAL to the original transaction.
{
"refund_request_key": "42035bdd-0551-41c5-aaae-cb27d108160a",
"refund_request_status": "closed",
"analysis_result": "totally_accepted",
"analysis_details": "Teste",
"refund_transfer_key": "6f421127-892f-415f-8efc-4e20cf5d622d"
}
Request Body - Partial Acceptance Closure
The Refund Request identified by the refund_request_key must have been previously created by the indirect participant. Additionally, the refunded amount must not be equal to or greater than the total amount of the original transaction.
The refund transfer key must have been previously created by the refund receipt mock with a value LESS than the original transaction.
{
"refund_request_key": "42035bdd-0551-41c5-aaae-cb27d108160a",
"refund_request_status": "closed",
"analysis_result": "partially_accepted",
"analysis_details": "Teste",
"refund_transfer_key": "6f421127-892f-415f-8efc-4e20cf5d622d"
}
Request Body - Rejection Closure
The Refund Request identified by the refund_request_key must have been previously created by the indirect participant.
{
"refund_request_key": "47633091-7d44-4d10-9d00-1f937104e537",
"refund_request_status": "closed",
"analysis_result": "rejected",
"analysis_details": "Teste",
"reject_reason": "no_balance"
}
Object Request Body
Field | Type | Description | Max. Characters |
---|---|---|---|
refund_request_status * | string | Initial status of the refund request. "cancelled", "closed" | 36 |
refund_request_key * | string | Unique key of the refund request | 36 |
analysis_result * | string | Result of the refund request analysis. "totally_accepted", "partially_accepted", "rejected" | 36 |
analysis_details | string | Details of the refund request analysis | 2000 |
refund_transfer_key | float | Identifier of the refund transfer, mandatory in case of acceptance | 20 |
reject_reason | string | Reason for rejecting a refund (only if analysis_result is rejected). "no_balance", "account_closure", or "other" | 15 |