Skip to content

Capture

This operation credits the funds that were previously reserved by the authorization operation, and the money is transferred to your current account.


Request

To make a capture transaction, send a POST request to https://api.bepaid.by/beyag/transactions/captures with the following parameters:

Parameter Type Description
request object
parent_uid * required
string A UID of the parent transaction.
amount * required
integer Cost in minimal currency units, for example $32.45 must be sent as 3245
currency string A transaction currency in the ISO-4217 alpha-3 code format. For example, USD.
Example of the request
{
  "request":{
    "parent_uid":"1-310b0da80b",
    "amount":50
  }
}
Response
Parameter Type Description
transaction object
uid * required
string Processed transaction UID
parent_uid * required
string UID of a parent transaction.
type * required
string Transaction type.
status * required
string A transaction status.
amount * required
integer Cost in minimal currency units, for example $32.45 must be sent as 3245
currency * required
string A transaction currency in the ISO-4217 alpha-3 code format. For example, USD.
description * required
string The order short description. Max length: 255 chars.
created_at * required
string Time when transaction was created in ISO 8601 format.
updated_at * required
string A date and time when the transaction was updated in ISO 8601 format.
message string Processing result message.
amount integer Amount to capture.
tracking_id string The ID of your transaction or order.
test boolean true or false. The transaction will be a test one if it is true
language string Language of your checkout page or customer.
paid_at string Transaction processing date.
method_type * required
string payment method name used to capture authorized money.
receipt_url * required
string Transaction receipt URL
capture object
status * required
string Transaction status.
ref_id * required
string Transaction ID of external payment method system.
message * required
string Message from the payment method provider.
be_protected_verification object A section of parameters of the beProtected verification service.
Example of the response
{
  "transaction": {
    "uid": "2-310b0da80b",
    "parent_uid": "1-310b0da80b",
    "type": "capture",
    "status": "successful",
    "message": "The operation was successfully processed",
    "created_at": "2014-06-11T12:04:59+03:00",
    "updated_at": "2014-06-11T12:04:59+03:00",
    "amount": 50,
    "currency": "USD",
    "test": false,
    "method_type": ":method_name",
    "receipt_url": "https://merchant.bepaid.by/customer/transactions/1-310b0da80b/11443f39ae75aa1f955a9c9283cd5045bfb0413b65d666f834a9da4e7d3926b5",
    "capture": {
      "message": "The operation was successfully processed",
      "ref_id": "8889999",
      "status": "successful"
    }
  }
}
Example of the response with beProtected section
{
  "transaction": {
    "uid": "2-310b0da80b",
    "parent_uid": "1-310b0da80b",
    "type": "capture",
    "status": "successful",
    "message": "The operation was successfully processed",
    "created_at": "2014-06-11T12:04:59+03:00",
    "updated_at": "2014-06-11T12:04:59+03:00",
    "amount": 50,
    "currency": "USD",
    "test": false,
    "method_type": ":method_name",
    "receipt_url": "https://merchant.bepaid.by/customer/transactions/1-310b0da80b/11443f39ae75aa1f955a9c9283cd5045bfb0413b65d666f834a9da4e7d3926b5",
    "capture": {
      "message": "The operation was successfully processed",
      "ref_id": "8889999",
      "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":{},
        "bePaid":{}
      }
    }
  }
}