Prepare a scenario
Choose a pending or failed result for the next issuance or cancellation in the Sandbox.
Prepares the result of Pix or boleto issuance, or of cancellation. After this request, perform the corresponding action on the same charge.
For action: cancellation, use an open Sandbox charge with Pix or boleto
payment instructions already issued. If payment instructions are not yet
available, issue them before preparing the scenario. Then use
Revoke a charge. Do not confirm payment in this flow.
Sandbox only
Use a Sandbox key or an OAuth connection with Sandbox access. The scenario does not move real money or change Production charges.
See the sequence in Pending or failed issuance and cancellation.
Path Params
Public identifier of the charge created in your company Sandbox.
Up to 100 characters
Headers
Unique key chosen by your system to identify this request. When retrying, send the same key and parameters. Without this header, the request is processed normally. See the idempotency guide for retention and handling pending or uncertain responses.
1 to 255 characters
Body Params
Applying an example replaces the body fields.
Action to test: pix_issuance for Pix issuance, boleto_issuance for boleto issuance, or cancellation for cancellation. For cancellation, keep the charge open with Pix or boleto already issued, without confirming payment.
1 to 32 characters
Action result: pending keeps confirmation open; failed shows a failure.
1 to 16 characters
Responses
Response Body
Scenario prepared, or the same settings already exist. state indicates whether it still awaits the action or the action has already been executed.
Result of configuring or resolving a Sandbox scenario.
Public identifier of the Sandbox charge.
Scenario action: Pix issuance, boleto issuance or cancellation.
Result selected for the action: pending, failed or completed.
Scenario progress: configured awaits the action; pending awaits resolution; failed and completed are final results.
Current charge state, according to the Charges resource codes.
Indicates that the same result was already recorded without repeating the action.
Response Body
The identifier, action, result or request is invalid. Check the fields indicated in error.details.
Code and explanation of the error returned by the API.
Stable error code.
Error explanation in English. For validation errors, it summarizes the category; details identify the corrections. Use the codes to handle the response.
Invalid fields or references submitted in the body, with the field, code and explanation. Omitted for general errors and when there is no field correction to indicate.
Public name of the JSON field, query parameter, path parameter or header related to the error. Nested fields and lists retain their path and index. $ represents the root of the JSON body.
Reason for the field error, such as REQUIRED, INVALID_TAXID, UNKNOWN_FIELD, DUPLICATE_FIELD or INVALID_TYPE.
Explanation in English of the problem with this field or parameter and the available correction. Do not use the text to determine your integration flow.
Response Body
The simulation accepts only Sandbox, using an API key or OAuth authorization for that environment.
Code and explanation of the error returned by the API.
Stable error code.
Error explanation in English. For validation errors, it summarizes the category; details identify the corrections. Use the codes to handle the response.
Invalid fields or references submitted in the body, with the field, code and explanation. Omitted for general errors and when there is no field correction to indicate.
Public name of the JSON field, query parameter, path parameter or header related to the error. Nested fields and lists retain their path and index. $ represents the root of the JSON body.
Reason for the field error, such as REQUIRED, INVALID_TAXID, UNKNOWN_FIELD, DUPLICATE_FIELD or INVALID_TYPE.
Explanation in English of the problem with this field or parameter and the available correction. Do not use the text to determine your integration flow.
Response Body
The charge was not found in the company Sandbox. IDs from another company or from Production receive the same response.
Code and explanation of the error returned by the API.
Stable error code.
Error explanation in English. For validation errors, it summarizes the category; details identify the corrections. Use the codes to handle the response.
Invalid fields or references submitted in the body, with the field, code and explanation. Omitted for general errors and when there is no field correction to indicate.
Public name of the JSON field, query parameter, path parameter or header related to the error. Nested fields and lists retain their path and index. $ represents the root of the JSON body.
Reason for the field error, such as REQUIRED, INVALID_TAXID, UNKNOWN_FIELD, DUPLICATE_FIELD or INVALID_TYPE.
Explanation in English of the problem with this field or parameter and the available correction. Do not use the text to determine your integration flow.
Response Body
The charge or scenario does not allow this step. Prepare the scenario before the action; for cancellation, the charge must be open and have Pix or boleto already issued. Use another charge to test a different scenario.
Code and explanation of the error returned by the API.
Stable error code.
Error explanation in English. For validation errors, it summarizes the category; details identify the corrections. Use the codes to handle the response.
Invalid fields or references submitted in the body, with the field, code and explanation. Omitted for general errors and when there is no field correction to indicate.
Public name of the JSON field, query parameter, path parameter or header related to the error. Nested fields and lists retain their path and index. $ represents the root of the JSON body.
Reason for the field error, such as REQUIRED, INVALID_TAXID, UNKNOWN_FIELD, DUPLICATE_FIELD or INVALID_TYPE.
Explanation in English of the problem with this field or parameter and the available correction. Do not use the text to determine your integration flow.
For common errors, see HTTP response codes.