Welcome To walletmaxpay Docs Last updated: 2023-01-01

walletmaxpay is a simple and Secure payment automation tool which is designed to use personal account as a payment gateway so that you can accept payments from your customer through your website where you will find a complete overview on how walletmaxpay works and how you can integrate walletmaxpay API in your website


API Introduction

walletmaxpay Payment Gateway enables Merchants to receive money from their customers by temporarily redirecting them to www.walletmaxpay.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 walletmaxpay.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 (Using cURL):

https://pay.walletmaxpay.com/checkout/payment/create

Parameter Details

Variables Need to POST to Initialize Payment Process in gateway URL

Field Name Description Required Example Values
cus_name Customer Full Name Yes Mr. ABC
cus_email Email address of the customer who is making the payment. Yes abc@gmail.com
amount The total amount payable. Please note that you should skip the the trailing zeros in case the amount is a natural number. Yes 10 or 10.50 or 10.6
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://yourdomain.com/sucess.php
cancel_url URL to return customer to your product page or home page. Yes https://yourdomain.com/cancel.php
app-key Your apikey Yes Your apikey
client-key Your clientkey Yes Your clientkey
client-secret Your secretkey Yes Your secretkey
client-position Your domain Yes Your domain

Headers Details

Header Name Value
Content-Type application/x-www-form-urlencoded

Integration

You can integrate our payment gateway into your PHP Laravel WordPress WooCommerce sites.

Sample Request


      <?php

      $curl = curl_init();

      curl_setopt_array($curl, array(
        CURLOPT_URL => 'https://pay.walletmaxpay.com/checkout/payment/create',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => '',
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 0,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_POSTFIELDS => http_build_query(array('cus_name' => 'Mahadi','cus_email' => 'm@g.com','amount' => '10','success_url' => ' yourdomain.com/success.php','cancel_url' => 'yourdomain.com/cancel.php')),
        CURLOPT_HTTPHEADER => array(
          'Content-Type: application/x-www-form-urlencoded',
          'app-key: fKX8qW0O0tW7s',
          'client-key: px1zsBgDXhkiYR',
          'client-secret: 39778979',
          'client-position: xyc.com',
          'Cookie: v10_session=6em4ldlc7vtd19mnso5sa163e285u8nt'
        ),
      ));

      $response = curl_exec($curl);

      curl_close($curl);
      echo $response;

      ?>
      

      <?php
      $client = new Client();
      $headers = [
        'Content-Type' => 'application/x-www-form-urlencoded',
        'app-key' => 'fKX8qW0O0tW7s',
        'client-key' => 'px1zsBgDXhkiYR',
        'client-secret' => '39778979',
        'client-position' => 'xyc.com',
        'Cookie' => 'v10_session=6em4ldlc7vtd19mnso5sa163e285u8nt'
      ];
      $options = [
        'multipart' => [
          [
            'name' => 'cus_name',
            'contents' => 'Mahadi'
          ],
          [
            'name' => 'cus_email',
            'contents' => 'm@g.com'
          ],
          [
            'name' => 'amount',
            'contents' => '10'
          ],
          [
            'name' => 'success_url',
            'contents' => ' yourdomain.com/success.php'
          ],
          [
            'name' => 'cancel_url',
            'contents' => 'yourdomain.com/cancel.php'
          ]
      ]];
      $request = new Request('POST', 'https://pay.walletmaxpay.com/checkout/payment/create', $headers);
      $res = $client->sendAsync($request, $options)->wait();
      echo $res->getBody();

      ?>
      

        const axios = require('axios');
        const FormData = require('form-data');
        let data = new FormData();
        data.append('cus_name', 'Mahadi');
        data.append('cus_email', 'm@g.com');
        data.append('amount', '10');
        data.append('success_url', ' yourdomain.com/success.php');
        data.append('cancel_url', 'yourdomain.com/cancel.php');

        let config = {
          method: 'post',
          maxBodyLength: Infinity,
          url: 'https://pay.walletmaxpay.com/checkout/payment/create',
          headers: { 
            'Content-Type': 'application/x-www-form-urlencoded', 
            'app-key': 'fKX8qW0O0tW7s', 
            'client-key': 'px1zsBgDXhkiYR', 
            'client-secret': '39778979', 
            'client-position': 'xyc.com', 
            'Cookie': 'v10_session=6em4ldlc7vtd19mnso5sa163e285u8nt', 
            ...data.getHeaders()
          },
          data : data
        };

        axios.request(config)
        .then((response) => {
          console.log(JSON.stringify(response.data));
        })
        .catch((error) => {
          console.log(error);
        });

      

      import requests

      url = "https://pay.walletmaxpay.com/checkout/payment/create"

      payload = {'cus_name': 'Mahadi',
      'cus_email': 'm@g.com',
      'amount': '10',
      'success_url': ' yourdomain.com/success.php',
      'cancel_url': 'yourdomain.com/cancel.php'}
      files=[

      ]
      headers = {
        'Content-Type': 'application/x-www-form-urlencoded',
        'app-key': 'fKX8qW0O0tW7s',
        'client-key': 'px1zsBgDXhkiYR',
        'client-secret': '39778979',
        'client-position': 'xyc.com',
        'Cookie': 'v10_session=6em4ldlc7vtd19mnso5sa163e285u8nt'
      }

      response = requests.request("POST", url, headers=headers, data=payload, files=files)

      print(response.text)

        

      package main

      import (
        "fmt"
        "bytes"
        "mime/multipart"
        "net/http"
        "io/ioutil"
      )

      func main() {

        url := "https://pay.walletmaxpay.com/checkout/payment/create"
        method := "POST"

        payload := &bytes.Buffer{}
        writer := multipart.NewWriter(payload)
        _ = writer.WriteField("cus_name", "Mahadi")
        _ = writer.WriteField("cus_email", "m@g.com")
        _ = writer.WriteField("amount", "10")
        _ = writer.WriteField("success_url", " yourdomain.com/success.php")
        _ = writer.WriteField("cancel_url", "yourdomain.com/cancel.php")
        err := writer.Close()
        if err != nil {
          fmt.Println(err)
          return
        }


        client := &http.Client {
        }
        req, err := http.NewRequest(method, url, payload)

        if err != nil {
          fmt.Println(err)
          return
        }
        req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
        req.Header.Add("app-key", "fKX8qW0O0tW7s")
        req.Header.Add("client-key", "px1zsBgDXhkiYR")
        req.Header.Add("client-secret", "39778979")
        req.Header.Add("client-position", "xyc.com")
        req.Header.Add("Cookie", "v10_session=6em4ldlc7vtd19mnso5sa163e285u8nt")

        req.Header.Set("Content-Type", writer.FormDataContentType())
        res, err := client.Do(req)
        if err != nil {
          fmt.Println(err)
          return
        }
        defer res.Body.Close()

        body, err := ioutil.ReadAll(res.Body)
        if err != nil {
          fmt.Println(err)
          return
        }
        fmt.Println(string(body))
      }
        

Response Details

Annotation URL
After succesfull transaction https://yoursuccesspage.com?transactionId=******&paymentAmount=**.**&paymentFee=**.**&success=1&p_type=****
After failed transaction https://yourfailedpage.com?transactionId=******&paymentAmount=**.**&paymentFee=**.**&success=0

Verify Request


      <?php


      $curl = curl_init();

      curl_setopt_array($curl, array(
        CURLOPT_URL => 'https://pay.walletmaxpay.com/checkout/payment/verify',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => '',
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 0,
        CURLOPT_FOLLOWLOCATION => false,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_POSTFIELDS => http_build_query(array('transaction_id' => '21OM721836')),
        CURLOPT_HTTPHEADER => array(
          'Content-Type: application/x-www-form-urlencoded',
          'app-key: fKX8qW0O0tW7s',
          'client-key: px1zsBgDXhkiYR',
          'client-secret: 39778979',
          'client-position: gateway2.test',
          'Cookie: v10_session=8v6f9n17pgm59d25pbto2fh7l9s3tddd'
        ),
      ));

      $response = curl_exec($curl);

      curl_close($curl);
      echo $response;


      ?>
      

      <?php
      $client = new Client();
      $headers = [
        'Content-Type' => 'application/x-www-form-urlencoded',
        'app-key' => 'fKX8qW0O0tW7s',
        'client-key' => 'px1zsBgDXhkiYR',
        'client-secret' => '39778979',
        'client-position' => 'gateway2.test',
        'Cookie' => 'v10_session=8v6f9n17pgm59d25pbto2fh7l9s3tddd'
      ];
      $options = [
        'multipart' => [
          [
            'name' => 'transaction_id',
            'contents' => '21OM721836'
          ]
      ]];
      $request = new Request('POST', 'https://pay.walletmaxpay.com/checkout/payment/verify', $headers);
      $res = $client->sendAsync($request, $options)->wait();
      echo $res->getBody();


      ?>
      

        const axios = require('axios');
        const FormData = require('form-data');
        let data = new FormData();
        data.append('transaction_id', '21OM721836');

        let config = {
          method: 'post',
          maxBodyLength: Infinity,
          url: 'https://pay.walletmaxpay.com/checkout/payment/verify',
          headers: { 
            'Content-Type': 'application/x-www-form-urlencoded', 
            'app-key': 'fKX8qW0O0tW7s', 
            'client-key': 'px1zsBgDXhkiYR', 
            'client-secret': '39778979', 
            'client-position': 'gateway2.test', 
            'Cookie': 'v10_session=8v6f9n17pgm59d25pbto2fh7l9s3tddd', 
            ...data.getHeaders()
          },
          data : data
        };

        axios.request(config)
        .then((response) => {
          console.log(JSON.stringify(response.data));
        })
        .catch((error) => {
          console.log(error);
        });


      

      import requests

      url = "https://pay.walletmaxpay.com/checkout/payment/verify"

      payload = {'cus_name': 'Mahadi',
      'cus_email': 'm@g.com',
      'amount': '10',
      'success_url': ' yourdomain.com/success.php',
      'cancel_url': 'yourdomain.com/cancel.php'}
      files=[

      ]
      headers = {
        'Content-Type': 'application/x-www-form-urlencoded',
        'app-key': 'fKX8qW0O0tW7s',
        'client-key': 'px1zsBgDXhkiYR',
        'client-secret': '39778979',
        'client-position': 'xyc.com',
        'Cookie': 'v10_session=6em4ldlc7vtd19mnso5sa163e285u8nt'
      }

      response = requests.request("POST", url, headers=headers, data=payload, files=files)

      print(response.text)

        

      package main

      import (
        "fmt"
        "bytes"
        "mime/multipart"
        "net/http"
        "io/ioutil"
      )

      func main() {

        url := "https://pay.walletmaxpay.com/checkout/payment/verify"
        method := "POST"

        payload := &bytes.Buffer{}
        writer := multipart.NewWriter(payload)
        _ = writer.WriteField("transaction_id", "21OM721836")
        err := writer.Close()
        if err != nil {
          fmt.Println(err)
          return
        }


        client := &http.Client {
        }
        req, err := http.NewRequest(method, url, payload)

        if err != nil {
          fmt.Println(err)
          return
        }
        req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
        req.Header.Add("app-key", "fKX8qW0O0tW7s")
        req.Header.Add("client-key", "px1zsBgDXhkiYR")
        req.Header.Add("client-secret", "39778979")
        req.Header.Add("client-position", "gateway2.test")
        req.Header.Add("Cookie", "v10_session=8v6f9n17pgm59d25pbto2fh7l9s3tddd")

        req.Header.Set("Content-Type", writer.FormDataContentType())
        res, err := client.Do(req)
        if err != nil {
          fmt.Println(err)
          return
        }
        defer res.Body.Close()

        body, err := ioutil.ReadAll(res.Body)
        if err != nil {
          fmt.Println(err)
          return
        }
        fmt.Println(string(body))
      }
        
Sample Response

        {
            "cus_name": "Mahadi",
            "cus_email": "m@g.com",
            "amount": "10",
            "transaction_id": "21OM721836",
            "status": "1",
            "message": "success"
        }
      

Localhost Sandbox Validate

Client Position : sandbox.rentcpanel.com
Your API KEY: Sandbox12345
Your CLIENT KEY: sandbox1234567
Your SECRET KEY: sandbox123456789

Wordpress Woocomerce Plugin Version 1.6 (Physical Products)

See Setup Video: YouTube Video

Wordpress Woocomerce Plugin Version 1.0 (Digital Products)

See Setup Video: YouTube Video

WHMCS Module 1.5

See Setup Video: How To Setup Video here

SmmPanel Module (Perfect Panel, Dream Panel, Rental Panel) 1.8

See Setup Video: Video here/