πŸ’°How to simulate a transaction

On the right hand side of the code editor you will see the simulator. This allows you to simulate transactions to test out the code on your card before you deploy it. Once you have simulated a transaction, you will be presented with the simulation.json file which will explain what has happened in the transaction.

In the above simulation you can see that the simulated transaction has failed because the amount of R55 (5500 cents) was over the limit specified in the code snippet.

Once you are happy with your code and have tested it out, you may deploy your changes to your card using the β€œDeploy code to card” button.

Pro-Tip: The log.json file shows all the logs from the code. You can also log certain outcomes using the console.log function.

Last updated