Helcim Logo Support & Tutorials

© Copyright 2006-2018 Helcim Inc.

All Rights Reserved.

Helcim Commerce API » Processing Payments » Card Payments »

Capture (Force)

This API call let's you process a capture. The response is an XML of the processed capture.

Request Fields

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

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 (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 - Invalid Transaction ID The transaction ID is invalid, or not entered.
0 - This transaction cannot be captured The transaction was already captured.

Code Samples

Sample Transaction Type Capture Response XML

<?xml version="1.0"?>
<message>
    <response>1</response>
    <responseMessage>APPROVED</responseMessage>
    <notice></notice>
    <transaction>
        <transactionId>123076</transactionId>
        <type>capture</type>
        <date>2017-07-07</date>
        <time>11:28:19</time>
        <cardHolderName>Radu</cardHolderName>
        <amount>100.00</amount>
        <currency>CAD</currency>
        <cardNumber>5454********5454</cardNumber>
        <cardToken>16882e60c3eabc1d7abcbe</cardToken>
        <expiryDate>0118</expiryDate>
        <cardType>MasterCard</cardType>
        <avsResponse>X</avsResponse>
        <cvvResponse></cvvResponse>
        <approvalCode>T7E4ST</approvalCode>
        <orderNumber>ORDR11735</orderNumber>
        <customerCode>12A1177</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="capture">
<input type="hidden" name="transactionId" value="123073">