Welcome to the Zaakpay developer hub!

You'll find comprehensive guides and documentation to help you start integrating Zaakpay Payment gateway as quickly as possible, as well as support if you get stuck. Let's jump right in!

Guides would be the best place to start.
Checkout "Discussions" forum for frequently asked questions or simply use the search option if you're unsure of where to look.
Api Endpoints provides the specification on our APIs with an option to explore the API

Guides    Discussions

Payment Gateway Integration in PHP

Learn how to integrate Zaakpay Payment Gateway in PHP. Please follow our Getting started guide to integrate Payment gateway in your PHP website.

📘

Haven't created your account yet?

Please follow our Getting started guide.

1. Installing The Kit

Download Zaakpay Payment Gateway PHP Kit

2. Initiating Payment

  1. Request parameters must be provided at your site that will further pass to the Transact API for further payment process.

  2. To check the optional and mandatory parameters please refer to this Documentation.

  3. The above parameters will pass through the below function.

static function getAllParams() {
        //ksort($_POST);
        $all = '';
$checksumsequence=array("amount","bankid","buyerAddress","buyerCity","buyerCountry","buyerEmail","buyerFirstName","buyerLastName","buyerPhoneNumber","buyerPincode","buyerState","currency","debitorcredit","merchantIdentifier","merchantIpAddress","mode","orderId","product1Description","product2Description","product3Description","product4Description","productDescription","productInfo","purpose","returnUrl","shipToAddress","shipToCity","shipToCountry","shipToFirstname","shipToLastname","shipToPhoneNumber","shipToPincode","shipToState","showMobile","txnDate","txnType","zpPayOption");

        foreach($checksumsequence as $seqvalue) {
            if(array_key_exists($seqvalue, $_POST)) {
                if(!$_POST[$seqvalue]=="")
                {
                    if($seqvalue != 'checksum') 
                    {
                        $all .= $seqvalue;
                        $all .="=";
                        $all .= $_POST[$seqvalue];
                        $all .= "&";
                        }
                }
                
            }
        }
        return $all;
    }
  1. All the request parameters including the checksum further redirect to the Zaakpay using the below function. ( Make sure to set the action of the form according to the testing or live credentials )
<?php include('checksum.php'); ?>
<?php
    //enter your secret key here
    $secret = '0678056d96914a8583fb518caf42828a';

    $all = Checksum::getAllParams();

    $checksum = Checksum::calculateChecksum($secret, $all);
    
?>
<center>
<table width="500px;">
    <tr>
        <td align="center" valign="middle">Do Not Refresh or Press Back <br/> Redirecting to Zaakpay</td>
    </tr>
    <tr>
        <td align="center" valign="middle">
            <form action="http://zaakpaystaging.centralindia.cloudapp.azure.com:8080/api/paymentTransact/V8" method="post">
                <?php
                Checksum::outputForm($checksum);
                ?>
            </form>
        </td>

    </tr>

</table>

</center>
<script type="text/javascript">
var form = document.forms[0];
form.submit();
</script>

📘

Transaction Failing ?

Make sure you are using Live cards for Live Transactions.

  1. Once the transaction got completed you can check the response using the below function.
    ( You can use the response parameters through the concatenated string )
<?php
    // Please insert your own secret key here
    $secret = 'insert your secret key here ';

    $recd_checksum = $_POST['checksum'];
    $all = Checksum::getAllResponseParams();
    error_log("AllParams:".$all);
    error_log("Secret Key : ".$secret);
    $checksum_check = Checksum::verifyChecksum($recd_checksum, $all, $secret);

?>

📘

How to access the above functions ?

All these are included with their respective PHP file in the kit.

3. Featured API's

  1. Check API
    This is used to check the status of the transaction.Below parameters are passed in order to check the status of a transaction.

Such that passing the above parameters you can check the status using the below function.

<table width="500px;">
    <tr>
        <td align="center" valign="middle">Do Not Refresh or Press Back <br/> Redirecting to Zaakpay</td>
    </tr>
    <tr>
        <td align="center" valign="middle">
            <form action="https://api.zaakpay.com/checktransaction" method="post">
                <?php
                Checksum::outputForm($checksum);
                ?>
            </form>
        </td>
    </tr>
</table>

📘

Unable to access the response ?

We provide a checksum in the response XML.
Please use it to verify the validity of the response.

  1. Update Status API
    This is used to update the status of the transaction.

    Below parameters are passed in order to update the status of the transaction.

Such that passing the above parameters you can update the status using the below function.

<table width="500px;">
    <tr>
        <td align="center" valign="middle">Do Not Refresh or Press Back <br/> Redirecting to Zaakpay</td>
    </tr>
    <tr>
        <td align="center" valign="middle">
            <form action="https://api.zaakpay.com/updatetransaction" method="post">
                <?php
                Checksum::outputForm($checksum);
                ?>
            </form>
        </td>
    </tr>
</table>

Updated about a month ago


Payment Gateway Integration in PHP


Learn how to integrate Zaakpay Payment Gateway in PHP. Please follow our Getting started guide to integrate Payment gateway in your PHP website.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.