Sandbox
The Sandbox feature is a powerful tool for simulating all API functionalities, providing a safe and controlled space to test and experiment with our APIs. You can use it to try different request types, such as payments, transactions, and accounts, run pre-built scenarios, and inspect both the embedded experience and the raw JSON response for each one.
Here's a breakdown of how the Sandbox is structured:
- Setup: The header configuration of the request.
- Account: The account to use during your test.
- API Key: The API key connected to the chosen account. You can select between Live and Test keys. Be sure to select the one that fits your scenario. See Integration Modes for more details.
- Scenario: The situation you desire to simulate.
- Type: The type of request you want to try. E.g., payments, transactions, accounts.
- Scenario: A pre-configured scenario for test purposes created by MoneyHash to help your experience.
- Inputs: Add-on options based on each individual scenario you select. You can select and paste the selected option in the payload.
- Payload: This area displays a sample payload specific to the selected scenario. It provides you with a clear representation of the data that will be sent when making API requests.
- Endpoint: This field allows you to see the destination to which your payload will be sent.
- Parameter: A new field will appear below the endpoint when the request selected requires more information.
The Sandbox includes default demo account keys, making it easy for you to simulate the full API cycle. However, you also have the option to use your own account keys for testing, allowing you to simulate your specific use case and configurations.
Test Cards
When testing in MoneyHash test mode, you can use MoneyHash's built-in test cards to simulate payments. Open the Test Cards picker in the top-right of the Sandbox to browse the available cards. The picker groups cards under Success and Failure, so you can choose a card to simulate a successful payment or a failed one. Each card uses the CVV and expiry date shown next to it in the picker.
MoneyHash test cards work in MoneyHash test mode. If you are testing in live mode against a provider's sandbox connection, use that provider's own test cards instead, which are available in the provider's documentation. If you are unsure which applies to your setup, reach out to the MoneyHash team.
See Integration Modes for more details.
Viewing Scenarios and Responses
Once you've made your scenario selections, you'll encounter two types of responses that you can examine and interact with:
HTML Embed Page
Depending on your chosen scenario and request type, you'll gain access to an HTML page that showcases the response. This page can be effortlessly embedded into your application, providing a realistic simulation of user interactions.
JSON Response
Pay close attention to the JSON response for scenarios, especially those involving pure API requests. This response offers insights into the outcomes of your simulated scenarios, enabling you to assess the results accurately.
Updated 25 days ago