Point Simulator
The Point Simulator is a tool that allows you to interact with various endpoints of our API to integrate Point of Sale devices with our system. Its main objective is to help you understand the flow of creating and canceling a payment attempt.
Please note that this tool is not an exact replica of the device, but rather an educational tool designed to familiarize you with our API.
The simulator has two modes of use:
- PDV mode: simulates the integration of a complete system (device and Point of Sale) with our Integration API. Access the PDV mode simulator.
- Device mode: simulates a virtual Point of Sale device so you can test your integration using HTTP requests. Access the device mode simulator.
To learn how to use the simulator, follow the steps below.
1. Generate the test environment
To start testing integrations and payment flows with the Point Simulator, you will need to generate test users and access their production credentials.
If you prefer, you can also create test users using the following command:
curl
curl -X POST \
-h "Content-Type: application/json" \
--h 'Authorization: Bearer YOUR_TEST_ACCESS_TOKEN'\
"https://api.mercadopago.com/users/test" \
-d '{"site_id":"MLB","description" : "a description"}'
2. Configure your credentials
When using the simulator for the first time, you will need to enter your credentials. To obtain them, access Your integrations, option My credentials > Test credentials.
In addition, you will need to select one of your available devices.
PDV mode: you must enter your test
access-token
(TEST-XXXXX-XXXXX-XXXXXXX
) and the simulator will assign you a virtual device.Device mode: you must enter your test
access-token
(TEST-XXXXX-XXXXX-XXXXXXX
) and the device ID obtained when listing your devices.
3. Simulate a payment intent
We have prepared different scenarios that allow you to simulate a real experience. In order to do this, you must select the amount according to the status you want to obtain:
Status | Amount |
Reversed | $1100 |
Rejected | $1200 |
Error | $1300 |
Successful | Any other value different from the previous ones |
4. Get the payment intent from the device
Once the payment intent has been created, you must click on the green button of the virtual device to obtain the created payment intent. Once found, you can verify that the amount initially entered matches the one shown on the device screen.
5. Swipe the card and process the payment
If the previous step was successful, you can click on the animation of the card, which represents the card swipe in the device. Processing will begin immediately and the device will display the result.
6. Receive the notification
Once the payment intent is processed, go to your notification log. There you will see that the transaction status notification has been sent and you can check the details.