Can we implement discount/voucher?

Yes!

We recommend you to use item parameter for discount/voucher when send the data to Midtrans.

Example :

Item price / Price = 100.000
Voucher / Item = -50.000
Gross Amount = 50.000

Here is what look like in code :

................................
$item1_details = array(
    'id' => 'a1',
    'price' => 25000,
    'quantity' => 2,
    'name' => "Apple"
    );

$item2_details = array(
    'id' => 'a2',
    'price' => 50000,
    'quantity' => 1,
    'name' => "Orange"
    );
$item3_details = array(
    'id' => 'a3',
    'price' => -50000,
    'quantity' => 1,
    'name' => "Voucher"
    );
 /$item_details = array ($item1_details, $item2_details, $item3_details);
................................