Nuvei provides well-developed and fully documented workflows to showcase the capabilities of its REST API. Before developing and testing your own APIs, it is recommended that you run these Nuvei workflows in our test environment, to understand their business principles.
The following workflows are available:
- 3D-Secure challenge
- 3D-Secure frictionless
- 3D-Secure v1 fallback
- External MPI
- MPI only (using /authorize3d and /verify3d)
- Recurring (with 3D-Secure)
- Simple Auth-Settle scenario with void
- Simple sale payment and partial refund
- Importing Nuvei Collections and Setting Environment
These workflows have been prepared as collections that you can import and test in Postman.
Follow the steps below to get started.
Perform the following steps to import the collections and environment:
- Open Postman.
- Click Import.
- Click Link.
- Copy the following URL: https://docs.safecharge.com/wp-content/uploads/2020/07/SafeCharge-sandbox-environment.json
- Click Import. This will import the Nuvei environment variable that you will have to select in the next step.
- In the top right corner, make sure you have selected https://ppp-test.safecharge.com in the list of environments:
- In the same way, import your Postman collection.
The following link contains a collection that includes all our supported workflows: Nuvei postman collection.
(Tip: If you were redirected to this page from another page that recommended a specific workflow collection, then use that collection (recommended link) in the next step.)
- Next you will have to run a script that will initiate some environment functions that will be used by our scripts:
- In the left pane, click Collections.
- In the list of collections, click Init.
- Click Init Postman, then click Send.
That action initializes the collections for use.
Before you begin to work with the Nuvei collections, you must provide your own credentials.
The Collections are provided with a number of environment variables. One example is:
merchantId. Variables allow you to store and reuse values in your requests and scripts. By storing a value in a variable it is referenced throughout the phases of a collection, environment, and requests, without having to change it in more than one place.
- Click the Environment quick look (eye button) in the top right corner of the Postman window:
- Click Edit in the https://ppp-test.safecharge.com area.
The Manage Environments page opens:
- Find the variables and provide your own initial values for them:
- Click Update to save the settings.
Once you have set your credentials, you can run the requests in the collections, as you would normally in Postman.
The Nuvei variables have been programmed in the pre-request scripts for every request in a collection (see the Pre-req tab) and for the Tests (see the Tests tab).
Variable placeholders are marked in API requests with double curly brackets, so:
You can view the previous and current values of any variable by clicking the Environment quick look (eye button) in the top right corner of the Postman window.
Documentation has been provided for entire collections and for their constituent requests. The easiest way to view the documentation is to view a collection in a web browser.
- Select a collection.
- Click the arrow that appears to the right of the collection name, then click View in web:
The collection opens in a three-pane format that enables easy navigation and testing: