Capture a credit card payment

The Capture Transaction endpoint can be used to capture part or all of a preauthorized credit card payment processed 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.

🚧

Capture Timeframes

Preauthorized payments must be captured within 7 days of processing, or they will automatically expire. Attempting to capture an expired payment after this timeframe will result in an error response.

Capture requests

The Process Capture Transaction endpoint will allow you to process a capture a partial or full amount of a preauthorized credit card payment. Multiple partial capture requests may be submitted for a preauthorized payment, up to the full original amount of that payment.

The Capture API Reference outlines the required and optional body parameters needed for your request. The minimum required information in the body of your request includes a valid preAuthTransactionId, the ipAddress where the payment is processed, and the amount of the payment being captured.

Review Process Capture Transaction API Reference

// Example Capture request
const options = {
  method: 'POST',
  headers: {
    accept: 'application/json',
    'idempotency-key': 'Idempotency20240514test05',
    'content-type': 'application/json',
    'api-token': 'YOUR_API_TOKEN'
  },
  body: JSON.stringify({
    amount: 100.99, 
    ipAddress: '192.168.1.1', 
    preAuthTransactionId: 25597748
  })
};

fetch('https://api.helcim.com/v2/payment/capture', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

Potential payment responses

The Process Capture Transaction endpoint will respond to all requests with either:

  • A transaction object with a type of 'capture', 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.

  • A successful payment will contain a status with the value of 'APPROVED'.
{
  "transactionId": 25599294,
  "dateCreated": "2024-05-15 09:48:02",
  "cardBatchId": 3567154,
  "status": "APPROVED",
  "user": "Helcim System",
  "type": "capture",
  "amount": 100.99,
  "currency": "CAD",
  "avsResponse": "X",
  "cvvResponse": "",
  "cardType": "MC",
  "approvalCode": "T3E8ST",
  "cardToken": "",
  "cardNumber": "5454545454",
  "cardHolderName": "John Doe",
  "customerCode": "CST1035",
  "invoiceNumber": "INV1270",
  "warning": ""
}
  • An unsuccessful payment will contain a status with the value of 'DECLINED'. It will also contain an errors value that contains more information on why the payment was declined.

Attempting to capture expired or fully captured payments

Attempting to capture a preauthorized payment that has expired or has been fully captured will result in an error response indicating that the original payment can no longer be captured.

{
  "errors": "Preauth can no longer be captured"
}