Permata Virtual Account

The steps to integrate with Permata Virtual Account are given below.

  1. Send the charge API request to Midtrans.
  2. Display the virtual account number.
  3. Handle notifications.

Send a Charge API request with the details of the transaction such as payment_type, transaction_details, bank_transfer, 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).


🚧

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.




Permata Charge API Request


{
  "payment_type": "bank_transfer",
  "bank_transfer": {
    "bank": "permata",
    "permata": {
      "recipient_name": "SUDARSONO"
    }
  },
  "transaction_details": {
    "order_id": "H17550",
    "gross_amount": 145000
  }
}
JSON AttributeDescriptionTypeRequired
payment_typeSet Bank Transfer payment method. Value: bank_transfer.StringRequired
bank_transferCharge details using bank transfer.ObjectRequired
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



Permata Virtual Account Response and Notifications


{
  "status_code": "201",
  "status_message": "Success, PERMATA VA transaction is successful",
  "transaction_id": "6fd88567-62da-43ff-8fe6-5717e430ffc7",
  "order_id": "H17550",
  "gross_amount": "145000.00",
  "payment_type": "bank_transfer",
  "transaction_time": "2016-06-19 13:42:29",
  "transaction_status": "pending",
  "fraud_status": "accept",
  "permata_va_number": "8562000087926752",
  "expiry_time": "2017-01-09 09:56:44"
}
{
  "status_code": "201",
  "status_message": "midtrans payment notification",
  "transaction_id": "6fd88567-62da-43ff-8fe6-5717e430ffc7",
  "order_id": "H17550",
  "gross_amount": "145000.00",
  "payment_type": "bank_transfer",
  "transaction_time": "2016-06-19 13:42:29",
  "transaction_status": "pending",
  "fraud_status": "accept",
  "permata_va_number": "8562000087926752",
  "signature_key": "66aa11a65b18e9ee5da966ed18d5d2163812000eee37824ceb59aba1ded005e992e05a7dfac39098ebdb0e2c8b484e140b586246d34b4ca313c690cc6eae48cf",
  "expiry_time": "2017-01-09 09:56:44"
}
{
  "status_code": "200",
  "status_message": "midtrans payment notification",
  "transaction_id": "6fd88567-62da-43ff-8fe6-5717e430ffc7",
  "order_id": "H17550",
  "gross_amount": "145000.00",
  "payment_type": "bank_transfer",
  "transaction_time": "2016-06-19 18:23:21",
  "transaction_status": "settlement",
  "fraud_status": "accept",
  "permata_va_number": "8562000087926752",
  "signature_key": "0c0df82489931602577d9e434966c0540249b7c0aeaae2b718305af89a11e2bf9b4008aba07d1b3b248b15b4fbecdd15e81dbb2648b974efc4e0656e8c976094",
  "expiry_time": "2017-01-09 09:56:44"
}
{
  "status_code": "202",
  "status_message": "midtrans payment notification",
  "transaction_id": "6fd88567-62da-43ff-8fe6-5717e430ffc7",
  "order_id": "H17550",
  "gross_amount": "145000.00",
  "payment_type": "bank_transfer",
  "transaction_time": "2016-06-20 13:42:30",
  "transaction_status": "expire",
  "fraud_status": "accept",
  "permata_va_number": "8562000087926752",
  "signature_key": "f1066b06ec8a4b7d6ffb941fd9772f6df304618e15e02cf17c2914cec12793e19c71653042f7f617b027eae6ecb6759529c67eca9af55264b736408d8b4df2b9",
  "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
permata_va_numberVirtual Account number generated by Midtrans. Customer has to know this number to complete the payment.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