Verify Credit Card Details
The Process Verify Transaction endpoint can be used to create a new credit card verify transaction to verify and tokenize credit card details through the Helcim system. This endpoint will accept a combination of header and body parameters and return a response indicating the outcome of the transaction.
Requirements for using the Verify endpoint
The Process Verify Transaction endpoint only accepts full card numbers, so you need to be approved to process with full card numbers in order to use this endpoint.
If you are not approved to send full card numbers through the API, we recommend using HelcimPay.js to verify and tokenize card details and then process payments through the Process Purchase Transaction endpoint using the
cardToken
returned by HelcimPay.js.
Verify Requests
The Process Verify Transaction endpoint will allow you to process a one time credit card verification. By default all verify payments are for an amount of $0.00.
The Verify API Reference outlines the required and optional body parameters needed for your request. The minimum required information in the body of your request includes the ipAddress
where the payment is processed, the currency
of the payment, a valid cardData
object containing the credit card details, and a valid billingAddress
object containing the customer details.
Review Process Verify Transaction API Reference
// Example Verify request
const options = {
method: 'POST',
headers: {
accept: 'application/json',
'idempotency-key': 'znnvagsni7fwv6uwchhwixjxk',
'content-type': 'application/json',
'api-token': 'YOUR_API_TOKEN'
},
body: JSON.stringify({
cardData: {cardNumber: '5454545454545454', cardExpiry: '1257', cardCVV: '100'},
billingAddress: {
name: 'John Doe',
street1: '123 Test Street',
city: 'Calgary',
province: 'AB',
country: 'CAN',
postalCode: 'H0H0H0',
email: '[email protected]'
},
ipAddress: '192.168.1.1',
currency: 'CAD'
})
};
fetch('https://api.helcim.com/v2/payment/verify', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
Potential Payment Responses
The Process Verify Transaction endpoint will respond to all requests with either:
- A
transaction
object with a type of 'verify', indicating the outcome of the payment. - An
error
response indicating the reason for the error.
Potential Payment Outcomes
A successful payment request will create a transaction object in the Helcim system with a status that indicates the outcome of the payment.
- An approved verify payment will contain a
status
with the value of APPROVAL.
// Example approved transaction object
{
"transactionId": 25737147,
"dateCreated": "2024-05-21 13:06:11",
"cardBatchId": 3581928,
"status": "APPROVAL",
"user": "Helcim System",
"type": "verify",
"amount": 0,
"currency": "CAD",
"avsResponse": "X",
"cvvResponse": "",
"cardType": "MC",
"approvalCode": "T2E7ST",
"cardToken": "7f452517f049eada22d085",
"cardNumber": "5454545454",
"cardHolderName": "John Doe",
"customerCode": "CST1041",
"invoiceNumber": "",
"warning": ""
}
- A declined verify payment will contain a
status
with the value of declined. It will also contain anerrors
value that contains more information on why the payment was declined.
// Example declined transaction object
{
"transactionId": 25737215,
"dateCreated": "2024-05-21 13:07:50",
"cardBatchId": 0,
"status": "DECLINED",
"user": "Helcim System",
"type": "verify",
"amount": 0,
"currency": "CAD",
"avsResponse": "X",
"cvvResponse": "",
"cardType": "MC",
"errors": "Transaction Declined: DECLINE CVV2 - Do not honor due to CVV2 mismatch\\failure"
}
Updated 1 day ago