Capture API

Capture transaction is triggered to capture the transaction balance when transaction_status:authorize. This is only available after Pre-Authorized Credit Card or Pre-Authorized GoPay.

Endpoints: /api/v1/core/capture

HTTP Method: POST

Request Body

{
  "transaction_id": "be4f3e44-d6ee-4355-8c64-c1d1dc7f4590",
  "gross_amount": 145000
}
FieldTypeAttributeDescription
transaction_idString(255)RequiredTransaction ID given by Midtrans.
gross_amountLongOptionalTotal amount of transaction in IDR. By default it captures whole transaction amount.
Note: Decimal values are invalid.

Response Body

{
  "status_code" : "200",
  "status_message" : "Success, Credit Card capture transaction is successful",
  "transaction_id" : "ca297170-be4c-45ed-9dc9-be5ba99d30ee",
  "masked_card" : "45111111-1117",
  "order_id" : "testing-0.4555-1414741517",
  "payment_type" : "credit_card",
  "transaction_time" : "2014-10-31 14:46:44",
  "transaction_status" : "capture",
  "fraud_status" : "accept",
  "bank" : "bni",
  "gross_amount" : "30000.00"
}
{
  "status_code" : "412",
  "status_message" : "Merchant cannot modify the status of the transaction"
}
FieldTypeDescription
status_codeStringStatus code of transaction capture result.
status_messageStringDescription of transaction capture result.
order_idStringOrder ID specified by you.
transaction_idStringTransaction ID given by Midtrans.
masked_cardStringFirst 8-digits and last 4-digits of customer's card number.
gross_amountStringTotal amount of transaction in IDR.
order_idStringOrder ID specified by you.
payment_typeStringThe payment method used by the customer.
transaction_timeStringTimestamp of transaction in ISO 8601 format. Time Zone: GMT+7.
transaction_statusStringTransaction status after capture card transaction.
fraud_statusStringDetection result by Fraud Detection System (FDS). Possible values are
accept : Approved by FDS.
deny: Denied by FDS. Transaction automatically failed.
bankStringThe name of the acquiring bank.
gross_amountStringTotal amount of transaction in IDR.