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
}| Field | Type | Attribute | Description |
|---|---|---|---|
| transaction_id | String(255) | Required | Transaction ID given by Midtrans. |
| gross_amount | Long | Optional | Total 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"
}| Field | Type | Description |
|---|---|---|
| status_code | String | Status code of transaction capture result. |
| status_message | String | Description of transaction capture result. |
| order_id | String | Order ID specified by you. |
| transaction_id | String | Transaction ID given by Midtrans. |
| masked_card | String | First 8-digits and last 4-digits of customer's card number. |
| gross_amount | String | Total amount of transaction in IDR. |
| order_id | String | Order ID specified by you. |
| payment_type | String | The payment method used by the customer. |
| transaction_time | String | Timestamp of transaction in ISO 8601 format. Time Zone: GMT+7. |
| transaction_status | String | Transaction status after capture card transaction. |
| fraud_status | String | Detection result by Fraud Detection System (FDS). Possible values areaccept : Approved by FDS.deny: Denied by FDS. Transaction automatically failed. |
| bank | String | The name of the acquiring bank. |
| gross_amount | String | Total amount of transaction in IDR. |