KlikBCA is an online banking payment method provided by BCA. This method allows the customer to perform online transaction and complete the payment using BCA Internet banking. KlikBCA payment method utilizes BCA token for validation.
The steps to integrate with KlickBCA 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_klikbca
, transaction_details
, item_details
, and customer_details
. Successful request returns a redirect URL.
By default, expiry time for KlikBCA is 2 hours unless specified by merchant (min 20s, max 180 days).
KlikPay Charge API Request
{
"payment_type" : "bca_klikbca",
"bca_klikbca" : {
"description" : "testing transaction",
"user_id" : "midtrans1012"
},
"transaction_details" : {
"order_id" : "3176440",
"gross_amount" : "50000.00"
},
"item_details": [
{
"id": "1",
"price": 50000,
"quantity": 1,
"name": "Mobil "
}
],
"customer_details" : {
"first_name" : "Budi",
"last_name" : "435547",
"email" : "[email protected]"
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
payment_type | Set Klikbca payment method. Value: bca_klikbca . | String | Required |
transaction_details | The details of the specific transaction such as order_id and gross_amount . | Object | Required |
bca_klikbca | Charge details using KlikBCA. | Object | Required |
item_details | Details of the item(s) purchased by the customer. | Object | Required |
customer_details | Details of the customer. | Object | Required |
KlikBCA Charge Sample Responses and Notifications
{
"status_code": "201",
"status_message": "Success, KlikBCA transaction is successful",
"redirect_url": "https://www.klikbca.com",
"transaction_id": "c0ba3583-5111-45a5-9f1c-84c9de7cb2f6",
"order_id": "3176440",
"gross_amount": "50000.00",
"payment_type": "bca_klikbca",
"transaction_time": "2016-06-19 15:53:25",
"transaction_status": "pending",
"approval_code": "tes01"
}
{
"status_code": "201",
"status_message": "midtrans payment notification",
"transaction_id": "c0ba3583-5111-45a5-9f1c-84c9de7cb2f6",
"order_id": "3176440",
"gross_amount": "50000.00",
"payment_type": "bca_klikbca",
"transaction_time": "2016-06-19 15:53:25",
"transaction_status": "pending",
"approval_code": "YCB62E160704",
"signature_key": "d4ae557ea12a03eed51714693b84e48665af5289bc53df9bae0fda7e3c6b6c03fd0b00bf1978d1932d9c718c5bb27bf1148e85401221df45daf4472a3b8ef30e",
}
{
"status_code": "200",
"status_message": "midtrans payment notification",
"transaction_id": "c0ba3583-5111-45a5-9f1c-84c9de7cb2f6",
"order_id": "3176440",
"gross_amount": "50000.00",
"payment_type": "bca_klikbca",
"transaction_time": "2016-06-19 15:58:15",
"transaction_status": "settlement",
"approval_code": "YCRHOM160704",
"signature_key": "ef0f472fa8a5165dc9f2ff6300832eb28657e88b9f3335ae5ebb27c8ef258d203c6da18ac6cd5738d2e38c54dfec860d8e067bdbc759a1268ab04218ccab93cc",
}
{
"status_code": "202",
"status_message": "midtrans payment notification",
"transaction_id": "c0ba3583-5111-45a5-9f1c-84c9de7cb2f6",
"order_id": "3176440",
"gross_amount": "50000.00",
"payment_type": "bca_klikbca",
"transaction_time": "2016-06-19 17:53:25",
"transaction_status": "expire",
"approval_code": "3176440",
"signature_key": "17b0e97425a3e967b91fccab2261f7b26ce8fc79612bf1ea700b503f8a812213d51d171045c084b29ca2d56db69a2ff3fed813ca1ff8f3377baafcf005bdb6bf"
}
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 |
redirect_url | Redirect URL to KlikBCA payment page. | String |
transaction_id | Transaction ID given by Midtrans. | String |
order_id | Order ID specified by you. | String |
gross_amount | Total amount of transaction in IDR. | String |
payment_type | The payment method used by the customer. Value: bca_klikbca . | String |
transaction_time | Timestamp of transaction in ISO 8601 format. Time Zone: GMT+7. | String |
transaction_status | Status of KlikBCA transaction. Possible values are settlement , expire , pending . | String |
approval_code | Successful KlikBCA transaction approval code. | String |
signature_key | Combination of parameters such as order_id , status_code , gross_amount , and server_key to verify integrity of payload/response. | String |