post https://api.sandbox.midtrans.com/v2/charge
BCA KlikPay is the online banking payment method provided by BCA. This method allows the customers to perform transaction using either their Internet banking account or their private-label BCA credit card. This highly secure payment method utilizes an SMS token for user validation.
The steps to integrate with BCA KlikPay are given below.
- Send the charge API request to Midtrans.
- Redirect the customer to URL specified in the response.
- Redirect your customer back to your page by configuring Finish URL in Midtrans's Dashboard > Configurations.
- Handle notifications.
Send a Charge API request with the details of the transaction such as payment_type
, bca_klikpay
, transaction_details
, item_details
, and customer_details
. Successful request returns a redirect URL.
By default, expiry time for BCA KlikPay is 2 hours unless specified by merchant (min 20s, max 180 days).
BCA KlikPay Charge API Request
{
"payment_type": "bca_klikpay",
"transaction_details": {
"order_id": "orderid-01",
"gross_amount": 11000
},
"item_details": [
{
"id": "1",
"price": 11000,
"quantity": 1,
"name": "Mobil "
}
],
"customer_details":{
"first_name": "John",
"last_name": "Baker",
"email": "[email protected]",
"phone": "08123456789"
},
"bca_klikpay": {
"description": "Pembelian Barang"
}
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
payment_type | Set BCA Klikpay payment method. Value: bca_klikpay . | String | Required |
transaction_details | The details of the specific transaction such as order_id and gross_amount . | Object | Required |
item_details | Details of the item(s) purchased by the customer. | Object | Required |
customer_details | Details of the customer. | Object | Required |
bca_klikpay | Charge details using BCA Klikpay. | Object | Required |
BCA Klikpay Charge Sample Responses and Notifications
{
"status_code": "201",
"status_message": "OK, BCA KlikPay transaction is successful",
"transaction_id": "ada84cd9-2233-4c67-877a-01884eece45e",
"order_id": "orderid-01",
"redirect_url": "https://api.sandbox.veritrans.co.id/v3/bca/klikpay/redirect/ada84cd9-2233-4c67-877a-01884eece45e",
"gross_amount": "11000.00",
"payment_type": "bca_klikpay",
"transaction_time": "2016-06-19 15:42:36",
"transaction_status": "pending",
"fraud_status": "accept",
"currency": "IDR"
}
{
"transaction_time": "2016-06-19 15:42:36",
"gross_amount": "11000.00",
"order_id": "orderid-01",
"payment_type": "bca_klikpay",
"signature_key": "e47d73b2a10347d291e85a7c39c5fa2a7b760f0af7d9882f9c1b26db06e1af948968184b78f67112158cdeddd2141fe41068fdb37361ce11c3d2509354224a80",
"status_code": "201",
"transaction_id": "ada84cd9-2233-4c67-877a-01884eece45e",
"transaction_status": "pending",
"fraud_status": "accept",
"status_message": "midtrans payment notification"
}
{
"approval_code": "91231",
"transaction_time": "2016-06-19 15:46:16",
"gross_amount": "11000.00",
"order_id": "orderid-01",
"payment_type": "bca_klikpay",
"signature_key": "35c4111539e184b268b7c1cd62a9c254e5d27c992c8fd55084f930b69b09eaafcfe14b0d512c697648295fdb45de777e1316b401f4729846a91b3de88cde3f05",
"status_code": "200",
"transaction_id": "ada84cd9-2233-4c67-877a-01884eece45e",
"transaction_status": "settlement",
"fraud_status": "accept",
"status_message": "midtrans payment notification"
}
{
"status_code": "202",
"status_message": "midtrans payment notification",
"transaction_id": "ada84cd9-2233-4c67-877a-01884eece45e",
"order_id": "orderid-01",
"gross_amount": "11000.00",
"payment_type": "bca_klikpay",
"transaction_time": "2016-06-19 17:42:38",
"transaction_status": "expire",
"fraud_status": "accept",
"signature_key": "62a8c432bb5a288a0495dd4f868b0aede4535e0c8a9fbebb3c6e9d4ea0db6f1963e551e70a99e80512030afa5ba8268f9be7b17b13a422ebef4620988c55d5ed"
}
JSON Attribute | Description | Type |
---|---|---|
status_code | Status code of transaction charge result. | String |
status_message | Status message describing the result of the API request. | String |
transaction_id | Transaction ID given by Midtrans. | String |
order_id | Order ID specified by you. | String |
redirect_url | Redirect URL to BCA Klikpay payment page. | String |
gross_amount | Total amount of transaction in IDR. | String |
payment_type | The payment method used by the customer. Value:bca_klickpay . | String |
transaction_time | Timestamp of transaction in ISO 8601 format. Time Zone: GMT+7. | String |
transaction_status | Status of BCA Klikpay transaction. Possible values arepending , settlement , expire . | 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 will get automatically cancelled during settlement.deny : Denied by FDS. Transaction automatically failed. | String |
currency | ISO-4217 representation of three-letter alphabetic currency code. Value: IDR .Note: Currently, only IDR is supported. | String |
signature_key | Combination of parameters such as order_id , status_code , gross_amount , and server_key to verify integrity of payload/response. | String |
approval_code | Successful BCA KlikPay transaction approval code. | String |