Captured Method

After Authorize the payment and capture the funds later when ready to deliver the service or product.

Capture authorized transaction

To capture the authorized transaction

Pass the following parameters below:

Sandbox Capture API

Below capture API strictly for sandbox testing only. Never use these sandbox URL's in production environment

https://sandbox.hesabe.com/api/capture
capture.php
    $baseUrl = 'https://sandbox.hesabe.com/api/'; // sandbox
    $captureApiUrl = $baseUrl . 'capture'; 
    $requestData = [
        'merchantCode' => 842217,  
        'amount' => 10,  
        'paymentToken' => '84221717175011419773484853173'
    ];
    $encryptedData = HesabeCrypt::encrypt($requestData, $encryptionKey, $ivKey);
    $checkoutRequestData = new Request([
        'data' => $encryptedData
    ]);
    $checkoutRequest = Request::create($CheckoutApiUrl, 'POST', $checkoutRequestData->all());
    $checkoutRequest->headers->set('accessCode', $accessCode);

Here's an capture transaction parameters details

FieldTypeDescriptionRequired
merchantCode
StringMerchant Code is a unique identifier generated by Hesabe for each activated merchantYes
amount
NumericTransaction amount equal to or less than the authorized transaction amountYes
paymentToken
AlphanumericPayment Token returned from the authorized transactionYes
commission
NumericApply your own commission to the captured amount instead of the commission Hesabe calculates.

Only applicable for sub-merchants with dynamic commission activated
Optional

For Any Technical Assistance

If you encounter any issues or need support during setup or integration, please contact our technical team for assistance.

Hesabe IT Support

Email address:itsupport@hesabe.com