SandBox Mode

To use sandbox mode, please register an account at https://dev.sspay.my. Here you can create dummy bills and make test payments via Bank Simulators.

For API testing purpose, replace the URL 'sspay.my' with 'dev.sspay.my' together with your sandbox account credentials.

For online banking transaction test, please use the following banks only:

  • SBI BANK A (success transaction)
  • SBI BANK B (fail transaction; insufficient fund)
  • SBI BANK C (Pending Return / Callback from bank - 30 min)

  • Username : 1234
    Password : 1234

    Basic Information

    You will interact a lot with Category and Bill.

    Category is a group of bills. You can create a category based on bills type. e.g. House rental, Subscription fees.

    A bill is an invoice for your customer. A bill must belong to a Category

    To start using the API, you would have to create a Category. Then the payment flow will kicks in as per below:

  • Customer visits your site.
  • Customer chooses to make payment.
  • Your site creates a Bill via API call.
  • SSPAY API returns Bill's code.
  • Your site redirects the customer to Bill's URL.
  • The customer makes payment via payment option of choice.
  • SSPAY sends a server-side update (Payment Completion) to your site on Bill's status on payment failure or success.
  • Your site can check payment status via API call
  • APIs

    Get Bank API is useful for you to get bank information which are accepted to be used with SSPAY. Bank information is required when you create a user from API

    Our API system will return bank information in JSON format.

    Sample code

    
    <?php
      $curl = curl_init();
    
      curl_setopt($curl, CURLOPT_POST, 0);
      curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/index.php/api/getBank');  
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    
      $result = curl_exec($curl);
      $info = curl_getinfo($curl);  
      curl_close($curl);
    
      echo $result;
    ?>
    											

    Sample result

    
    [{"id":"1","bank":"Maybank","status":"1"},{"id":"2","bank":"CIMB Bank","status":"1"},{"id":"3","bank":"Bank Islam","status":"1"},{"id":"4","bank":"Bank RBS","status":"1"},{"id":"5","bank":"Bank Mandiri","status":"1"}]
    											

    Get Bank FPX API is useful for you to get bank code which are accepted to be used with SSPAY. Bank code is required when you need to use runBill API

    Our API system will return bank information in JSON format.

    Sample code

    
    <?php
      $curl = curl_init();
    
      curl_setopt($curl, CURLOPT_POST, 0);
      curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/index.php/api/getBankFPX');  
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    
      $result = curl_exec($curl);
      $info = curl_getinfo($curl);  
      curl_close($curl);
    
      echo $result;
    ?>
    											

    Sample result

    
    [
      {
     	"CODE":"ABB0233","NAME":"Affin Bank"
      },
      {
      	"CODE":"ABMB0212","NAME":"Alliance Bank"
      },
      {
      	"CODE":"AMBB0209","NAME":"AmBank"}
      }
    ]
    											

    Get Package API is useful for you to get package information which are provided in SSPAY. Package information is required when you create a user from API

    Our API system will return bank information in JSON format.

    Sample code

    
    <?php
      $curl = curl_init();
    
      curl_setopt($curl, CURLOPT_POST, 0);
      curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/index.php/api/getPackage');  
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    
      $result = curl_exec($curl);
      $info = curl_getinfo($curl);  
      curl_close($curl);
    
      echo $result;
    ?>
    											

    Sample result

    
    [
      {
      	"id":"1",
      	"package":"Pakej Standard",
      	"fee":"0.30",
      	"status":"1"
      }
    ]
    											

    This API will show how to create SSPAY user from API. This API will return User Secret Key which later will be used for creating Category and Bill.

    You need to pass the following parameters to create user.

    • enterpriseUserSecretKey - Enterprise user secret key
    • Fullname - User full name
    • User name - User name to access or login
    • Email - User Email OR User Id (not necessary in email format)
    • Password - User Password
    • Phone - User Phone
    • Bank - User Bank Selection
    • Account No - User Bank Account No
    • Account Holder Name - User Account Holder Name
    • Registration No [OPTIONAL] - User Company / Business / Organization Registration No
    • Package - User Package
    • userStatus [OPTIONAL] - Set to 2 if you want the account status to be active without click the link in confirmation email.

    Our API system will return User Secret Key in JSON format. It will return error if the email already exist.

    Sample code

    
    <?php
      $some_data = array(
        'enterpriseUserSecretKey' => 'abcdef-ghijk-lmnop-qrstu',
        'fullname' => 'John Doe Sdn Bhd',
        'username' => 'johndoe',
        'email' => 'hi@johndoe.com',
        'password' => '123456',
        'phone' => '0134342400',
        'bank'=>1,
        'accountNo'=>'162263282063',
        'accountHolderName'=>'John Doe,
        'registrationNo'=>'BBYUUI',
        'package' => 1
      );
    
      $curl = curl_init();
      curl_setopt($curl, CURLOPT_POST, 1);
      curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/index.php/api/createAccount');  
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
    
      $result = curl_exec($curl);
      $info = curl_getinfo($curl);  
      curl_close($curl);
      $obj = json_decode($result);
      echo $result;
    											

    Sample result

    
    [
      {
      	"UserSecretKey" : "vrbl86xf-wj1h-q0l3-95kk-4q4erulvsc0h"
      }
    ]
    											

    You may check user account status by submitting user email and enterprise user secret key. Status code description as follows:-

    • 0 - Inactive
    • 1 - New-Pending Approval
    • 2 - Active

    Sample code

    
    <?php
      $some_data = array(
        'username' => 'johndoe',
        'enterpriseUserSecretKey' => 'h9ijfq4y-hrha-jsmj-s4br-r5hll1g29ty'
      );  
    
      $curl = curl_init();
    
      curl_setopt($curl, CURLOPT_POST, 1);
      curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/index.php/api/getUserStatus');  
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
    
      $result = curl_exec($curl);
    
      $info = curl_getinfo($curl);  
    
      curl_close($curl);
      echo $result;
    ?>
    											

    Sample result

    
    [{"status":"1"}]
    											

    You may check all user account information by submitting partner type and user secret key as follows:-

    • userSecretKey - Secret key for OEM or Enterprise user
    • partnerType - OEM or ENTERPRISE

    Sample code (OEM)

    
    <?php
      $some_data = array(
        'userSecretKey' => 'td8bfqv7',
        'partnerType' => 'OEM'
      );  
    
      $curl = curl_init();
    
      curl_setopt($curl, CURLOPT_POST, 1);
      curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/admin/api/getAllUser');  
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
    
      $result = curl_exec($curl);
      $info = curl_getinfo($curl);  
      curl_close($curl);
    
      echo $result;
    ?>
    											

    Sample result (OEM)

    
    [
       {
    	"userDate": "2018-10-11",
            "userId": "45",
            "userName": "zahiruliman",
            "registrationNo": "XXXXXXXXXXX",
            "userFullname": "Mohd Zahirul Iman bin Mohammad Rafee",
            "userEmail": "zahirul.imn@gmail.com",
            "userPhone": "0182500999",
            "BankAccountNo": "155444478239",
            "bankAccountName": "Mohd Zahirul Iman",
            "bankName": "Maybank",
            "userStatus": " (Not Active)"
        }
    ]
    											

    Sample code (ENTERPRISE)

    
    <?php
      $some_data = array(
        'userSecretKey' => 'td8bfqv8',
        'partnerType' => 'ENTERPRISE'
      );  
    
      $curl = curl_init();
    
      curl_setopt($curl, CURLOPT_POST, 1);
      curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/admin/api/getAllUser');  
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
    
      $result = curl_exec($curl);
      $info = curl_getinfo($curl);  
      curl_close($curl);
    
      echo $result;
    ?>
    											

    Sample result (ENTERPRISE)

    
    [
       {
    	"userDate": "2019-01-22",
            "userId": "100",
            "userName": "lznk",
            "registrationNo": "LISPBM6190",
            "userFullname": "LEMBAGA ZAKAT NEGERI KEDAH",
            "userEmail": "sadaqah@zakatkdh.com",
            "userPhone": "047332819",
            "BankAccountNo": "552023977939",
            "bankAccountName": "Lembaga Zakat Negeri Kedah",
            "bankName": "Maybank",
            "userStatus": " (Not Active)"
        }
    ]
    											

    Category is a collection of bills. As an example, you may create a 'Rental' Category for bill related to rental. User Secret Key is required in order to create a Category. Please login to SSPAY to get User Secret Key.

    In the example below, we will show you how to create a Category. You need to pass the following parameters to generate category code.

    • catname - Category Name
    • catdescription - Category Description
    • userSecretKey - User Secret Key

    Our API system will return Category Code in JSON format.

    Sample code

    
    <?php
      $some_data = array(
        'catname' => 'sspay General 2', //CATEGORY NAME
        'catdescription' => 'sspay General Category, For sspay Transactions 2', //PROVIDE YOUR CATEGORY DESCRIPTION
        'userSecretKey' => 'w5x7srq7-rx5r-3t89-2ou2-k7361x2jewhn' //PROVIDE USER SECRET KEY HERE
      );  
    
      $curl = curl_init();
    
      curl_setopt($curl, CURLOPT_POST, 1);
      curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/index.php/api/createCategory');  //PROVIDE API LINK HERE
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
    
      $result = curl_exec($curl);
    
      $info = curl_getinfo($curl);  
      curl_close($curl);
    
      $obj = json_decode($result);
      echo $result;
    											

    Sample result

    
    [{"CategoryCode":"j0tzqhka"}]
    											

    In the example below, we will show you how to get category information. You need to pass the following parameters :

    • userSecretKey - User Secret Key
    • categoryCode - Category Code

    Our API system will return information in JSON format.

    Sample code

    
    <?php
      $some_data = array(
        'userSecretKey' => 'w5x7srq7-rx5r-3t89-2ou2-k7361x2jewhn' //PROVIDE USER SECRET KEY HERE
        'categoryCode' => 'Ajdiufd345f' //PROVIDE CATEGORY CODE HERE
      );  
    
      $curl = curl_init();
    
      curl_setopt($curl, CURLOPT_POST, 1);
      curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/index.php/api/getCategoryDetails'); 
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
    
      $result = curl_exec($curl);
    
      $info = curl_getinfo($curl);  
      curl_close($curl);
    
      $obj = json_decode($result);
      echo $result;
    											

    Sample result

    
    [
        {
            "categoryName": "Makanan",
            "categoryDescription": "Kuih Cara",
            "categoryStatus": "1"
        }
    ]
    											

    Bill serves as an invoice to your customer. In the example below, we will show you how to create a Bill. You need to pass the following parameters to generate category code.

    • userSecretKey - User Secret Key
    • categoryCode - Category Code. Get your Category Code from Create Category API
    • billName - Your bill name. Bill Name will be displayed as bill title
      * Max 30 alphanumeric characters, space and '_' only
    • billDescription- Your bill description.
      * Max 100 alphanumeric characters, space and '_' only
    • billPriceSetting - For fixed amount bill, set it to 1 and insert bill amount. For dynamic bill (user can key in the amount paid), set it to 0.
    • billPayorInfo - If you want to create open bill without require payer information, set it to 0. If you need payer information, set it to 1
    • billAmount - Key in the bill amount. The amount is in cent. e.g. 100 = RM1. If you set billPriceSetting to 1 (dynamic bill), please put 0
    • billReturnUrl - Key in return Url if you need the bill to be redirected to your own page upon payment completion.
    • billCallbackUrl - Key in callback url if you need the bill to be redirected to your callback page upon sucessful of payment transaction.
    • billExternalReferenceNo - Provide your own system reference no if you think it is required. You may use this reference no to check the payment status for the bill.
    • billTo - If you intend to provide the bill to specific person, you may fill the person nam in this field. If not, please leave it blank.
    • billEmail - Provide your customer email here
    • billPhone - Provide your customer phone number here.
    • billSplitPayment - [OPTIONAL] Set 1 if the you need the payment to be splitted to other sspay users.
    • billSplitPaymentArgs - [OPTIONAL] Provide JSON for split payment. e.g. [{"id":"johndoe","amount":"200"}]
    • billPaymentChannel - Set 0 for FPX, 1 Credit Card and 2 for both FPX & Credit Card.
    • billDisplayMerchant - [OPTIONAL] Set 1 to display merchant info in your customer's email and 0 to hide merchant info.
    • billContentEmail - [OPTIONAL] Provide additional messages by sending an extra email to your customer.
    • billChargeToCustomer - [OPTIONAL] Below are the values available :

      1. Leave blank to set charges for both FPX and Credit Card on bill owner.
      2. Set "0" to charge FPX to customer, Credit Card to bill owner.
      3. Set "1" to charge FPX bill owner, Credit Card to customer.
      4. Set "2" to charge both FPX and Credit Card to customer.

    Our API system will return Bill Code in JSON format. In this example, the API return gcbhict9 as bill code. Hence, your payment url will be:- https://sspay.my/gcbhict9

    Sample code

    
    <?php
      $some_data = array(
        'userSecretKey'=>'w5x7srq7-rx5r-3t89-2ou2-k7361x2jewhn',
        'categoryCode'=>'gcbhict9',
        'billName'=>'Car Rental WXX123',
        'billDescription'=>'Car Rental WXX123 On Sunday',
        'billPriceSetting'=>0,
        'billPayorInfo'=>1,
        'billAmount'=>100,
        'billReturnUrl'=>'http://bizapp.my',
        'billCallbackUrl'=>'http://bizapp.my/paystatus',
        'billExternalReferenceNo' => 'AFR341DFI',
        'billTo'=>'John Doe',
        'billEmail'=>'jd@gmail.com',
        'billPhone'=>'0194342411',
        'billSplitPayment'=>0,
        'billSplitPaymentArgs'=>'',
        'billPaymentChannel'=>'0',
        'billDisplayMerchant'=>1,
        'billContentEmail'=>'Thank you for purchasing our product!',
        'billChargeToCustomer'=>1
      );  
    
      $curl = curl_init();
      curl_setopt($curl, CURLOPT_POST, 1);
      curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/index.php/api/createBill');  
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
    
      $result = curl_exec($curl);
      $info = curl_getinfo($curl);  
      curl_close($curl);
      $obj = json_decode($result);
      echo $result;
    											

    Sample result

    
    [{"BillCode":"gcbhict9"}]
    											

    Bill serves as an invoice to your customer. In the example below, we will show you how to create a Bill for multipayment. You need to pass the following parameters to generate bill code.

    • userSecretKey - User Secret Key
    • categoryCode - Category Code. Get your Category Code from Create Category API
    • billName - Your bill name. Bill Name will be displayed as bill title
      * Max 30 alphanumeric characters, space and '_' only
    • billDescription- Your bill description.
      * Max 100 alphanumeric characters, space and '_' only
    • billPriceSetting - Put 1 if the bill has fix amount, put 0 if dynamic amount.
    • billPayorInfo - If you want to create open bill without require payer information, set it to 0. If you need payer information, set it to 1
    • billAmount - Key in the bill amount. The amount is in cent. e.g. 100 = RM1. If you set billPriceSetting to 1 (dynamic bill), please put 0
    • billReturnUrl - Key in return Url if you need the bill to be redirected to your own page upon payment completion.
    • billCallbackUrl - Key in callback url if you need the bill to be redirected to your callback page upon sucessful of payment transaction.
    • billExternalReferenceNo - Provide your own system reference no if you think it is required. You may use this reference no to check the payment status for the bill.
    • billTo - If you intend to provide the bill to specific person, you may fill the person nam in this field. If not, please leave it blank.
    • billEmail - Provide your customer email here
    • billPhone - Provide your customer phone number here.
    • billSplitPayment - [OPTIONAL] Set 1 if the you need the payment to be splitted to other SSPAY users.
    • billSplitPaymentArgs - [OPTIONAL] Provide JSON for split payment. e.g. [{"id":"johndoe","amount":"200"}]
    • billMultiPayment - Set 1 if you need the multi payment on.
    • billPaymentChannel - [OPTIONAL] 0 = FPX Only, 1 = Credit/Debit Card only, 2 = FPX and Credit Card
    • billDisplayMerchant - [OPTIONAL] 0 = Not display merchant details in email, 1 = Display merchant details in email.
    • billContentEmail - [OPTIONAL] Provide your email content.

    Our API system will return Bill Code in JSON format. In this example, the API return gcbhict9 as bill code. Hence, your payment url will be:- https://sspay.my/gcbhict9

    Sample code

    
    <?php
      $some_data = array(
        'userSecretKey' => 'w5x7srq7-rx5r-3t89-2ou2-k7361x2jewhn',
        'categoryCode' => 'gcbhict9',
        'billName' => 'Car Rental WXX123',
        'billDescription' => 'Car Rental WXX123 On Sunday',
        'billPriceSetting'=>0,
        'billPayorInfo'=>1,
        'billAmount'=>100,
        'billReturnUrl'=>'http://sspay.my',
        'billCallbackUrl'=>'http://sspay.my/paystatus',
        'billExternalReferenceNo' => 'AFR341DFI',
        'billTo'=>'John Doe',
        'billEmail'=>'jd@gmail.com',
        'billPhone'=>'0194342411',
        'billSplitPayment'=>0,
        'billSplitPaymentArgs'=>'',
        'billMultiPayment'=>1,
        'billPaymentChannel'=>0,
        'billDisplayMerchant'=>1,
        'billContentEmail'=>'Email content'
    
      );  
    
      $curl = curl_init();
      curl_setopt($curl, CURLOPT_POST, 1);
      curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/index.php/api/createBillMultiPayment');  
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
    
      $result = curl_exec($curl);
      $info = curl_getinfo($curl);  
      curl_close($curl);
      $obj = json_decode($result);
      echo $result;
    											

    Sample result

    
    [{"BillCode":"j0tzqhka"}]
    											

    Run Bill can make customer do the payment. In the example below, we will show you how to run a Bill for multipayment. You need to pass the following parameters to generate category code.

    • userSecretKey - User Secret Key
    • billCode - Your billcode / permanent link
    • billpaymentAmount - If the original bill's billPriceSetting = 1, leave this blank. The bill amount will follow the original bill's amount. Otherwise (original bill's billPriceSetting = 0), enter the amount in cent (e.g. 100 = RM 100).
    • billpaymentPayorName- Customer name
    • billpaymentPayorPhone - Customer phone number
    • billpaymentPayorEmail - Customer email
    • billBankID - If you need to by pass payment page, please key in Bank Code (refer to Get Bank FPX API).

    Our API system will run our payment page

    Sample code

    
    <?php
      $some_data = array(
        'userSecretKey' => 'w5x7srq7-3455-cfea-dr45-k7361x2jewhn',
        'billCode' => 'adwr3525',
        'billpaymentAmount' => '2.00',
        'billpaymentPayorName' => 'Sumayyah',
        'billpaymentPayorPhone'=>'60197789876',
        'billpaymentPayorEmail'=>'sumayyah@gmail.com',
        'billBankID'=>'TEST0021'
    
      );  
    
      $curl = curl_init();
      curl_setopt($curl, CURLOPT_POST, 1);
      curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/index.php/api/runBill');  
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
    
      $result = curl_exec($curl);
      $info = curl_getinfo($curl);  
      curl_close($curl);
      $obj = json_decode($result);
      echo $result;
    											

    Sample result

    
    Your system will go to payment page or Bank Login Page(if you key in billBankID).
    											

    You may get all bill information by submitting OEM secret key or Enterprise secret key.

    • userSecretKey - Secret key for OEM or Enterprise user
    • partnerType - OEM or ENTERPRISE
    • Year-month - Required year & month, if left blank all bill will be return

    Sample code (OEM)

    
    <?php
      $some_data = array(
        'userSecretKey' => 'td8bfqv7',
        'partnerType' => 'OEM',
        'year-month' => '2019-10'
      );  
    
      $curl = curl_init();
    
      curl_setopt($curl, CURLOPT_POST, 1);
      curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/admin/api/getAllBill');  
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
    
      $result = curl_exec($curl);
      $info = curl_getinfo($curl);  
      curl_close($curl);
    
      echo $result;
    											

    Sample result (OEM)

    
    [
        {
            "billDate": "2018-10-11",
            "ID": "39",
            "NAME": "Kuih Cara Meletop",
            "billDescription": "Kutipan pakej Kuih Cara meletop",
            "fixPrice": "Not fix",
            "billTo": "",
            "billEmail": "",
            "billPhone": "",
            "billStatus": " (Not Active)",
            "billCode": "kuih-cara-meletop",
            "billAmount": "1.00",
            "categoryCode": "tsrbklhf",
            "categoryName": "Makanan",
            "userName": "fitweb"
        }
    ]
    											

    Sample code (ENTERPRISE)

    
    <?php
      $some_data = array(
        'userSecretKey' => 'td8bfqv7',
        'partnerType' => 'ENTERPRISE',
        'year-month' => '2019-10'
      );  
    
      $curl = curl_init();
    
      curl_setopt($curl, CURLOPT_POST, 1);
      curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/admin/api/getAllBill');  
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
    
      $result = curl_exec($curl);
      $info = curl_getinfo($curl);  
      curl_close($curl);
    
      echo $result;
    											

    Sample result (ENTERPRISE)

    
    [
        {
            "billDate": "2019-01-23",
            "ID": "151",
            "NAME": "Payment_for_order_5955",
            "billDescription": "Payment_for_order_5955",
            "fixPrice": "Not fix",
            "billTo": "",
            "billEmail": "",
            "billPhone": "",
            "billStatus": " (Active)",
            "billCode": "wti3cxz4",
            "billAmount": "20.00",
            "categoryCode": "y8n0gm94",
            "categoryName": "Sadaqah",
            "userName": "lznk"
        }
    ]
    											

    Return URL will be supplied with the following datas in GET format:-

    status_id : Payment status. 1= success, 2=pending, 3=fail

    billcode: Your billcode / permanent link

    order_id : Your external payment reference no, if specified

    Return URL will be supplied with the following datas in POST format:-

    refno : Payment reference no

    status : Payment status. 1= success, 2=pending, 3=fail

    reason : Reason for the status received

    billcode : Your billcode / permanent link

    order_id : Your external payment reference no, if specified

    amount : Payment amount received

    You may check bill payment status by submitting Bill Code and Bill Payment Status(Optional). Bill payment status code description as follows:-

    • 1 - Successful transaction
    • 2 - Pending transaction
    • 3 - Unsuccessful transaction
    • 4 - Pending

    Sample code

    
    <?php
      $some_data = array(
        'billCode' => 'td8bfqv7',
        'billpaymentStatus' => '1'
      );  
    
      $curl = curl_init();
    
      curl_setopt($curl, CURLOPT_POST, 1);
      curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/index.php/api/getBillTransactions');  
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
    
      $result = curl_exec($curl);
      $info = curl_getinfo($curl);  
      curl_close($curl);
    
      echo $result;
    ?>
    											

    Sample result

    
    [
       {
    	"billName": "Payment_for_order_51",
    	"billDescription": "Payment_for_order_51",
    	"billTo": "",
    	"billEmail": "",
    	"billPhone": "",
    	"billStatus": "1",
    	"billPermalink": "zyq1pq6s",
    	"categoryCode": "vkptzhxe",
    	"categoryName": "Wordpress",
    	"userName": "fitweb",
    	"billpaymentStatus": "3",
    	"billpaymentAmount": "1.00",
    	"billpaymentInvoiceNo": "B00040-288-424703111018"
       }
    ]
    											

    You may get all settlement information by submitting OEM secret key or Enterprise secret key as follows:-

    • userSecretKey - Secret key for OEM or Enterprise user
    • partnerType - OEM = OEM User , ENTERPRISE = Enterprise User
    • detailByuserName - Yes = Group by Username, No = Ungroup

    Sample code (OEM)

    
    <?php
      $some_data = array(
        'userSecretKey' => 'td8bfqv7',
        'partnerType' => 'OEM',
        'detailByuserName' => "Yes"
      );  
    
      $curl = curl_init();
    
      curl_setopt($curl, CURLOPT_POST, 1);
      curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/admin/api/getSettlement');  
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
    
      $result = curl_exec($curl);
      $info = curl_getinfo($curl);  
      curl_close($curl);
    
      echo $result;
    ?>
    											

    Sample result (OEM)

    
    [
        {
            "userID": "44",
            "userName": "fitweb",
            "settlementDate": "2019-10-28",
            "amount": "1.00",
            "amountNett": "1.00",
            "different": "0.00",
            "standard": "0.00",
            "santai": "1.00",
            "creditCard": "0.00",
            "transaction": "1"
        },
        {
            "userID": "69",
            "userName": "izuanbakar",
            "settlementDate": "2019-10-31",
            "amount": "100.00",
            "amountNett": "99.00",
            "different": "1.00",
            "standard": "100.00",
            "santai": "0.00",
            "creditCard": "0.00",
            "transaction": "1"
        },
        {
            "userID": "83",
            "userName": "bbqmalaysia",
            "settlementDate": "2019-10-29",
            "amount": "148.00",
            "amountNett": "148.00",
            "different": "0.00",
            "standard": "0.00",
            "santai": "148.00",
            "CreditCard": "0.00",
            "transaction": "1"
        },
        {
            "userID": "102",
            "userName": "matzul",
            "settlementDate": "2019-11-04",
            "amount": "50.00",
            "amountNett": "50.00",
            "different": "0.00",
            "Standard": "0.00",
            "Santai": "50.00",
            "creditCard": "0.00",
            "transaction": "1"
        }
       
    ]
    											

    Sample code (ENTERPRISE)

    
    <?php
      $some_data = array(
        'userSecretKey' => 'td8bfqv7',
        'partnerType' => 'ENTERPRISE',
        'detailByuserName' => "Yes"
    );  
    
      $curl = curl_init();
    
      curl_setopt($curl, CURLOPT_POST, 1);
      curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/admin/api/getSettlement');  
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
    
      $result = curl_exec($curl);
      $info = curl_getinfo($curl);  
      curl_close($curl);
    
      echo $result;
    ?>
    											

    Sample result (ENTERPRISE)

    
    [
        {
            "settlementDate": "2019-11-06",
            "amount": "100.00",
            "amountNett": "98.00",
            "different": "2.00",
            "standard": "0.00",
            "santai": "0.00",
            "creditCard": "100.00",
            "transaction": "1"
        }
    ]
    											

    You may get all settlement summary information by submitting as follows:-

    • userSecretKey - Secret key for Enterprise User Only
    • userPartnerType - OEM = OEM User , ENTERPRISE = Enterprise User
    • userName - Sample Username

    Sample code (OEM)

    
    <?php
    $some_data = array(
    'userSecretKey' => 'td8bfqv7',
    'userPartnerType' => 'OEM',
    'userName' => "Sample Username"
    );  
    
    $curl = curl_init();
    
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/admin/api/getSettlementSummary');  
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
    
    $result = curl_exec($curl);
    $info = curl_getinfo($curl);  
    curl_close($curl);
    
    echo $result;
    ?>
    				

    Sample Result

    
    [
    	{
    		"userID": "44",
    		"userName": "fitweb",
    		"today": "19-10-31",
    		"Amount_Pending": "1.00",
    		"Amount_settle": "5.00",
    		"AmountNett_Pending": "1.00",
    		"AmountNett_Settle": "0.00",
    		"Different_Pending": "0.00",
    		"Different_Settle": "5.00",
    		"Standard_Pending": "0.00",
    		"Standard_Settle": "0.00",
    		"Santai_Pending": "1.00",
    		"Santai_Settle": "5.00",
    		"Creditcard_Pending": "0.00",
    		"Creditcard_settle": "0.00",
    		"Transaction_Pending": "6",
    		"Trnsaction_Settle": "6"
    	}
    ]
    					

    Sample code (ENTERPRISE)

    
    <?php
    $some_data = array(
    'userSecretKey' => 'td8bfqv7',
    'userPartnerType' => 'ENTERPRISE',
    'userName' => "Sample Username"
    );  
    
    $curl = curl_init();
    
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_URL, 'https://sspay.my/admin/api/getSettlementSummary');  
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
    
    $result = curl_exec($curl);
    $info = curl_getinfo($curl);  
    curl_close($curl);
    
    echo $result;
    ?>
    			

    Sample Result

    
    [
        {
            "userId": "243",
            "userName": "go2aum",
            "Today": "19-11-01",
            "Amount_Pending": "100.00",
            "Amount_Settle": "10157.00",
            "AmountNett_Pending": "98.00",
            "AmountNett_Settle": "10026.46",
            "Different_pending": "2.00",
            "Different_settle": "130.54",
            "Standard_pending": "0.00",
            "Standard_settle": "4330.00",
            "Santai_pending": "0.00",
            "Santai_settle": "0.00",
            "Creditcard_Pending": "100.00",
            "Creditcard_settle": "5827.00",
            "Transaction_Pending": "21",
            "Transaction_Settle": "21"
        }
    ]