Integrator Quickstart Guide
Select a workflow part below to see the required steps, review process diagrams, and jump directly to the relevant operations in the API Explorer.
x-credentials token. This token will then be automatically saved in Explorer Settings allowing you to test operations and view code examples tailored to your use case. Simply click "add later" to continue prototyping without entering your profile.
Part 1:Settings Profile & Middleware Token
Your journey begins by exchanging gateway credentials for a middleware token. This token (x-credentials) authenticates all subsequent requests for that specific gateway.
- Call GET /api/gateway/list to find the exact system name for your gateway (e.g., "ncpv1").
- Fetch the settings template with GET /api/{gateway_name}/settings. This shows the exact fields required to build your settings profile in the next step.
- Submit your completed settings profile to POST /api/gateway/credentials and collect your middleware token from the response.
- Cache the returned
x-credentialstoken and refresh every 20 minutes to keep alive if unused. If token is used at least once per 20 minutes, there is no expiration. - When using this site's API toolkit to send a credentails request, your token will be automatically saved as a variable for use in subsequent test calls across the API Explorer.
- It is also suggested that integrators fetch and cache paymentMethods for the active gateway using /api/paymentmethod. Refresh periodically or on invalidation - never hard-code values.
- Note that
paymentMethodis sent in all calls which setup a user interface for user payment to determine which interface to present.
Capture your gateway's name."] B["**Get the settings template**
Gather the required values."] C["**Submit your completed settings profile**
Receive your token."] D(("Used For All
Operations")) end subgraph Middleware MW(PAYMENT MIDDLEWARE) end %% Define the main vertical workflow A --> B --> C --> D %% Define the request/response data flows A -- "/api/gateway/list" --> MW MW -- "gateway names list" --> A B -- "/api/{gateway}/settings" --> MW MW -- "{JSON} Settings Template" --> B C -- "/api/gateway/credentials" --> MW MW -- "Middleware x-credentials Token" --> C
This is the fundamental first step: exchange your gateway settings for a middleware token that you will use globally.
Part 2:CC Payment with Surcharge (InterPayments)
This workflow demonstrates a common credit card transaction that includes an automatically calculated surcharge via InterPayments.
- Obtain your
x-credentialstoken (with InterPayments) for your gateway (NCP in this example), ensuring the InterPayments fields are included in your settings profile. - (Optional) Pre-calculate the fee for customer disclosure using POST /api/surcharge/compute.
- Request a hosted UI for user payment account entry with /api/transaction/processtransaction
- set
amountandsubtotalAmountaccordingly - set
surchargeAmounttonull(calculated/added automatically) - set
paymentMethodto the desired value from your cached gateway paymentMethod values - set
customerIDandother billing detailsto further customize the user experience.
- set
- Use Reports - Inquire to retrieve the final transaction status and confirm the persisted
surchargeAmount.
To trigger surcharge calculation, send subtotalAmount and set surchargeAmount: null in your Authorization request.
Part 3:User-Added Card-On-File for Speedy Authorizations
This workflow enables end-users to save (tokenize) a payment method for later authorization
- Prompt user to enter payment method for vault storage using Account - Save.
- Be sure to include the correct postal/ZIP code for accurate surcharge calculations.
- Authorize vaulted payment method at a later time Process - Transaction.
- Use your gateway's "cc token" equivalent paymentMethod value to set
paymentMethodin the request body. - Set
transactionTypeto "capture" - Confirm final status and amounts by calling Reports - Inquire.
The postal/ZIP code stored on the profile impacts surcharge outcomes for token-based payments.
Part 4:Alternative Payment Methods via Hosted IFrame
Alternative Payment Method (APM) availability varies by gateway and a host of other factors. Please call api/gateway/paymentMethods to confirm values and availability for all paymentMethods.
- Launch the hosted UI via POST ProcessTransaction, specifying the APM required in the request body and present the URL or HTML response to the user in an iFrame to complete payment.
- The user completes the payment flow within the hosted UI.
- Call GET Reports - Inquire to get the final, persisted transaction status and details from the middleware.
The SEPA flow remains in the same popup/iframe. Some other APMs may open a second window.
Part 5:Post-Transaction Void/Refund & Reporting
After a transaction is complete, you may need to reverse it. The correct action depends on whether the transaction has been settled.
- If the transaction has not yet settled, reverse it using the appropriate Void endpoint (e.g., PayaConnect Void or NCP Void).
- If the transaction has already settled, you must issue a Refund (e.g., PayaConnect Refund or NCP Refund).
- In either case, use the Inquire endpoint (e.g., PayaConnect Inquire or NCP Inquire) to confirm the final status and amounts.
Part 6:Understanding API Responses & Error Handling
The middleware uses a two-layer response system. Your code should first check for middleware-level errors before parsing the gateway's response.
Layer 1: Middleware Validation Errors
These errors occur if your request fails initial validation before it can be sent to the gateway.
-
401 Unauthorized: Your
x-credentialstoken is missing or invalid.Action: Ensure you are sending a valid token in thex-credentialsheader. Generate a new one if necessary. -
422 Unprocessable Entity: Your request is valid JSON, but a required field is missing or a value has the wrong format. The response body will detail the specific error.
Action: Correct the field(s) named in the error message and retry the request.
-
400 Bad Request: Your request body is not well-formed JSON.
Action: Check your JSON for syntax errors like missing commas, quotes, or brackets.
Layer 2: Gateway Responses
If your request passes middleware validation, it is sent to the gateway. The middleware passes the gateway's response back to you transparently.
-
200 OK: The gateway successfully processed the request.
Action: Parse the response body for the gateway's specific success payload, which includes the
transactionIDand finalstatus. -
402 Payment Required: The gateway rejected the transaction. The response body will contain the gateway's specific error message (e.g., "Declined," "Invalid Card Number").
Action: Parse the gateway's error message and handle it appropriately (e.g., display a message to the user).
Part 7: Integration Certification – What to Expect
Certifying your Nuvei Payment Middleware integration ensures your ISV solution can securely and reliably execute all required transaction operations, in full compliance with Nuvei guidelines. Before production enablement, each essential transaction type included in your integration must be tested and certified.
Required Transaction Types for Certification
- Tokenization: Test transactions where sensitive card data is replaced with secure tokens for storage and future use, enhancing security and compliance.
- Authorization: Validate that a customer’s payment method is active and has sufficient funds or credit. This step reserves the amount but does not transfer funds.
- Capture: Complete the payment by transferring reserved funds after authorization. Some gateways combine authorization and capture; others allow them separately.
- Sale (Auth + Capture): Combines authorization and capture in a single step, typically used for instant delivery of goods or services.
- Refund: Return funds to the customer after a completed sale. Test both full and partial refunds to ensure flexibility.
- Void: Cancel a previously authorized payment before capture—useful if an order is canceled before fulfillment.
- Reversal: Similar to a void, but may apply after settlement depending on the payment network. Important for dispute resolution and error correction.
- Declined Transaction: Simulate scenarios where payments are declined due to insufficient funds, expired cards, or incorrect data.
-
Interpayments Surcharge Testing:
- Credit Card transactions with expected surcharge
- Debit Card transactions (no surcharge expected)
Note: Each transaction type relevant to your integration must be successfully tested and certified before production deployment.
Part 8: Sandbox Transaction Testing and Test Cards by GatewayNEW
Sandbox Testing & Gateway Alignment
While the Payment Middleware consolidates and simplifies many functions across gateways, transaction testing in sandbox environments requires alignment with each gateway’s testing practices and test values. This section centralizes the essential test data and scenarios that integrators need across gateways.
PayaConnect Gateway
Use the trigger amounts below based on the outcome you'd like to test; use AVS and CVV trigger values to force ACS response as needed.
Test Card Numbers
| Brand | PAN | CVV | Exp |
|---|---|---|---|
| Visa | 4111111111111111 | 999 | Any future date |
| Mastercard | 5454545454545454 | 999 | Any future date |
| Amex | 6011000990139424 | 1234 | Any future date |
| Discover | 6011000991300009 | 999 | Any future date |
Outcome Testing Trigger Amounts
| Sale Amount | Outcome/Response |
|---|---|
| $29.66 | APPROVED |
| $5.00 | 1500 DENY |
| $6.16 | 1616 INSUFFICIENT_FUNDS |
| $6.22 | 1622 CARD_EXPIRED |
| $6.30 | 1630 REJECTED_BATCH (first close fails; second succeeds) |
| $8.xx | Delayed response; cents = seconds (e.g., $8.05 ⇒ ~5s) |
AVS/CVV Test Trigger Values
| Value | Type | Outcome |
|---|---|---|
| Street: 5800 NW 39th AVE; ZIP: 32606 | AVS street | AVS — PASS |
| Street: 2831 NW 41st St STE J; ZIP: 32615 | AVS street | AVS — DENY |
| 999 (V/MC/Disc) | CVV Data | CVV match |
| 123 (V/MC/Disc) | CVV Data | N – not auto declined |
Test ACH Accounts
| Account Type | Bank Routing | Account Num | Response |
|---|---|---|---|
| checking | 072000326 | 700953657 | Success |
Note: ACH approvals do not behave like card authorizations. Settlement with the banks typically completes in 1–4 business days. The account above can be used to test a successful payment at the point of entry.
NCP (v1) Gateway
Use the test card data below for each brand (Visa, Mastercard, Amex, Discover). Expiry: any future date; CVV: any valid value (e.g., 123; Amex 1234).
Test Card Numbers
| Brand | PAN | CVV | Exp |
|---|---|---|---|
| Visa | 4111111111111111 | 123 | Any future date |
| Mastercard | 5454545454545454 | 123 | Any future date |
| Discover | 378282246310005 | 123 | Any future date |
| Amex | 6011000990139424 | 1234 | Any future date |
3DS / Flow Trigger Values
| Condition | PAN | How to trigger in INT |
|---|---|---|
| 3DS “Force Challenge” | 4000000000001109 | amount > 150 |
| 3DS “Challenge Flow” (frictionless) | 4000000000001091 | cardHolderName = CL‑BRW1 |
Note: Nuvei’s INT environment maintains the authoritative test‑card database.
Till Payments Gateway
Note: Use the Simulator connector for card outcomes and SEPA Direct Debit testing.
Test Card Numbers
| Brand | PAN | CVV | Exp |
|---|---|---|---|
| Visa (success) | 4111111111111111 | 123 | Any future date |
| Visa (decline) | 4242424242424242 | ||
| Mastercard | 5555555555554444 | 123 | Any future date |
| Discover | 6011111111111117 | 123 | Any future date |
3DS / Special Triggers
| Trigger | How |
|---|---|
| SCA soft‑decline | Send amount 65.00 (any currency) |
| 3DS scenarios | Use listed 3DS test numbers (frictionless/challenge) when enabled |
SEPA Outcome IBAN Triggers
| IBAN last 4 | Outcome |
|---|---|
| 1111 | Success |
| 2222 | Pending |
| 2003 | Declined |
| 2006 | Insufficient funds |
PayaCore Gateway
Use the test card data below for each brand (Visa, Mastercard, Amex, Discover). Expiry: any future date; CVV: any valid value (e.g., 123; Amex 1234).
Test Card Numbers
| Brand | PAN | CVV | Exp |
|---|---|---|---|
| Visa | 4111111111111111 | 123 | Any future date |
| Mastercard | 5454545454545454 | 123 | Any future date |
| Discover | 6011000991300009 | 123 | Any future date |
| Amex | 371449635398431 | 1234 | Any future date |
Authorize.Net Gateway
Use the test card data below for each brand (Visa, Mastercard, Amex, Discover). Expiry: any future date; CVV: any valid value (e.g., 123; Amex 1234). Keep the sandbox account in Live Mode for realistic behavior.
Test Card Numbers
| Brand | PAN | CVV | Exp |
|---|---|---|---|
| Visa | 4111111111111111 | 123 | Any future date |
| Mastercard | 5424000000000015 | 123 | Any future date |
| Discover | 6011000000000012 | 123 | Any future date |
| Amex | 370000000000002 | 1234 | Any future date |
Test Card Trigger Values
| Type | Value | Effect |
|---|---|---|
| Card — approved | any amount | Approved |
| Card — decline | zipCode = 46282 | General decline (Response Code 2) |
| ACH — approved | amount < $100 | ACH (eCheck.Net) approved |
| ACH — declined | amount > $100 | ACH (eCheck.Net) declined |
CardConnect Gateway
All testing values including test card numbers are provided in the CardConnect welcome kit/email for your sandbox merchant profile.
Steps to complete testing
- Use the sandbox credentials and the PANs/ACH details supplied in your welcome kit (varies by simulator profile).
- Validate flows through the middleware API using the provided test data.
Part 9: Validating Transaction Throughput to Your GatewayNEW
Why It Matters
Validating that all transactions and related operations sent via Payment Middleware are received, recorded, and (when applicable) settled by your payment gateway protects against mapping errors, field mismatches, or lost webhooks and ensures that what your application sends is exactly what your gateway processes. Remember, the Payment Middleware is designed to centralize, streamline, and enhance your connection to the destination gateway and only knows which response was recieved for your request.
Transaction-Based Activities to Validate
- /payment — use when your flow posts a single-step Sale (Auth+Capture) or a two-step Authorization that may capture later. Confirm the gateway shows a corresponding sale/auth record.
- /transaction — use for operational actions like capture, void, and refund, and for certain APM or hosted flows. Confirm the gateway shows the correct follow-on entry tied to the original authorization/sale.
- Reporting / Inquiry — if your integration calls an inquiry endpoint (e.g., Reports – Inquire), confirm the values returned by middleware match what the gateway’s reporting/VT shows for the same transaction.
Tip: For multi-step flows, validate in this order: Authorization → Capture (or Sale only) → Void/Refund (as applicable) → Settlement/Funding (batch).
What to Validate Within Those Calls
| Field / Aspect | What to Check |
|---|---|
| Transaction Type | Auth, Capture, Sale, Void, Refund (and APM equivalents) match your intended call (/payment vs. /transaction) and gateway record. |
| Amounts | Base amount, currency, and any surcharge, tax, or tip amounts equal the values displayed in the gateway. For Auth→Capture, ensure captured amount equals or is ≤ authorized amount per your flow. |
| Status & Codes | Approved/Declined/Voided/Refunded states, plus gateway authCode, transactionId/reference, and (if present) AVS/CVV and 3DS results. |
| Custom Data | Your external identifiers (e.g., orderId, invoiceNumber, customerID, metadata) are persisted and searchable in the gateway UI/reports. |
| Payment Method | Masked PAN (last 4), brand, wallet/APM labels, token indicators, and card-present vs. card-not-present flags appear as expected. |
| Batch / Settlement | For captured sales, verify the transaction moved to an open/closed batch as expected and appears on funding/deposit reports. |
| Descriptor / MID | Correct MID, location, and (if applicable) soft descriptor values are associated to the transaction. |
| Timestamps | Time zone and ordering (Auth before Capture, Refund after Sale, etc.) are consistent between middleware responses and the gateway. |
Validate in Your Gateway’s Reporting / Virtual Terminal (VT)
- Open your gateway’s reporting or VT tool and filter by the transaction timestamp window used in testing.
- Search by a reliable key (amount, last 4, reference/transaction ID, order/invoice number, or customer ID).
- Open the gateway detail view and compare each item in “What to Validate” against your middleware request/response records.
- For two‑step flows, confirm the relationship: Auth → Capture (or Sale only) and any subsequent Void/Refund entries are properly linked.
- Confirm settlement (batch close, deposit/funding line) when applicable.
If any value doesn’t match: re-check your request body (types, formatting, currency), confirm the correct headers/token were used, and re‑run a controlled test with a unique external reference to isolate the entry in reports.