Introduction
Welcome to the Nuvei server-to-server REST 2.0 API integration guide.
Nuvei's API is simple, easy-to-use, secure, and stateless, which enables online merchants and service providers to process consumer payments through Nuvei's digital payment Gateway.
This guide describes the API's services and functionality, and is intended for developers by providing all necessary integration information, including the necessary requests and responses.
What's New in REST 2.0
- Improved infrastructure
- Developer-friendly authentication
- Up-to-date and compatible RESTful protocol
- Simplified workflows
- New features and services support
- YAML files support
RESTful Structure
- Proper use of CRUD operations: POST for creation, PUT/PATCH for updates, and GET for retrieving information.
- The endpoint structure "https://api.nuvei.com/payment-api/{object}" is used for creation. For example, to create a payment using REST 2.0, send a POST request to "https://api.nuvei.com/payment-api/payments".
- The POST structure "https://api.nuvei.com/payment-api/{object}/{id}/{operation}" is used to perform a specific operation on an existing endpoint. For example, to perform a refund on a payment transaction, send a POST request to "https://api.nuvei.com/payment-api/payments/12312334/refunds".
Base URLs:
- Payment: https://api-sandbox.nuvei.com/payment-api/
- Order: https://api-sandbox.nuvei.com/sdk-api/
- Accounts: https://api-sandbox.nuvei.com/account-api/
- Data: https://api-sandbox.nuvei.com/data-api/
Handling Record IDs
- Each POST
/payments
request returns apaymentId
. All subsequent transactions are linked with thispaymentId
. - In the REST 2.0 flow, you do not need to provide all the parameters in each request in the same payment cycle. For example, if you want to refund a transaction, REST 2.0 only needs
paymentId
and the refund details: amount (if partial), currency, etc.