Skip to content

Capture

This transaction captures the money previously held by the corresponding authorization transaction. As a result, the issuing bank credits the funds to the merchant's bank account and updates the cardholder's statement. Card regulations require a merchant to ship goods before settling the funds for an order.


Request

To initiate a capture transaction, send a POST request to https://processing.ecomcharge.com/transactions/captures with the following parameters:

Parameter Type Description
parent_uid * required
string A UID of the authorization transaction.
amount * required
bigInteger An amount to capture in minimal currency units, for example 1000 for $10.00.
duplicate_check boolean The parameter controls whether the payment gateway will do a duplicate check of the received capture requests. By default, it is set to true and the duplicate request with the same parent_uid and amount sent within 30 seconds after the first request will be rejected.
Example of the request
{
  "request":{
    "parent_uid":"1-310b0da80b",
    "amount":50
  }
}
Response
Parameter Type Description
transaction * required
object
uid * required
string A UID of the processed transaction.
status * required
string A status of the processed transaction.
message * required
string A processing result message.
type * required
string A transaction type.
receipt_url * required
string A transaction receipt URL.
be_protected_verification object A section of parameters of the beProtected verification service.
Example of the response
{
  "transaction":{
      "capture":{
        "message":"The operation was successfully processed.",
        "ref_id":"8889999",
        "gateway_id":152,
        "status":"successful"
      },
      "uid":"2-310b0da80b",
      "status":"successful",
      "message":"Successfully processed",
      "amount":50,
      "parent_uid":"1-310b0da80b",
      "receipt_url": "https://gateway.ecomcharge.com/customer/transactions/2-310b0da80b/11443f39ae75aa1f955a9c9283cd5045bfb0413b65d666f834a9da4e7d3926b5",
      "currency":"USD",
      "type":"capture",
      "test":false
  }
}
Example of the response with failed beProtected section
{
  "transaction":{
    "be_protected_verification":{
      "status":"failed",
      "message":"Merchant terminal limits exceeded (maximum transaction amount). Transaction didn't pass anti-fraud checks.",
      "limit":{
        "volume":false,
        "count":false,
        "max":true,
        "current_volume":100,
        "current_count":1
      },
      "white_black_list":{
        "card_number":"black",
        "ip":"absent",
        "email":"absent"
      },
      "rules":{
        "1_123_My Shop":{
          "more_100_eur" : {"Transaction amount more than 100 AND Transaction currency is EUR": "passed"}
        },
        "1_John Doe":{},
        "eComCharge":{}
      }
    },
    "uid":"2-310b0da80b",
    "status":"failed",
    "message":"Merchant terminal limits exceeded (maximum transaction amount). Transaction didn't pass anti-fraud checks.",
    "amount":50,
    "parent_uid":"1-310b0da80b",
    "receipt_url": "https://gateway.ecomcharge.com/customer/transactions/2-310b0da80b/11443f39ae75aa1f955a9c9283cd5045bfb0413b65d666f834a9da4e7d3926b5",
    "currency":"USD",
    "type":"capture",
    "test":false
  }
}
Example of the response with successful beProtected section
{
  "transaction":{
    "capture":{
      "message":"The operation was successfully processed.",
      "ref_id":"8889999",
      "gateway_id":152,
      "status":"successful"
    },
    "be_protected_verification":{
      "status":"successful",
      "limit":{
        "volume":false,
        "count":false,
        "max":false,
        "current_volume":90,
        "current_count":1
      },
      "white_black_list":{
        "card_number":"absent",
        "ip":"absent",
        "email":"absent"
      },
      "rules":{
        "1_123_My Shop":{
          "more_100_eur" : {"Transaction amount more than 100 AND Transaction currency is EUR": "passed"}
        },
        "1_John Doe":{},
        "eComCharge":{}
      }
    },
    "uid":"2-310b0da80b",
    "status":"successful",
    "message":"Successfully processed",
    "amount":50,
    "parent_uid":"1-310b0da80b",
    "receipt_url": "https://gateway.ecomcharge.com/customer/transactions/2-310b0da80b/11443f39ae75aa1f955a9c9283cd5045bfb0413b65d666f834a9da4e7d3926b5",
    "currency":"USD",
    "type":"capture",
    "test":false
  }
}