Data integrations

How to build a custom integration between PayPal and NetSuite

Why Connect PayPal to NetSuite?

If you are operating in the e-commerce space, having all your systems integrated and speaking to one another is crucial for your overall productivity, operational efficiency, and improved customer experience. If you are a business that uses NetSuite; that is involved in e-commerce, digital goods, or subscription services; and you accept payments via PayPal, then you probably require some way for your incoming PayPal payments to be recorded in NetSuite. Typically, routing the user through the PayPal payment process would be done by your e-commerce system and the payments would be recorded in the e-commerce system. Your e-commerce system would be integrated with NetSuite and the transaction and payment would find their way into NetSuite via the e-commerce to NetSuite integration. However, if for whatever reason, the e-commerce system is not and can not be integrated into NetSuite, you might have to do a direct integration between PayPal and NetSuite. By integrating PayPal with NetSuite, you can can automatically import transaction data from PayPal into NetSuite, eliminating manual data entry and potential errors. This also enables the smooth flow of data such as customer details, product information, transaction history, invoice details, and payment status between the two systems. The integration enhances data accuracy, provides real-time visibility of payments, reduces admin overhead, and improves order-to-cash cycles, giving you a competitive edge in the market.

PayPal APIs to use for the integration

PayPal, is probably the most well-known online payments system, and handles millions of transactions daily. As expected, PayPal offers a comprehensive set of APIs which businesses can use to integrate their systems. This means that there are probably many different ways to integrate PayPal and NetSuite for the purpose of recording payments.

The most obvious method is to use the PayPal Transaction Search API. The Transaction Search API allows you to get the history of transactions inside a PayPal account.

Here’s the API docs URL:

Authentication for this API is via Oauth 2.0. Calling this API end point provides data on the transaction amount, the payer info, the shipping info, and the cart / order line items. This information can then be sent to NetSuite.

NetSuite APIs to use for the integration

NetSuite, a cloud-based suite of ERP and accounting software, helps businesses manage their operations effectively.

NetSuite provides a variety of APIs to facilitate integration with other systems.

The preferred API to use would be the SuiteTalk REST Web Services API. Introduced more recently, the REST API provides a modern, JSON-based interface for interacting with NetSuite.

Here’s the API docs URL, specifically the records browser:

There are different ways to authenticate requests to the NetSuite SuiteTalk REST API, including OAuth 2.0. However, the easiest approach is probably to do Token-Based Authentication (TBA).

Depending on how the incoming PayPal data must be recorded in NetSuite, a specific REST API end point would need to be chosen. For example, if every PayPal transaction needs to be recorded as a sales order then the Sales Order end point would be used:

The second API option would be the SuiteTalk SOAP Web Services API. This is a comprehensive SOAP-based web services API that allows for integration with NetSuite. SOAP is an older technology but is still used widely, especially in legacy systems. OAuth 2.0 can not be used with SOAP web services, we have to use TBA.

In theory, a third option could be to use the SuiteScript API to do the integration. SuiteScript is NetSuite’s JavaScript-based runtime that allows for deploying and running customized business logic within NetSuite itself. There are many different types of scripts that can be created using SuiteScript.

A SuiteScript RESTlet script gets called from outside NetSuite or from some other area in NetSuite. We could created a RESTlet that inserts the payment data into NetSuite. Then the external script that gets the data from PayPal could call the SuiteScript RESTlet script.

Alternatively, a SuiteScript Suitelet script could be built that dials out, connects to the PayPal API, gets the transaction data that is required and inserts it into NetSuite.

Need a custom PayPal & NetSuite integration? Get in touch!

If you’re looking for help with a custom integration between PayPal and NetSuite, please reach out to schedule a consultation.