Overview
Nuvei makes available sample Postman collection files for a range of workflows that you can run to get first-hand experience of how our server-to-server REST API 1.0 methods work. Before developing and testing your workflows with REST API 2.0 methods, we recommend using these collections to run relevant workflows in our sandbox testing environment to understand its business principles.
Getting Started
To get started:
- Import the Nuvei Environment
- Configure the Environment Variables
- Import a Collection File
- Start Running Requests
1. Import the Nuvei Environment
To import the Nuvei sandbox environment:
- Open Postman.
- Open My Workspace or create a workspace.
- Press Import.
- Paste the following URL:
https://docs.nuvei.com/wp-content/uploads/2020/06/SafeCharge-sandbox-environment-1.json
As soon as you paste the URL, Postman imports the environment. - In the list of environments, select https://ppp-test.safecharge.com.
2. Configure the Environment Variables
When you use Postman to test APIs, you can configure environment variables instead of manually configuring them for each request.
To configure the Nuvei environment variables:
- In My Workspace or the relevant workspace, open the Environments tab.
- Select https://ppp-test.safecharge.com.
- Provide current values for variables such as:
merchantSiteId
merchantId
merchantKey
When you test the APIs, Postman references the current values.
- Save the changes.
3. Import a Collection File
To import a collection file:
- Press Import.
- Paste the URL of the relevant collection file. For a list of available collection files, see Nuvei Postman Collection Files below.
As soon as you paste the URL, Postman imports the collection file.
4. Start Running Requests
Run requests in the sequence they appear in the flow. For example, the first request in the All Nuvei Collections > 3DS Frictionless Flow is POST /getSessionToken.do
.
To start running requests:
- In Environments, make sure https://ppp-test.safecharge.com is selected.
- Select a flow and a method.
- Make sure variable placeholders in the body and other elements of the request are configured to reference the current value of the environment variable. To reference the current value of an environment variable, the syntax is
<variable_name>
: “{{variable_name}}“, with the double curly brackets indicating the placeholder. For example, in the body of a/getSessionToken.do
request,merchantSiteId
: “{{merchantSiteId}}” references the current value of themerchantSiteId
environment variable.
- Press Send.
Appendices
Nuvei Postman Collection Files
Nuvei makes available the following sample Postman collection files that you can import into Postman and run:
Each file contains one or more collection, and each collection contains one or more REST API 1.0 methods.
All Nuvei Collections
- File name – All-Nuvei-Collections.postman_collection.json
- URL to import into Postman – https://docs.nuvei.com/wp-content/uploads/2022/08/All-Nuvei-Collections.postman_collection.json
The file contains the following collections and flows, with links to the corresponding Nuvei Docs topics:
Postman Collection | Referencing Topic |
---|---|
3DS Challenge | Server-to-Server |
3DS MPI-Only REST | |
3DS Frictionless | Server-to-Server |
3DS MPI-Only REST | |
External MPI | 3DS External MPI |
MPI Only (using /authorize3d and /verify3d ) | 3DS MPI-Only REST |
Recurring (with 3DS) | Merchant Initiation Transaction (MIT) / Recurring |
Recurring Payments via REST | |
Simple Auth-Settle scenario with Void | Void |
Simple Sale Payment and Partial Refund | Refund |
Payout | Payout |
Server-to-Server with Web SDK
- File name – Server-to-Server-with-Web-SDK.postman_collection.json
- URL to import into Postman – https://docs.nuvei.com/wp-content/uploads/2020/07/Server-to-Server-with-Web-SDK.postman_collection.json
The file contains one collection. The requests in this collection demonstrate certain Web SDK workflows in which you submit an /openOrder
before submitting a /payment
request, either with liability shift or without liability shift.
For more information about these flows, see:
- 3DS MPI-Only Web SDK > Initiating a Session.
- Dynamic Apple Pay Button > Initiate a Session.
- Android Mobile SDK (Beta Release) > Initiate a Session.
- iOS Mobile SDK (Beta Release) > Initiate a Session.
Web SDK API Calls
- File name – Web-SDK-API-calls.postman_collection.json
- URL to import into Postman – https://docs.nuvei.com/wp-content/uploads/2020/06/Web-SDK-API-calls.postman_collection.json
The file contains one collection. The requests in this collection demonstrate the Web SDK workflow, in which you:
- Submit an
/openOrder
request. - Submit a
createPayment()
request. - Submit a
/getPaymentStatus
request.
For more information about this flow, see:
- Web SDK Scenarios.
- Simply Connect > Quick Start > Initiate a Session.
- Simply Connect Examples.
P2P REST API Postman Collection File
- File name – REST 1.0 P2P Collection.postman_collection.json
- URL to import into Postman – https://docs.nuvei.com/wp-content/uploads/2023/11/REST-1.0-P2P-Collection.postman_collection.json
The file contains one collection demonstrating REST API workflows for person-to-person (P2P) scenarios. For more information, see P2P Payment With Nuvei.
Documentation
Documentation has been provided for collections as well as for some individual requests. The easiest way to view the documentation is to view a collection in a web browser.
- Select a Collection.
- Press the arrow that appears to the right of the collection name, then press View in web:
The collection opens in a three-pane format that enables easy navigation and testing: