Skip to main content

Scenario simulation

Step-by-step guide to simulate the execution of actions performed by external agents. These simulations include: deposit, refund, and IN portability of Pix key.

Information

There is no payload return (response body) in these requests.

1 - PIX deposit simulation​

Request​

ENDPOINT
/mock/pix_transfer/incoming_pix_transfer
METHOD
POST
Request Body
{
"target_account_key": "<Destination account's unique key>",
"amount": "<Transaction amount>"
}

Body Parameters​

FieldTypeDescriptionMax. CharactersExampleNote
target_account_keystringDestination account's unique key36"41112f46-0034-4007-85687-5e592173db2"
amountnumberTransaction amount61000Maximum value of 100,000

2 - Simulation of PIX QR Code payment​

Request​

ENDPOINT
/mock/pix_transfer/incoming_pix_qrcode
METHOD
POST
Request Body
{
"qr_code_key": "41112f46-0034-4007-85687-5e592173db2"
}

Body Parameters​

FieldTypeDescriptionMax. CharactersExampleNote
qr_code_keystringUnique identification key of the QR code36"41112f46-0034-4007-85687-5e592173db2"

3 - Simulation of PIX refund​

Request​

ENDPOINT
/mock/pix_transfer/chargeback
METHOD
POST
Request Body
{
"end_to_end_id": "<Transaction's unique key>",
"amount": "<Transaction amount>"
}

Body Parameters​

FieldTypeDescriptionMax. CharactersExampleNote
amountnumberTransaction amount61000Maximum value of 100,000
end_to_end_idstringUnique key of the PIX transaction32"E3240250220210723142712312751267"

4 - Simulation of IN portability webhook for PIX key​

Request​

ENDPOINT
/mock/pix_keys/key_claim_request/webhook
METHOD
POST
Request Body
{
"claim_request_key": "<Requester's unique key>",
"claim_request_status": "<Status enumerator>"
}

Body Parameters​

FieldTypeDescriptionMax. CharactersExampleNote
claim_request_keystringRequester's unique key36"ced00dc6-000a-0bd4-a111-85710a46ec05"
claim_request_statusenumClaim Request Status Enumerator"concluded"

Enumerator Claim Request Status​

EnumeratorDescription
concludedConcluded
cancelledCancelled
failedFailed
pending_confirmationPending confirmation

5 - Simulation of transaction pending confirmation status​

Pix transactions can enter pending_confirmation status when there is a delay in the response from the Banco Central for the Pix transaction.

To simulate this scenario, perform a transaction using the Pix key "target_pix_key": "0476f803-0129-430a-a66c-d2f0d7cf4aaa" or, for manual Pix transfers, use "owner_document_number": "35586870002" as the destination account owner's document number.

To update the transaction's status, perform the request below with transaction_status set to sent to approve the transaction, or rejected to deny it.

Request​

ENDPOINT
/mock/pix_transfer/pending_confirmation
METHOD
POST
Request Body
{
"end_to_end_id": "E32402502202308181802vSHbiqNCk9i",
"transaction_status": "rejected",
"status_reason_information": {
"error_description": "description",
"error_translation": "translation",
"error_short_description": "short_description"
},
"error_code": "test_error"
}

Body Parameters​

FieldTypeDescriptionMax. Characters
end_to_end_id*stringUnique key of the PIX transaction36
transaction_status*enumTransaction Status Enumerator
status_reason_informationobjectStatus Reason Information Object
error_codestringError code

Transaction Status Enumerator​

EnumeratorDescription
sentConcluded
rejectedRejected

Object Status Reason Information​

FieldTypeDescriptionMax. Characters
error_descriptionstringError description in English100
error_translationstringError description in Portuguese100
error_short_descriptionstringShort error description in English100

6 - Simulation of rejected transaction​

Pix transactions can enter rejected status when there is an expected return of the Pix transaction refusal by Banco Central or the receiving PSP.

To simulate this scenario, perform a transaction using the Pix key "target_pix_key": "b9380607-dac6-4e17-8ca7-eb761e3aa1dc" or, for manual Pix transfers, use "owner_document_number": "66972913039" or "owner_document_number": "50305556000164" as the destination account owner's document number.

7 - Retrieve Token sent for Two-Factor Authentication​

For individual and batch Pix transactions from integrator partners with two-factor authentication configuration, a token is sent to the account movement approver. Through this endpoint, it is possible to retrieve the sent token for integration testing purposes.

ENDPOINT
/mock/2fa/transaction_request/TRANSACTION_REQUEST_KEY
METHOD
GET

Path Params​

FieldTypeDescriptionCharacters
transaction_request_keyuuid4Unique identification key of the transaction. For Pix transactions, it would be pix_transfer_key, and for batch Pix transactions, it would be pix_transfer_batch_key36
Response Body
{
"token": "1a2b3c"
}