Testing Intro
Testing Against the API
Global Payments provides a sandbox environment to build and test against during the development process. The sandbox environment allows you to simulate successful requests, as well as various error responses and edge cases.
The sandbox environment accepts different input parameters as triggers for various scenarios and API responses. Refer to the Test Scenarios section of the documentation for a complete list of test cases.
Authentication
The sandbox environment will require an API Key to passed in the x-api-key header for authentication. If you do not have a sandbox account and a sandbox Master Key, reach out to the Global Payments team for assistance.
Sample Code and Examples
To help with development, the API reference contains built-in code runners which you can use to quickly fire off different requests and see how the API responds. Each resource provides a few different example requests, as well as the ability to provide your own request data.
Please note however that you may receive unexpected responses from the test server if you use values outside of the documented test cases.
Mock Endpoint
The API documentation includes a mock endpoint which can be used to test the ‘happy path’, eg. responses that will result in an approved or ok result.status. As this is a mocking endpoint, the data you send is not persistent. For testing with persistent data, please use our Sandbox environment.