Overview
This document provides the required fields and specifications for Level 2 (L2) payment processing using the VPC payment processor. L2 processing provides enhanced data for commercial and corporate card transactions.
Base URL
Sandbox Environment: https://apitest.valorvpc.com
Authentication
All requests require the X-App-Key header with your merchant's App Key obtained during merchant boarding.
Common Required Headers
Content-Type: application/json
X-App-Key: {your-app-key}
Sale Transaction
Endpoint
POST https://apitest.valorvpc.com/payment/sale
Required Fields
| Field | Type | Description | Validation |
|---|---|---|---|
merchantId | String | Merchant identifier | Required |
terminalId | String | Terminal identifier | Required |
paymentType | String | Must be "sale" | Required |
amount | String | Transaction amount | Required, numeric |
level | String | Processing level, use "2" for L2 | Required for L2 |
Card Data Object (cardData)
cardData)| Field | Type | Description | Validation |
|---|---|---|---|
panNumber | String | Card number | Required, 13-19 digits |
expiryDate | String | Card expiry date | Required, format: MMYY |
cvv | String | Card verification value | Optional, 3-4 digits |
Invoice Details Object (invoiceDetails)
invoiceDetails)| Field | Type | Description | Validation |
|---|---|---|---|
purchaseOrderNumber | String | Purchase order number | Required for L2, alphanumeric only, max 17 characters |
Bill To Object (billTo)
billTo)| Field | Type | Description | Validation |
|---|---|---|---|
firstName | String | Customer first name | Required for L2, max 60 characters |
lastName | String | Customer last name | Required for L2, max 60 characters |
email | String | Customer email address | Required for L2, max 255 characters, valid email format |
Example Request
curl --location 'https://apitest.valorvpc.com/payment/sale' \
--header 'Content-Type: application/json' \
--header 'X-App-Key: f63e6ab9-6f3f-4081-ab45-9a941f8e1344' \
--data-raw '{
"merchantId": "855500000027",
"terminalId": "48593451",
"paymentType": "sale",
"commerceIndicator": "moto",
"amount": "100",
"level": "2",
"cardData": {
"panNumber": "4111111111111111",
"expiryDate": "1231",
"cvv": "999"
},
"invoiceDetails": {
"purchaseOrderNumber": "1000010"
},
"billTo": {
"firstName": "Artan",
"lastName": "Merko",
"email": "[email protected]"
}
}'Authorization Transaction
Endpoint
POST https://apitest.valorvpc.com/payment/auth
Required Fields
Same as Sale transaction, but with paymentType set to "auth".
Example Request
curl --location 'https://apitest.valorvpc.com/payment/auth' \
--header 'Content-Type: application/json' \
--header 'X-App-Key: f63e6ab9-6f3f-4081-ab45-9a941f8e1344' \
--data-raw '{
"merchantId": "855500000027",
"terminalId": "48593451",
"paymentType": "auth",
"commerceIndicator": "moto",
"amount": "100",
"level": "2",
"cardData": {
"panNumber": "4111111111111111",
"expiryDate": "1231",
"cvv": "999"
},
"invoiceDetails": {
"purchaseOrderNumber": "1000010"
},
"billTo": {
"firstName": "Artan",
"lastName": "Merko",
"email": "[email protected]"
}
}'Direct Refund Transaction
Endpoint
POST https://apitest.valorvpc.com/payment/refund
Required Fields
Same as Sale transaction, but with paymentType set to "refund" and CVV is optional.
Example Request
curl --location 'https://apitest.valorvpc.com/payment/refund' \
--header 'Content-Type: application/json' \
--header 'X-App-Key: f63e6ab9-6f3f-4081-ab45-9a941f8e1344' \
--data-raw '{
"merchantId": "855500000027",
"terminalId": "48593451",
"paymentType": "refund",
"commerceIndicator": "moto"
"amount": "100",
"level": "2",
"cardData": {
"panNumber": "4111111111111111",
"expiryDate": "1231"
},
"invoiceDetails": {
"purchaseOrderNumber": "1000010"
},
"billTo": {
"firstName": "Artan",
"lastName": "Merko",
"email": "[email protected]"
}
}'Field Specifications
Purchase Order Number (invoiceDetails.purchaseOrderNumber)
invoiceDetails.purchaseOrderNumber)- Format: Alphanumeric characters only
- Restrictions: No hyphens, spaces, or special characters
- Maximum Length: 17 characters
- Important: Requests with 18+ characters will fail
Customer Name (billTo.firstName and billTo.lastName)
billTo.firstName and billTo.lastName)- Purpose: Customer identification
- Requirement: Must match the name on the card
- Maximum Length: 60 characters each
- Format: String
Email Address (billTo.email)
billTo.email)- Purpose: Customer contact information
- Format: Valid email address including full domain name
- Maximum Length: 255 characters
- Example:
[email protected]
Response Format
Success Response
{
"responseCode": "00",
"ref_id": "unique-transaction-id",
"status": "AUTHORIZED",
"processorInformation": {
"approvalCode": "123456",
"retrievalReferenceNumber": "123456789012"
}
}Error Response
{
"error": {
"status": "INVALID_REQUEST",
"reason": "MISSING_FIELD",
"message": "Required field missing"
}
}Important Notes
- Level 2 Processing: Set
levelto "2" for enhanced commercial card processing - Field Validation: All L2 required fields must be present and properly formatted
- Purchase Order: Critical for L2 - must be exactly 17 characters or less, alphanumeric only
- Customer Information: Names should match cardholder information for best processing rates
- Environment: Use sandbox URL for testing, production URL will be provided separately
Error Handling
Common validation errors for L2 transactions:
- Missing required L2 fields (
billTo,invoiceDetails) - Invalid
purchaseOrderNumberformat or length - Invalid email format
- Missing or invalid
levelfield
Support
For technical support or questions about L2 processing requirements, contact the VPC development team.