Quick Start
This guide walks you through making your first API call to the NetValve Payment Gateway. By the end, you will have processed a test Sale transaction in the sandbox environment.
Prerequisites
Before you begin, make sure you have sandbox details from the NetValve team:
- API credentials — your API Key (
netvalve-api-key) and Client ID (netvalve-client-id) - A configured MID — your merchant ID (
netvalveMidId) assigned during onboarding
Don't have credentials yet? Contact the NetValve team to get set up with a sandbox account.
Step 1 — Authenticate
All API requests must include your API Key and Client ID in the headers:
netvalve-api-key: YOUR_API_KEY
netvalve-client-id: YOUR_CLIENT_ID
For full details, see the API Authentication guide.
Step 2 — Make a test Sale transaction
A Sale combines authorization and capture in one step — funds are taken from the cardholder immediately. Send a POST request to the /sale endpoint using the sandbox URL.
curl -X POST https://payment-api.uat.sandbox-netvalve.com/sale \
-H "Content-Type: application/json" \
-H "netvalve-api-key: YOUR_API_KEY" \
-H "netvalve-client-id: YOUR_CLIENT_ID" \
-d '{
"amount": 1.00,
"currency": "USD",
"cardNumber": "4012000098765439",
"cardExpireMonth": "12",
"cardExpireYear": "2030",
"cardSecurityCode": "123",
"cardHolderName": "John Doe",
"customerFirstName": "John",
"customerLastName": "Doe",
"customerEmail": "docs@netvalve.com",
"orderDesc": "Test order",
"netvalveMidId": "{{netvalveMidId}}"
}'
The card number 4012000098765439 is a test card. See Test Cards for more options.
Step 3 — Check the response
A successful transaction returns a JSON response like this:
{
"traceID": "03a9c205-1e49-4a0b-be47-12b5d6198477",
"responseTimestamp": "2026-02-25T10:18:28.494+00:00",
"transactionID": 88852,
"responseCode": "GTW_1000",
"responseMessage": "Transaction Approved/ Request Successful.",
"responseCodeType": "APPROVED",
"paymentMethod": "CARD",
"cardNumber": "401200******5439",
"cardExpiryMonth": "12",
"cardExpiryYear": "2030",
"cardType": "VISA",
"bankTransactionId": "605610502689",
"authCode": "TAS389",
"netvalveMidId": ".....",
"processor": "TSYS",
"amount": 1.00,
"currency": "USD",
"transactionType": "SALE"
}
Key fields to check:
| Field | Description |
|---|---|
responseCodeType | APPROVED means the transaction succeeded. |
responseCode | Gateway response code — GTW_1000 indicates approval. |
transactionID | Unique identifier for this transaction. Use it for refunds, inquiries, etc. |
traceID | Request trace ID, useful for debugging with NetValve support. |
If responseCodeType is not APPROVED, check the responseCode and responseMessage fields. See Error Codes for a full list.
Step 4 — Verify with the Inquiry API
You can confirm the transaction status at any time by calling the Inquiry endpoint:
curl -X POST https://payment-api.uat.sandbox-netvalve.com/inquiry \
-H "Content-Type: application/json" \
-H "netvalve-api-key: YOUR_API_KEY" \
-H "netvalve-client-id: YOUR_CLIENT_ID" \
-d '{
"transactionId": 18747
}'
Environments
| Environment | Base URL |
|---|---|
| Sandbox / UAT | https://payment-api.uat.sandbox-netvalve.com |
| Production | https://api.netvalve.com |
For HPP URLs, webhook IPs, merchant identifier types (netvalveMidId vs midId vs siteId), and other environment details, see Environments & Identifiers.
Never use real card numbers in the sandbox environment. Always use test cards.
What's next?
Now that you've made your first transaction, explore these guides:
- API Integration — Full overview of all available endpoints
- API Authentication — Detailed authentication setup
- Error Codes — Understanding response codes
- Test Cards — All available test card numbers
- Hosted Payment Page — Accept payments without handling card data directly
- Token Fields — Securely collect card details with embedded fields