Helcim Logo Support & Tutorials

© Copyright 2006-2018 Helcim Inc.

All Rights Reserved.

Helcim Commerce API » Transactions » Card Transactions »

View a Transaction

This API call let's you retrieve the details of a specific transaction. The response is an XML of the available transaction information.

Request Fields

Field Name Type Required Description
action String Yes transactionView
accountId Integer Yes The Helcim Commerce account ID.
apiToken String Yes API token used for authentication and access control. 
transactionId String Yes The transaction ID.

Response Fields (XML)

Field Name Type Description
transactions - XML structure
transaction - XML structure
id Integer The transaction ID.
dateCreated String The date the transaction was created.
status String Approved/Denied.
user String The customer's name.
type String The transaction type (Purchase, Pre-auth, Capture, Refund).
amount Decimal The transaction amount.
approvalCode String The approval code.
avsResponse String Address verification response.
cvvResponse String Card verification value response.
test Integer 1 or 0. Whether or not the transaction is processed as test.
acquirerTransactionId Integer Transaction Id assigned by the acquirer to the transaction.  
responseMessage String Approved/Denied.
ipAddress String The IP address.
orderNumber String The order number.
card - XML structure
cardType String The credit card brand.
cardNumber String The credit card number (first 4 and last 4 digits only).
cardExpiry Integer The credit card expiry date.
cardHolderName String The credit card holder's name.
cardToken String The credit card token.
card - XML structure
batch - XML structure
batchNumber Integer The batch number.
terminal String The terminal the transaction was processed through.
settled Integer 1 or 0. Whether the transaction was settled or not.
dateOpened String The date the batch was open.
dateClosed String The date the batch was closed. 

Errors

For all API requests, there are also generic API authentication and user access restriction errors.
Response Code Error Code Message Description
0 - Invalid Transaction ID The transaction ID is invalid, or not entered.
0 - User Access Error - Transaction cannot be viewed by this user. The user does not have permission to view this transaction.

Code Samples

Sample Transaction View Response XML

<?xml version="1.0"?>
<transactions>
    <transaction>
        <id>112094</id>
        <dateCreated>2017-06-30 14:21:27</dateCreated>
        <status>APPROVED</status>
        <user>Rodolfo Ferro Casagrande</user>
        <type>PURCHASE</type>
        <amount>500.00</amount>
        <approvalCode>T1E8ST</approvalCode>
        <avsResponse>X</avsResponse>
        <cvvResponse></cvvResponse>
        <test>0</test>
        <acquirerTransactionId></acquirerTransactionId>
        <responseMessage>APPROVED</responseMessage>
        <ipAddress>216.123.206.20</ipAddress>
        <orderNumber>ORDR11631</orderNumber>
        <card>
            <cardType>MasterCard</cardType>
            <cardNumber>5524********9032</cardNumber>
            <cardExpiry>0518</cardExpiry>
            <cardHolderName>NICOLAS BEIQUE</cardHolderName>
            <cardToken>863fd7725d5082ebc3bffe</cardToken>
        </card>
        <batch>
            <batchNumber>103</batchNumber>
            <terminal>Demo Terminal - CAD</terminal>
            <settled>0</settled>
            <dateOpened>2017-06-30 12:20:33</dateOpened>
            <dateClosed>0000-00-00 00:00:00</dateClosed>
        </batch>
    </transaction>
</transactions>

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="action" value="transactionView">
<input type="hidden" name="transactionId" value="112094">