Quick Integration Guide

Last updated: January 12th, 2021

Download

Integrate aamarPay with any type of platform using our Custom API, it's easy and fun. You can download the custom Integration Documentation from below button.

Download Custom API

Integration

Introduction

aamarPay Payment Gateway enables Merchants to receive money from their customers by temporarily redirecting them to www.aamarpay.com. The gateway is connecting multiple payment terminal including card system, mobile financial system, local and International wallet. After the payment is complete, the customer is returned to the merchant's site and seconds later the Merchant receives notification about the payment along with the details of the transaction. This document is intended to be utilized by technical personnel supporting the online Merchant's website. Working knowledge of HTML forms or cURL is required. You will probably require test accounts for which you need to open accounts via contact with aamarPay.com or already provided to you.

API Operation

REST APIs are supported in two environments. Use the Sandbox environment for testing purposes, then move to the live environment for production processing. When testing, generate an order url with your test credentials to make calls to the Sandbox URIs. When you’re set to go live, use the live credentials assigned to your new signature key to generate a live order url to be used with the live URIs. Your server has to support cURL system. For HTML Form submit please review after cURL part we provide HTML Post method URL also

Live API End Point (POST Method):

https://secure.aamarpay.com/index.php

Sandbox API End Point (POST Method):

https://sandbox.aamarpay.com/index.php

Live API End Point (Using cURL):

https://secure.aamarpay.com/request.php

Sandbox API End Point (Using cURL):

https://sandbox.aamarpay.com/request.php

Parameter Details

Variables Need to POST to Initialize Payment Process in gateway URL

Field Name Description Required Example Values
store_id Your Merchant ID – Provided by aamarPay Yes merchantid
signature_key Signature Key will be provided by aamarPay Yes dc0c2802bf04d2ab3336ec21491146
tran_id Reference or identification number provided by the Merchant. MUST be unique for each payment (Max 32 characters) Yes A205220
success_url URL to which the customer will be returned when the payment is made successfully. The customer will be returned to the last page on the Merchant's website where he should be notify the payment successful. Yes https://www.merchantdomain.com/sucess_page.php
fail_url URL to which the customer will be returned when the payment is made. But the Payment not Accepted by bank or card have insufficient balance etc. The customer will be returned to the last page on the Merchant's website where he should be notify the payment failed. Yes https://www.merchantdomain.com/failed_page.php
cancel_url URL to return customer to your product page or home page. Yes https://www.merchantdomain.com/index.html
amount The total amount payable. Please note that you should skip the trailing zeroes in case the amount is a natural number. Yes 10 or 10.50 or 10.6
currency 3-letter code of the currency of the amount according to ISO 4217 (see Annex I for accepted currencies) Yes BDT or USD
desc Merchant may specify a detailed calculation for the total amount payable. Please note that aamarPay does check the validity of these data - they are only displayed in the ’More information’ section in the Merchant Panel of the gateway. Yes T-Shirt
cus_name Customer Full Name Yes Mr. ABC
cus_email Email address of the customer who is making the payment. Yes abc@gmail.com
cus_add1 Customer’s address (e.g. street) Yes House B-158 Road 22
cus_add2 Customer’s address (e.g. town) Yes Dhaka, Uttara
cus_city Customers city Yes Uttara
cus_state Customer state or region Yes Dhaka
cus_country Customer Country Yes Bangladesh
cus_phone Customer mobile number Yes +8801842123123
opt_a Optional Parameter 1 No Optional Value 1
opt_b Optional Parameter 2 No Optional Value 2
opt_c Optional Parameter 3 No Optional Value 3
opt_d Optional Parameter 4 No Optional Value 4

Code Example

PHP Code Example

https://github.com/aamarpay-dev/aamarPay-Form-PHP/

cURL PHP Code Example

https://github.com/aamarpay-dev/aamarPay-cURL-PHP

Laravel Code Example

https://github.com/aamarpay-dev/aamarPay-laravel

Android Library

https://github.com/aamarpay-dev/aamarPay-Android-Library

Node JS

https://www.npmjs.com/package/aamarpay

ASP.NET Code Example

https://github.com/aamarpay-dev/ASP.NET-aamarPay

Plugin/Module

We have ReST JSON API , Android Library, Flutter Library, Woocomerce Plugin, WHMCS Module, Opencart Module ,Shopify Integration and others.

Please email us at integration@aamarpay.com for any kind of support or plugins.