Helcim Logo Support & Tutorials

© Copyright 2006-2018 Helcim Inc.

All Rights Reserved.

Helcim Commerce API » Processing Payments » Card Payments »

Verification-Only

This API call let's you verify a credit card. The response is an XML of the credit card verification.

Request Fields

Field Name Type Required Description
transactionType String Yes verify
accountId Integer Yes The Helcim Commerce account ID.
apiToken String Yes API token used for authentication and access control. 
customerCode String No The customer code.
cardHolderName String No The cardholder names.
cardNumber Integer Yes The credit card number.
cardExpiry Integer Yes The credit card expiration date
cardCVV Integer No The credit card CVV (digits on back of credit card).
cardHolderAddress String No The card holder's address.
cardHolderPostalCode String No The card holder's postal code.
ipAddress String No IP Address of the customer making the transaction

Response Fields (XML)

Field Name Type Description
message - XML structure
response Integer 1 or 0. Whether the transaction was approved or declined.
responseMessage String Result of transaction (Approved/Denied).
notice String Error/warning message from Helcim. 
transaction - XML structure
transactionId Integer The transaction ID.
type String The transaction type (verify, purchase, refund, pre-auth, capture).
date String The date of the transactions
time String The time of the transaction.
cardHolderName String The card holder's name.
amount Decimal The amount of the transactions.
currency String The currency of the transaction.
cardnumber String The credit card number (first 4 and last 4 digits only).
cardToken String The credit card token.
expiryDate Integer The credit card expiry date.
cardType String The credit card type (Visa, Mastercard, Amex, Discovery).
avsResponse String The address verification response.
cvvResponse String The CVV verification response.
approvalCode String The approval code.
orderNumber String The order number.
customerCode String The customer code.

Errors

For all API requests, there are also generic API authentication and user access restriction errors.
Response Code Error Code Message Description
0 - Card Has Expired The credit card has expired, or the expiration wasn't entered.
0 - Declined - Invalid Card Number Invalid Expiry Date The credit card number and/or expiry date was not entered or is invalid.

Code Samples

Sample Transaction Type Verify Response XML

<?xml version="1.0"?>
<message>
    <response>1</response>
    <responseMessage>APPROVED</responseMessage>
    <notice></notice>
    <transaction>
        <transactionId>123006</transactionId>
        <type>verify</type>
        <date>2017-07-07</date>
        <time>11:10:53</time>
        <cardHolderName>John Smith</cardHolderName>
        <amount>0</amount>
        <currency>CAD</currency>
        <cardNumber>4242********4242</cardNumber>
        <cardToken>55669d8ec9f8c7e3f5af19</cardToken>
        <expiryDate>1020</expiryDate>
        <cardType>Visa</cardType>
        <avsResponse>X</avsResponse>
        <cvvResponse>M</cvvResponse>
        <approvalCode>T4E7ST</approvalCode>
        <orderNumber></orderNumber>
        <customerCode>12A1141</customerCode>
    </transaction>
</message>

HTML Form Sample HTML

<input type="hidden" name="accountId" value="YOUR-ACCOUNT-ID">
<input type="hidden" name="apiToken" value="YOUR-API-TOKEN">
<input type="hidden" name="transactionType" value="purchase">
<input type="hidden" name="customerCode" value="12A1141">
<input type="hidden" name="cardHolderName" value="John Smith">
<input type="hidden" name="cardNumber" value="5454545454545454">
<input type="hidden" name="cardExpiry" value="1020">
<input type="hidden" name="cardCVV" value="100">
<input type="hidden" name="cardHolderAddress" value="123 Home Street, Calgary, Alberta, Canada">
<input type="hidden" name="cardHolderPostalCode" value="T2H1K7">