Captured Method

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

Good to Know

Authorize and Capture features are only available with the MPGS payment gateway service.

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

http://sandbox.hesabe.com/api/capture

Production Capture API

Use the following capture API strictly for production transactions. Ensure that you never use these production URLs in the sandbox or testing environment

https://api.hesabe.com/api/capture
capture.php
    $baseUrl = 'http://sandbox.hesabe.com/api/'; // sandbox
    $captureApiUrl = $baseUrl . 'capture'; 
    $requestData = [
        'merchantCode' => 842217,  
        'amount' => 10,  
        'paymentToken' => '84221717175011419773484853173'
    ];
    $encryptedData = HesabeCrypto::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

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