get https://api.sandbox.midtrans.com/v2//status?
Get Transaction Status is triggered to obtain the transaction_status
and other details of a specific transaction. Get Status API can be used by both Snap and Core API integration.
Get Transaction Status Method
See sample on the right -- try it yourself!
HTTP Method | Endpoint | Definition |
---|---|---|
GET | BASE_URL/v2/{order_id OR transaction_id} /status | Get the status of transaction. |
Get Status Transaction Response
{
"status_code" : "200",
"status_message" : "Success, Credit Card transaction is successful",
"transaction_id" : "249fc620-6017-4540-af7c-5a1c25788f46",
"masked_card" : "48111111-1114",
"order_id" : "example-1424936368",
"payment_type" : "credit_card",
"transaction_time" : "2015-02-26 14:39:33",
"transaction_status" : "capture",
"fraud_status" : "accept",
"approval_code" : "1424936374393",
"signature_key" : "2802a264cb978fbc59f631c68d120cbda8dc853f5dfdc52301c615cf4f14e7a0b09aa...",
"bank" : "bni",
"gross_amount" : "30000.00",
"channel_response_code": "00",
"channel_response_message": "Approved",
"card_type": "credit",
"reference_id": "DL-dduIy7XtGtvxJtNNpOfbAt",
"channel": "dragon",
"expiry_time":"2015-03-06 14:39:33",
"settlement_time":"2015-02-26 16:00:00"
}
{
"status_code" : "200",
"status_message" : "Success, refund request is approved by the bank",
"transaction_id" : "249fc620-6017-4540-af7c-5a1c25788f46",
"masked_card" : "48111111-1114",
"order_id" : "example-1424936368",
"payment_type" : "credit_card",
"transaction_time" : "2015-02-26 14:39:33",
"transaction_status" : "partial_refund",
"fraud_status" : "accept",
"approval_code" : "1424936374393",
"signature_key" : "2802a264cb978fbc59f631c68d120cbda8dc853f5dfdc52301c615cf4f14e7a0b09aa...",
"bank" : "bni",
"gross_amount" : "30000.00",
"channel_response_code": "00",
"channel_response_message": "Approved",
"card_type": "credit",
"payment_option_type": "GOPAY_WALLET",
"refund_amount": "12000.00",
"refunds": [
{
"refund_chargeback_id": 1,
"refund_amount": "5000.00",
"created_at": "2015-02-27 00:14:20",
"reason": "some reason",
"refund_key": "reference1"
},
{
"refund_chargeback_id": 2,
"refund_amount": "7000.00",
"created_at": "2015-02-28 01:23:15",
"reason": "",
"refund_key": "reference2"
},
]
}
{
"status_code" : "200",
"status_message" : "Success, refund request is approved by the bank",
"transaction_id" : "249fc620-6017-4540-af7c-5a1c25788f46",
"masked_card" : "48111111-1114",
"order_id" : "example-1424936368",
"payment_type" : "credit_card",
"transaction_time" : "2015-02-26 14:39:33",
"transaction_status" : "partial_refund",
"fraud_status" : "accept",
"approval_code" : "1424936374393",
"signature_key" : "2802a264cb978fbc59f631c68d120cbda8dc853f5dfdc52301c615cf4f14e7a0b09aa...",
"bank" : "bni",
"gross_amount" : "30000.00",
"channel_response_code": "00",
"channel_response_message": "Approved",
"card_type": "credit",
"payment_option_type": "GOPAY_WALLET",
"refund_amount": "12000.00",
"refunds": [
{
"refund_chargeback_id": 1,
"refund_amount": "5000.00",
"created_at": "2015-02-27 00:14:20",
"reason": "some reason",
"refund_key": "reference1",
"refund_method": "online",
"bank_confirmed_at": "2015-02-27 02:30:20"
},
{
"refund_chargeback_id": 2,
"refund_amount": "7000.00",
"created_at": "2015-02-28 01:23:15",
"reason": "",
"refund_key": "reference2",
"refund_method": "offline",
"bank_confirmed_at": "2015-02-27 02:30:20"
},
]
}
JSON Attribute | Description | Type | |
---|---|---|---|
status_code | Status code of transaction charge result | String | |
status_message | Description of transaction charge result. | String | |
transaction_id | Transaction ID given by Midtrans. | String | |
masked_card | First 8-digit and last 4-digit of customer's credit card number. | String | |
order_id | Order ID specified by you. | String | |
payment_type | The payment method used by the customer. | String | |
transaction_time | Timestamp of transaction in ISO 8601 format. Time Zone: GMT+7. | String | |
transaction_status | Transaction status after charge credit card transaction. Possible values arecapture : Transaction is accepted by the bank and ready for settlement. deny : transaction is denied by the bank or FDS.authorize : Credit card is authorized in pre-authorization feature. | String | |
fraud_status | Detection result by Fraud Detection System (FDS). Possible values areaccept : Approved by FDS.challenge : Questioned by FDS. Note: Approve transaction to accept it or transaction gets automatically canceled during settlement.deny : Denied by FDS. Transaction automatically failed. | String | |
approval_code | Approval code from payment provider for successful transaction. It can be used for refund. | String | |
signature_key | Signature key to validate if the notification is originated from Midtrans. | String | |
bank | The acquiring bank of the transaction. | String | |
gross_amount | Total amount of transaction in IDR. | String | |
channel_response_code | Response code from payment channel provider. | String | |
channel_response_message | Response message from payment channel provider | String | |
card_type | Type of card used. Possible values are credit , debit . | String | |
reference_id | Reference ID given by payment provider. Only available for ShopeePay payment type and QRIS payment type with acquirer airpay shopee . | String | |
refund_amount | Cumulative refund amount in `IDR`. | String | |
refunds | List of refund details related to the transaction. Only available on transaction status partial_refund or refund . | JSON Array | |
refund_chargeback_id | Midtrans refund ID. | Long | |
refund_amount | Amount of the specific refund. | String | |
created_at | Timestamp of the refund creation. | String | |
reason | Reason the refund is created. | String | |
refund_key | Merchant refund reference. | String | |
refund_method | Refund confirmation method. The value is applied after Midtrans confirm the refund request (1 day after request is made). Possible values are online , offline . | String | |
bank_confirmed_at | Timestamp of receipt of refund request confirmation from acquiring bank. | String | |
channel | The name of the payment channel provider. Provided if `channel` attribute on charge api request is present. More details on request and possible values are available on [Card Feature: Specific Channel](ref:feature-route-to-specific-channel). | String | |
expiry_time | For regular card transactions (non-recurring, non-one-click, non-two-click token) and the 3DS redirect_url expires in 10 minutes. For authorized transaction expires in 8 days. | String | |
settlement_time | Credit card settlement time refers to the duration it takes for a credit card transaction to be processed and transaction_status change to settlement. | String |