3rd-Party Applications
How do I build apps for the 2checkout platform?
Sign-up for a 2Checkout account.
Contact 2Checkout with your app proposal.
2Checkout reviews your application plan enables 3rd party apps for your account and creates a placeholder for your app.
2Checkout supplies you with authentication credentials.
Build your application, integrate and test it with your account.
Submit your final application for review.
2Checkout evaluates your application. Following the review process, 2Checkout can offer your app to all customers.
Installation
Add the following lines of code at the end of the <body> tag.
<script type="text/javascript" src="https://secure.2checkout.com/cpanel/js/third-party-apps/avangate.js"></script>
<div id="avangate-hero" class="hide"></div>Authentication
Contact 2Checkout directly to start building applications on top of the 2Checkout platform. 2Checkout supplies you with the public and private authentication keys for your application.
Access requirements
Application authentication tokens work in tandem with user sessions for 2Checkout accounts. Users need to log into their account for 3rd party applications to have access to their data. Once account users log out, the application token expires and access is removed. By default, authentication tokens expire after one (1) hour.
Permanent authentication token
Contact 2Checkout to enable this functionality for your application. Once enabled, to make the auth token permanent use the 'permanentToken' parameter. This cases token expiration to grow to one (1) year.
Client side
1. Include the script from the Installation section in your JavaScript file you to access a global object called avangateCPanel that you can use for all the methods available in the client-side interface.
2. Next, set the PUBLIC_APP_ID and check that the scripts load in your JavaScript file.
3. Check 2Checkout account login by requesting the auth token via JavaScript.
4. Send the authToken to your server for validation.
Server side
This example uses Laravel framework and Guzzle Http library.
Get logged user info
This example uses Laravel framework and Guzzle Http library.
Get API data
The API documentation can be found here.
This example uses Laravel framework and Guzzle Http library. From the API we will use the retrieve subscriptions method.
Get ISE data
The ISE (Instant Search Order Export) documentation can be found here.
This example uses Laravel framework and Guzzle Http library.
Download mock application
This example uses Laravel framework and Guzzle Http library.
You can download the app from here.
The app uses an SQLite database for the information, and it displays a list of items only if is a valid authentication session in the 2checkout Control Panel.
Download documentation and mock application
Click here to download the full documentation, including the mock application, as an archive that you can unpack and run locally.
Last updated
Was this helpful?