Skip to content

Checkout Payment

Shipu Ahamed edited this page Sep 29, 2019 · 3 revisions

$checkout initialization here.

In laravel use Shipu\Bkash\Facades\Checkout instead of $checkout if you want.

Create Payment (Sale or Authorize)

$payerReference = 'your payerReference';
$callbackUrl = 'merchant callback url';

$checkout->payment()->create( $amount, $merchantInvoiceNumber, $intent, $currency, $merchantAssociationInfo );

or 

$checkout->createPayment( $amount, $merchantInvoiceNumber, $intent, $currency, $merchantAssociationInfo );

$intent, $currency and $merchantAssociationInfo is optional. $intent default value sale and $currency default value BDT.

Execute Payment

$checkout->payment()->execute($paymentId);

or 

$checkout->executePayment($paymentId);

you can get $paymentId after create payment call.

Capture

$checkout->payment()->capture($paymentId);

or 

$checkout->capturePayment($paymentId);

you can get $paymentId after execute payment call.

Query Payment

$checkout->payment()->queryPayment($paymentId);

or 

$checkout->queryPayment($paymentId);

you can get $paymentId after execute payment call.

Void Payment

$checkout->payment()->void($paymentId);

or 

$checkout->voidPayment($paymentId);

you can get $paymentId after execute payment call.

← Checkout Api | Checkout Payout →