get https://api.sandbox.midtrans.com/v2//status/b2b
Get Transaction Status B2B is triggered to obtain the transaction status for all B2B transactions related to an order_id
. Get Status B2B API can be used by both Snap and Core API integration.
Get Transaction Status B2B Method
HTTP Method | Endpoint | Definition |
---|---|---|
GET | BASE_URL/v2/{order_id OR transaction_id} /status/b2b | Get Status B2B Transaction |
Get Status Transaction B2B Request
See sample on the right -- try it yourself!
Query Parameter | Description | Required |
---|---|---|
page | Index of the search. Default is 0 . | Optional |
per_page | Number of transactions displayed per page. Default is 10 . | Optional |
Say merchant has five transactions created under a certain order_id A. The transactions are B, C, D, E, F (ordered to the latest). Below are the examples on how merchant can use page
and per_page
parameters.
per_page
is not set,page
is not set: Merchant gets F, E, D, C, B, Aper_page
is set 2,page
is not set: Merchant gets F, Eper_page
is set 2,page
is set 1: Merchant gets D, Cper_page
is set 3,page
is set 1: Merchant gets C, B, A
Get Status Transaction B2B Response
{
"status_code": "200",
"status_message": "Success, transactions are retrieved",
"transactions": [
{
"payment_type": "echannel",
"bill_key": "990568881594",
"transaction_time": "2016-09-17 06:36:31",
"gross_amount": "6000.00",
"order_id": "vttesta73fb08ebd1-160916233631561",
"signature_key": "ae85d0ade1bcdfdce4400b63918a8250b3ce45056621c743f71c02197e851accae43787190ee343b18f665d811a4e4d372bddbd347bda588a90d89c1b1c4ed53",
"status_code": "200",
"transaction_id": "647c9366-596a-4ba2-b20f-77baaa1e6647",
"transaction_status": "settlement",
"fraud_status": "accept",
"status_message": "Success, transaction is found"
},
{
"payment_type": "echannel",
"bill_key": "990568881594",
"transaction_time": "2016-09-17 06:34:52",
"gross_amount": "6000.00",
"order_id": "vttesta73fb08ebd1",
"signature_key": "e8ae2f8cba40fe505c3c0f8bfec8dbc748ee5c8d04ad0699f33d17b7fc6aba5b1218f518226b4ea2ff095cb60125a5e6e1cb345608446378d29cb10ad687f560",
"status_code": "200",
"transaction_id": "f9a6684f-e3b4-46dd-8b6c-b61d805b3c6f",
"transaction_status": "settlement",
"fraud_status": "accept",
"status_message": "Success, transaction is found"
}
]
}
JSON Attribute | Description | Type | |
---|---|---|---|
status_code | Status code of transaction charge result | String | |
status_message | Description of transaction charge result. | String | |
transactions | Details of transaction | JSON Array | |
payment_type | The payment method used by the customer. | String | |
bill_key | String | ||
transaction_time | Timestamp of transaction in ISO 8601 format. Time Zone: GMT+7. | String | |
gross_amount | Total amount of transaction in IDR. | String | |
order_id | Order ID specified by you. | String | |
signature_key | Signature key to validate if the notification is originated from Midtrans. | String | |
status_code | Status code of transaction charge result. | String | |
transaction_id | Transaction ID given by Midtrans. | 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 | |
status_message | Description of transaction charge result. | String |