instamojo payment gateway integration in php

Today, We want to share with you instamojo payment gateway integration in php.In this post we will show you instamojo integration in php, hear for Instamojo Payment Gateway Integration Tutorial in PHP we will give you demo and example for implement.In this post, we will learn about How To Integrate PayPal Payment Gateway In PHP? with an example.

instamojo php integration tutorial

Instamojo is an best online payment gateway,which allow user’s to Send, Receive Payments through many online options like net banking, Credit-Card, Debit Card etc. Instamojo very flexible to send as well as receive payments online.It is well secured and trusted payment gateway in india.

Instamojo supports 100% free payment gateway best plugins for WordPress, codeigniter, Opencart, PHP, Magento, Laravel, Drupal, NodeJS PrestaShop etc..

Instamojo Payment Gateway Integration Tutorial in PHP

  1. You Can receive payment only from india.
  2. we hope soon all over the world.
  3. For signup only PAN card and Indian Bank account need
  4. you can start with in 10 minutes.
  5. Receive money with in 3 days in your Any bank account.
  6. there is No setup fee.

Step 1: Instamojo Sign Up

Sign Up with Instamojo. click here

Step 2: Get Instamojo Api-Key, Auth-Token and Salt

And then you set up an account with Instamojo, you will get an Api-Key, Auth-Token and Salt.
Click API & Setting menu as well as secure Api-Key, Auth-Token and Salt

Step 3: Create Instamojo form

Make form with below field
Submit form to pay.php

  • amount – The amount to be paid by the user’s.
  • phone – Phone number of the user’s.
  • buyer_name – user’s name.
  • purpose – Purpose of the payment.
  • email – Email address of the user’s.

Step 4: Dowload Instamojo Plugin

Make new file Pay.php
Include plugin folder src in Pay.php Dowload Plugin

        "purpose" => $product_name,
        "amount" => $price,
        "buyer_name" => $name,
        "phone" => $phone,
        "send_email" => true,
        "send_sms" => true,
        "email" => $email,
        'allow_repeated_payments' => false,
        "redirect_url" => "http://www.pakainfo.COM/thankyou.php",
        "webhook" => "http://www.pakainfo.COM/webhook.php"
    $pay_url = $output_results['longurl'];
    header("Location: $pay_url");
catch (Exception $e) {
    print('Error: ' . $e->getMessage());

Step 5: Thankyou Page redirected

payment success
and you Once got payment success done then it gets your redirected to thank you page (redirect_url).

"redirect_url" => "http://www.pakainfo.COM/thankyou.php"

Step 6: Print payment status

You can verify the payment status through webhook in Thankyou.php To print response from

	echo "

Your Payment ID: " . $output_results['payments'][0]['payment_id'] . "

" ; echo "

Your Payment Name: " . $output_results['payments'][0]['buyer_name'] . "

" ; echo "

Your Payment Email: " . $output_results['payments'][0]['buyer_email'] . "

" ; echo "
catch (Exception $e) {
print('Error: ' . $e->getMessage());

here you can use free to fill All the step by step understanding will be available in

I hope you get an idea about instamojo payment gateway integration.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment