The sandbox allow you to test and integrate with our API without creating a real charge in a credit card.
To use it, you must send requests to our sandbox URL when creating or querying a transaction.

(base sandbox URL: https://api.sandbox.boacompra.com).

PagSeguro offers a panel for proper simulation of all status and the integration flow.
Please access the following URL with credentials provided by your Account Manager:

https://billing-partner.boacompra.com.

In the “Transactions test” menu, search for your test transaction:

172

Once you find it, please click on the “detail” icon:

880

You can select the status you want to simulate and send a notification by clicking “Notify”:

862

Tokenization Feature

When using charge[].payment-method.token and charge[].payment-info.save on sandbox environment, the transaction response will always have
the same payment method object, which is pre-configured independently of the credit card informed.

In order to use charge[].payment-method.code instead of charge[].payment-method.token on sandbox environment, use the parameter
code as 123E4567E89B12D3A456426655440000 which is the same one returned in the payment-method object response.
Any other payment-method-code will return an error 210605:charge_[0-9]_payment_info_code_not_found.

Payment method object pre-configured

{
    "code": "123E4567E89B12D3A456426655440000",
    "credit-card": {
        "brand": "visa",
        "masked-number": "************0002",
        "expiration-date": "2026-12"
    },
    "date-created": "2018-04-11T11:31:11.571488493-03:00"
}

Error response when using a wrong payment-method-code

{
    "errors": [
        "code": 210605,
        "description": "charge_0_payment_info_code_not_found"
    ]
}