Mandiri Bill Payment

The steps to integrate with Mandiri Bill Payment are given below.

  1. Send the charge API request to Midtrans.
  2. Display bill key and biller code to the customer.
  3. Handle notifications.

Send a Charge API request with the details of the transaction such as payment_type, echannel, transaction_details, item_details, and customer_details. Successful request returns a VA number.

By default, default expiry time for bank transfer is 24 hours unless specified by merchant (min 20s, max 180 days).


🚧

Note

Sometimes, because of a reversal triggered by the corresponding payment provider, the transaction status can change from SETTLEMENT to DENY. It may happen within the span of one minute.




Mandiri Charge API Request


{
    "payment_type": "echannel",
    "transaction_details": {
        "order_id": "1388",
        "gross_amount": 95000
        },
    "item_details": [
        {
          "id": "a1",
          "price": 50000,
          "quantity": 2,
          "name": "Apel"
        },
        {
         "id": "a2",
          "price": 45000,
          "quantity": 1,
          "name": "Jeruk"
        }
    ],
    "echannel" : {
        "bill_info1" : "Payment For:",
        "bill_info2" : "debt",
        "bill_key" : "081211111111"
    }
}
JSON AttributeDescriptionTypeRequired
payment_typeSet E-channel payment method. Value: echannel.StringRequired
transaction_detailsThe details of the specific transaction such as order_id and gross_amount.ObjectRequired
item_detailsDetails of the item(s) purchased by the customer.ObjectOptional
customer_detailsDetails of the customer.ObjectOptional
echannelCharge details using Mandiri Bill Payment.ObjectRequired



Mandiri Bill Sample Responses and Notifications


{
  "status_code": "201",
  "status_message": "Success, Mandiri Bill transaction is successful",
  "transaction_id": "883af6a4-c1b4-4d39-9bd8-b148fcebe853",
  "order_id": "tes",
  "gross_amount": "1000.00",
  "payment_type": "echannel",
  "transaction_time": "2016-06-19 14:40:19",
  "transaction_status": "pending",
  "fraud_status": "accept",
  "bill_key": "990000000260",
  "biller_code": "70012",
  "currency": "IDR",
  "expiry_time": "2017-01-09 09:56:44"
}
{
  "status_code": "201",
  "status_message": "midtrans payment notification",
  "transaction_id": "883af6a4-c1b4-4d39-9bd8-b148fcebe853",
  "order_id": "tes",
  "gross_amount": "1000.00",
  "payment_type": "echannel",
  "transaction_time": "2016-06-19 14:40:19",
  "transaction_status": "pending",
  "signature_key": "d1ebf5bf14a7c96ca58e719832de459898f61fa8d81560f59e9a38a5187383b1d507e3075277d9b1c6227926fc8a0448e164f1b9de33c8141f81c57b87d23775",
  "bill_key": "990000000260",
  "biller_code": "70012",
  "expiry_time": "2017-01-09 09:56:44"
}
{
  "status_code": "200",
  "status_message": "midtrans payment notification",
  "transaction_id": "883af6a4-c1b4-4d39-9bd8-b148fcebe853",
  "order_id": "tes",
  "gross_amount": "1000.00",
  "payment_type": "echannel",
  "transaction_time": "2016-06-19 15:10:29",
  "transaction_status": "settlement",
  "approval_code": "340093197",
  "signature_key": "bbceb3724b0b2446c59435795039fed2d249d3438f06bf90c999cc9d383b95170b7b58f9412fba25ce7756da8075ab1d78a48800156380a62dc84eb22b3f7de9",
  "bill_key": "990000000260",
  "biller_code": "70012",
  "expiry_time": "2017-01-09 09:56:44"
}
{
  "status_code": "202",
  "status_message": "midtrans payment notification",
  "transaction_id": "883af6a4-c1b4-4d39-9bd8-b148fcebe853",
  "order_id": "tes",
  "gross_amount": "1000.00",
  "payment_type": "echannel",
  "transaction_time": "2016-06-20 14:40:19",
  "transaction_status": "expire",
  "signature_key": "69ef827242b29640a1193b6c2f32ba1374c04b969f7723984a6c676349ee7927cb6b263546d138e3a5c788829fbc4f114353b67becad2af7a86b1b741fc8d80a",
  "bill_key": "990000000260",
  "biller_code": "70012",
  "expiry_time": "2017-01-09 09:56:44"
}
JSON AttributeDescriptionType
status_codeStatus code of transaction charge result.String
status_messageDescription of transaction charge result.String
transaction_idTransaction ID given by Midtrans.String
order_idOrder ID specified by you.String
gross_amountTotal amount of transaction in IDR.String
payment_typeTransaction payment method.String
transaction_timeTimestamp of transaction in ISO 8601 format. Time Zone: GMT+7.String
transaction_statusStatus of bank transfer transaction. Value:
pending : Bank Transfer transaction is created.
String
fraud_statusDetection result by Fraud Detection System (FDS). Value:
accept : Approved by FDS.
String
bill_keyMerchant Biller Key ID to perform transaction.String
biller_codeMidtrans Unique Biler Code Number. Value is 70012.String
currencyISO-4217 representation of three-letter alphabetic currency code. Value: IDR.
Note: Currently only IDR is supported.
String
signature_keyCombination of parameters such as order_id, status_code, gross_amount, server_key to verify integrity of payload/response.String

📘

Note

Possible error codes are 400, 401, 402, 406, 410