NETPLUSPAY API INTEGRATION DOCUMENTATION

Introduction


The NetPlusPay API endpoints are secured with Bearer /Token Authentication. Each merchant integrates to NetPlusPay using a NetPlusPay Account.

The username and password of the account is used to request the Merchant ID. This Merchant ID will be used for subsequent API calls.


Netpluspay Inline Javascript

This section explains how NETPLUSPAY inline JavaScript works. This allows the customer to input his card details on NetPlusPay without leaving your webpage. To use the inline JavaScript, the script tag below must be added to the web application integrating into NetPlusPay.

Request URL Test Environment:

     
    < script src="https://netpluspay.com/inlinetestpayment/js/inline.js"> < /script> 
  

Request URL Live Environment:

    
    < script src="https://netpluspay.com/inlinepayment/js/inline.js">< /script>  
  

Sample inline JavaScript Code:

    
    < div id="paymentFrame">< /div>
    
    

< script style="text/javascript"> $("#netplus-pay").click(function (e) { e.preventDefault(); netpluspayPOP.setup( { merchant: “MID5a8173ee134a69.88093801”, customer_name:”test customer”), email:”testcustomer@email.com”, amount: “100”, currency_code:”NGN”, narration:”Test order”, order_id:”ORD1000001”, container: "paymentFrame", callBack: function (resp) { this.closeIframe(); console.log(resp); }, onClose : function(){ console.log('window closed'); } } ); netpluspayPOP.prepareFrame(); }); < /script>

Sample Successful Response :
            
                    { 
                "code":"00", 
                "orderid":" ORD1000001", 
                "trans_id":"NPTEST180213102422000000", 
                "status":"CAPTURED", 
                "amount":100, 
                "result":"SUCCESS", 
                "message":"APPROVED", 
                "bank":"MPGS", 
                }
        
        
Sample Failed Response :
        
                    {  
            code: "90",  
            orderid: "ORD-5a85998c5a7d3",  

            
            
            trans_id: "NPTEST180215023113000000",  
            status: "FAILED", 
            amount:"200", 
            bank:"MPGS", 
            message:"AUTHENTICATION_ATTEMPTED", 
            orderid:"ORD-5a85998c5a7d3", 
            result:"3D Secure Failed", 
            status:"FAILED", 
            }
        
        

Parameter:

        
            
MERCHANT The merchants NetPlusPay Merchant ID
CUSTOMER_NAME The customer name.
EMAIL The customer’s email address
AMOUNT The order amount
MERCHANT The merchants NetPlusPay Merchant ID
ORDER_ID The unique order id associated with the payment
CURRENCY_CODE The currency used by customer to pay
NARRATION The description of the order

NetPlusPay Redirect

This section explains how NetPlusPay Redirect works. This takes you customer to a secure NetPlusPay page where they can input their card details and once payment is successful, they are redirected back to your page.

Request URL Test Environment:

     
        https://netpluspay.com/pay/test/ 
  

Request URL Live Environment:

    
        https://netpluspay.com/pay/Live/ 
  

Sample Redirect Code :

    
        < form class="demo-fm" method="POST" id="netpluspay_form" name="netpluspay_form" action="https://netpluspay.com/pay/test/"> 
            < input type="hidden" name="merchantid" value="TEST5a81735b2a429"> 
            < input type="hidden" name="currency" value="NGN"> 
            < input type="hidden" name="narration" value="item payment test"> 
            < input type="hidden" name="full_name" value="Jhon Doe"> 
            < input type="hidden" name="email" value="info@netpluspay.com"> 
            < input type="hidden" name="amount" value="100"> 
            < input type="hidden" name="orderid" value="ORD-5d32c70b0ab31"> 
            < input type="hidden" name="return_url" value="http://testsite.com/netplusresponse/"> 
            < input type="hidden" name="recurring" value="no""> 
            < form>

  
Sample Successful Response :
            
                    { 
                "code":"00", 
                "orderid":" ORD1000001", 
                "trans_id":"NPTEST180213102422000000", 
                "status":"CAPTURED", 
                "amount":100, 
                "result":"SUCCESS", 
                "message":"APPROVED", 
                "bank":"MPGS", 
                }
        
        
Sample Failed Response :
        
                    {  
            code: "90",  
            orderid: "ORD-5a85998c5a7d3",  

            
            
            trans_id: "NPTEST180215023113000000",  
            status: "FAILED", 
            amount:"200", 
            bank:"MPGS", 
            message:"AUTHENTICATION_ATTEMPTED", 
            orderid:"ORD-5a85998c5a7d3", 
            result:"3D Secure Failed", 
            status:"FAILED", 
            }
        
        

NetPlusPay Recurring

This section explains how NetPlusPay Recurring works. NetPlusPay offers a simple way to take recurring debits from cards. Once a customer has paid you successfully, we send you a recurring token that you can save and use to send payments anytime you need to charge the customer.

Request URL Test Environment :

     
      https://netpluspay.com/pay/test/
  

Request URL Live Environment:

  
     https://netpluspay.com/pay/Live/ 
  

Sample Recurring Code :

    
        < form class="demo-fm" method="POST" id="netpluspay_form" name="netpluspay_form" action="https://netpluspay.com/pay/test/"> 
                < input type="hidden" name="merchantid" value="TEST5a81735b2a429"> 
                < input type="hidden" name="currency" value="NGN"> 
                < input type="hidden" name="narration" value="item payment test"> 
                < input type="hidden" name="full_name" value="Jhon Doe"> 
                < input type="hidden" name="email" value="info@netpluspay.com"> 
                < input type="hidden" name="amount" value="100"> 
                < input type="hidden" name="orderid" value="< ?php echo uniqid('ORD-'); ?>"> 
                < input type="hidden" name="return_url" value="http://testsite.com/netplusresponse/"> 
                < input type="hidden" name="recurring" value="yes"> 
                < input type="hidden" name="recurring_frequency" value="manual"> 
                < input type="hidden" name="recurring_start_date" value="2018-03-19"> 
                < input type="hidden" name="recurring_end_date" value="2018-04-01"> 
            < form>

  

Parameter:

      
          
MERCHANT The merchants NetPlusPay Merchant ID
CUSTOMER_NAME The customer name.
EMAIL The customer’s email address
AMOUNT The order amount
MERCHANT The merchants NetPlusPay Merchant ID
ORDER_ID The unique order id associated with the payment
CURRENCY_CODE The currency used by customer to pay
NARRATION The description of the order
RECURRING The field is used for recurring payment parameters.
RECURRING_FREQUENCY Manual: This is supplied for recurring transactions that will be manually triggered. Daily: This is supplied for recurring transactions that will be automatically triggered daily. Weekly: This is supplied for recurring transactions that will be automatically triggered weekly. Monthly: This is supplied for recurring transactions that will be automatically triggered monthly. Year: This is supplied for recurring transactions that will be automatically triggered daily.
RECURRING_START_DATE The date which the first recurring payment should start : Format (Ym-d)
RECURRING_END_DATE The end date of the recurring payment : Format (Y-m-d)

Netpluspay Inline Javascript

This section explains how NETPLUSPAY inline JavaScript works. This allows the customer to input his card details on NetPlusPay without leaving your webpage. To use the inline JavaScript, the script tag below must be added to the web application integrating into NetPlusPay.

Request URL Test Environment:

     
    < script src="https://netpluspay.com/inlinetestpayment/js/inline.js"> < /script> 
  

Request URL Live Environment:

    
    < script src="https://netpluspay.com/inlinepayment/js/inline.js">< /script>  
  

Sample inline JavaScript Code:

    
    < div id="paymentFrame">< /div>
    
    

< script style="text/javascript"> $("#netplus-pay").click(function (e) { e.preventDefault(); netpluspayPOP.setup( { merchant: “MID5a8173ee134a69.88093801”, customer_name:”test customer”), email:”testcustomer@email.com”, amount: “100”, currency_code:”NGN”, narration:”Test order”, order_id:”ORD1000001”, container: "paymentFrame", callBack: function (resp) { this.closeIframe(); console.log(resp); }, onClose : function(){ console.log('window closed'); } } ); netpluspayPOP.prepareFrame(); }); < /script>

Sample Successful Response :
            
                    { 
                "code":"00", 
                "orderid":" ORD1000001", 
                "trans_id":"NPTEST180213102422000000", 
                "status":"CAPTURED", 
                "amount":100, 
                "result":"SUCCESS", 
                "message":"APPROVED", 
                "bank":"MPGS", 
                }
        
        
Sample Failed Response :
        
                    {  
            code: "90",  
            orderid: "ORD-5a85998c5a7d3",  

            
            
            trans_id: "NPTEST180215023113000000",  
            status: "FAILED", 
            amount:"200", 
            bank:"MPGS", 
            message:"AUTHENTICATION_ATTEMPTED", 
            orderid:"ORD-5a85998c5a7d3", 
            result:"3D Secure Failed", 
            status:"FAILED", 
            }
        
        

Parameter:

        
            
MERCHANT The merchants NetPlusPay Merchant ID
CUSTOMER_NAME The customer name.
EMAIL The customer’s email address
AMOUNT The order amount
MERCHANT The merchants NetPlusPay Merchant ID
ORDER_ID The unique order id associated with the payment
CURRENCY_CODE The currency used by customer to pay
NARRATION The description of the order

Response codes:

    
        
      
  
00 Transaction was completed successfully.
01 Invalid request, or some parameter are missing or empty
02 Parameters passed is invalid
03 Transaction already captured.
04 Pan validation failed.
06 Recurring transaction canceled
07 Recurring transaction limit reached
08 Server Error
90 Processing error.