Nuvei Payments API

Server-to-server REST API for processing card and APM transactions through Nuvei. Includes openOrder for session setup, payment for end-to-end transactions, settleTransaction for capturing pre-authorized amounts, refundTransaction for refunds, voidTransaction for cancellations, and getPaymentStatus for transaction state. Auth uses SHA-256 checksum over merchantId, merchantSiteId, clientRequestId, amount, currency, timeStamp, and merchantSecretKey.

OpenAPI Specification

nuvei-payments-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Nuvei 3DS Payments API
  description: 3D Secure 2 authentication endpoints supporting PSD2 SCA.
  version: '1.0'
  contact:
    name: Nuvei Developer Support
    url: https://docs.nuvei.com
servers:
- url: https://secure.safecharge.com/ppp/api/v1
  description: Production
- url: https://ppp-test.nuvei.com/ppp/api/v1
  description: Sandbox
tags:
- name: Payments
  description: End-to-end payment processing.
paths:
  /payment.do:
    post:
      tags:
      - Payments
      summary: Create Payment
      operationId: createPayment
      description: 'Performs an end-to-end PCI-compliant payment using card data, a UPO id, a temporary token

        from the Web SDK, or an APM payment option. The Nuvei platform handles 3DS2, fraud screening,

        and routing.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentRequest'
      responses:
        '200':
          description: Payment result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResponse'
components:
  schemas:
    PaymentResponse:
      type: object
      properties:
        sessionToken:
          type: string
        orderId:
          type: string
        userTokenId:
          type: string
        paymentOption:
          type: object
        transactionStatus:
          type: string
          enum:
          - APPROVED
          - DECLINED
          - ERROR
          - REDIRECT
          - PENDING
        gwErrorCode:
          type: integer
        gwErrorReason:
          type: string
        gwExtendedErrorCode:
          type: integer
        transactionType:
          type: string
        transactionId:
          type: string
        externalTransactionId:
          type: string
        authCode:
          type: string
        status:
          type: string
          enum:
          - SUCCESS
          - ERROR
        reason:
          type: string
        errCode:
          type: integer
        merchantId:
          type: string
        merchantSiteId:
          type: string
        version:
          type: string
        clientRequestId:
          type: string
        internalRequestId:
          type: integer
        clientUniqueId:
          type: string
    DeviceDetails:
      type: object
      properties:
        ipAddress:
          type: string
        deviceType:
          type: string
        deviceName:
          type: string
        deviceOS:
          type: string
        browser:
          type: string
    PaymentOption:
      type: object
      properties:
        card:
          $ref: '#/components/schemas/Card'
        alternativePaymentMethod:
          type: object
          additionalProperties: true
        userPaymentOptionId:
          type: string
    UrlDetails:
      type: object
      properties:
        successUrl:
          type: string
        failureUrl:
          type: string
        pendingUrl:
          type: string
        notificationUrl:
          type: string
    PaymentRequest:
      allOf:
      - $ref: '#/components/schemas/MerchantAuth'
      - type: object
        required:
        - amount
        - currency
        properties:
          sessionToken:
            type: string
          userTokenId:
            type: string
          clientUniqueId:
            type: string
          amount:
            type: string
          currency:
            type: string
          paymentOption:
            $ref: '#/components/schemas/PaymentOption'
          billingAddress:
            $ref: '#/components/schemas/Address'
          shippingAddress:
            $ref: '#/components/schemas/Address'
          deviceDetails:
            $ref: '#/components/schemas/DeviceDetails'
          items:
            type: array
            items:
              $ref: '#/components/schemas/Item'
          urlDetails:
            $ref: '#/components/schemas/UrlDetails'
          isRebilling:
            type: integer
            enum:
            - 0
            - 1
    Item:
      type: object
      properties:
        name:
          type: string
        price:
          type: string
        quantity:
          type: integer
    Address:
      type: object
      properties:
        firstName:
          type: string
        lastName:
          type: string
        address:
          type: string
        city:
          type: string
        zip:
          type: string
        country:
          type: string
        email:
          type: string
        phone:
          type: string
    Card:
      type: object
      properties:
        cardNumber:
          type: string
        cardHolderName:
          type: string
        expirationMonth:
          type: string
        expirationYear:
          type: string
        CVV:
          type: string
        threeD:
          type: object
          additionalProperties: true
    MerchantAuth:
      type: object
      required:
      - merchantId
      - merchantSiteId
      - timeStamp
      - checksum
      properties:
        merchantId:
          type: string
          description: Merchant identifier assigned by Nuvei.
        merchantSiteId:
          type: string
          description: Site identifier for the merchant.
        clientRequestId:
          type: string
          description: Idempotent client-side identifier for the request.
        timeStamp:
          type: string
          description: yyyyMMddHHmmss timestamp used in the checksum.
        checksum:
          type: string
          description: SHA-256 of merchantId|merchantSiteId|clientRequestId|amount|currency|timeStamp|merchantSecretKey.