Postman Collection for Testing
Testing your integration using our mock provider is a walk in the park with our Postman Collection for Testing Purposes. It includes all the requests you can invoke to simulate common responses statuses and error messages when testing your integration in a development environment.
Click the button below to import the collection (you may need to refresh the page if the button does not work for you). We named it PaymentsOS Testing with Mock Provider.
Setting your Environment Variables
When you import our collection, we'll create an environment named PaymentsOS Testing. Edit the environment and configure the
public-key variables (login to your PaymentsOS environment and grab the values from your Business Unit configuration). You can leave all the other variables unchanged.
Running the Requests in the Correct Order
Beware that the order in which you run the requests is important, since some of the data returned by one request may be used in the next. To make sure you run the requests in the right order, we numbered each request for you. You can now simply execute all requests in the order listed.
Updating Amount Values to Simulate Specific Response Errors
For all requests that return a status of failed, you can change the last two digits of the amount passed in to simulate a specific response error. Let's take a look at an example:
In the collection, open the Charge Tests > Status: Failed (Synchr. Flow) folder.
Open the Create Payment request.
Change the amount to 2005. Notice that you only change the last two digits to 05. This will generate a payment_method_error when invoking the requests in the folder.
For an overview of the acount digits you can specify to generate specific response errors, see Simulating Request Response Errors.