BCA KlikPay Landing Page Development Guideline

To enable this payment method, please contact our Business Team.

This article will explain additional technical requirement for enabling BCA KlikPay. This development is mandatory for integration using SNAP Pop Up and/or Core API.

The customer journey for BCA KlikPay will be as followed:

  1. Customer will be redirected to BCA KlikPay site to finish the transaction
  2. Customer follows the steps on BCA KlikPay site. Once the payment is done, the customer will be redirected back to Merchant’s site.

The redirection process will be done by calling the redirect URL and including transaction_id with POST method.

The redirect URL called can be set by Merchant through the Merchant Adminstration Portal (MAP), by going to the Settings > Configuration > Finish Redirection URL tabs on the left side of the dashboard.

For example: If the redirect URL of merchant is www.redirectme.com, customer will be redirected to url below:



After the redirection, merchant have to show the result of transaction directly on redirection page. Merchant have to get the latest transaction status from get Transaction Status API ( https://api-docs.midtrans.com/#get-transaction-status ) by using the transaction_Id provided on the redirection URL.


Please show a message in text based on transaction_status. If the transaction_status is settlement show message like “payment success”. Otherwise show message like “payment failed.” We suggest to show this message “pembayaran berhasil” / “payment success” for success.


These code show how’s the logic work in php. Please adjust the code with your tech stack.


require_once(dirname(__FILE__) . '/../../Veritrans.php');
Veritrans_Config::$ServerKey = '<your server key>';
$data = Veritrans_Transaction::status($_GET['id']);
if($data->transaction_status == settlement)
echo `payment success`;
else {
echo 'payment failed';


Below are some guide to test cancel and expiry scenario in SANDBOX

CANCEL Scenario

  1. Create transaction from your website and redirected to Midtrans simulator,
  2. Login to MAP, go to menu TRANSACTIONS,
  3. Go to the BCA KlikPay Order ID,and the transaction status should be PENDING. Click the Order ID to open the details, then click CANCEL, 
  4. Continue payment on the simulator,
  5. Click return to merchant's website.

EXPIRE Scenario

  1. Create transaction and redirected to Midtrans' BCA Klikpay simulator,
  2. Hit expire API using the current Order ID,
  3. Continue payment on the simulator,
  4. Click return to merchant's website.

Was this article helpful?
6 out of 20 found this helpful
Can't find your answer? How about looking at our Tech Docs?

Tech docs

Our API and plug-ins play well with platforms from PHP, Shopify, Woo Commerce to Android and many more.

Learn more