Want to to use the PayPal and several other APIs without spending hours reading documentation? Then you should know about Temboo.
Temboo provides normalized access to over 100 APIs, saving you the effort of learning how to use each one. And that means more time to experiment with new APIs and to focus on the creative side of development instead of reinventing the API wheel.
The Temboo Library contains over 1800 special methods called Choreos (as in choreography) for a wide range of APIs, and in this post I’ll walk you through how to use Temboo to check an account balance with the PayPal API. Once you’ve learned how to use this Choreo, you’re ready to use all our other Choreos for PayPal and every API in our Library–that’s the power of Temboo.
Step 1 – Get A Temboo Account
Go to Temboo.com and enter your email address on the home page. After confirming your email address and setting up an account name and password, you’ll have a free Temboo account with access to everything in our Library.
Step 2 – Find the Choreo in Our Library
Be sure you are logged into your account, and go to our Library page. On the left hand side you’ll see a list of all our APIs. Find PayPal, open the Merchants bundle, and select the Get Balance Choreo.
Step 3 – Test Run A Choreo From Your Browser
On the Choreo page you’ll see all the required inputs for this action. Scroll down the page to see information on the output the API returns for the Choreo, sample code (more on this later), and a description of the Choreo.
Back at the top of the page, you can enter the inputs and any optional inputs you choose. In this instance, I’m entering the password, signature, and username from my PayPal developer test account and setting the optional input to 1, indicating that I’m testing this Choreo against the PayPal sandbox. Now I’m ready to run this Choreo from my browser by clicking the Try It Out button.
After the Choreo has run, you’ll see that the Output box now shows what the PayPal API’s output. My account balance is zero in US dollars.
And immediately below that, you’ll see that the Sample Code has now been updated with all the inputs you entered for this Choreo run. This is code that you can copy and paste into your IDE to incorporate a Choreo directly into your application. (Rather than passing my PayPal password, signature, and username through the code, I’ve used Temboo Credentials to wrap them into one credential called ‘PayPalTest’.) Note that you can also select the programming language that you want the sample code in.
Step 4 – Run the Choreo from your IDE
Download the Temboo SDK in the language of your choice, and add it to your IDE. (Our tutorials provide detailed instructions.) Then paste the sample code into your project. For this example I am using our Java SDK and an eclipse, so my code looks like this:
Note that the first line of code starts my Temboo session by supplying the following Temboo credentials: my account name, the name of the Temboo Application Key I’m using, and the Application Key itself. (Your Application Keys can be found and managed here.) Then I add the following line to have the API output appear in my console:
Now I’m ready to run the project, and I get the following output in my console:
And that’s it! Now you know how to use Temboo to run any of the 21 PayPal Choreos–or the hundreds of other Choreos in our Library.
Check out Temboo today to see what you can build with the PayPal API.
- How WooCommerce and Developer Agencies Optimize Payments for Small Businesses with PayPal
- New REST API Feature: Setting a Receiver for Payments
- PayPal is Now Available Through WooCommerce 2.6 Onboarding Wizard
- Adaptive Payments is Moving to Limited Release – What you Need to Know
Connect with us!
- March 2017
- January 2017
- December 2016
- October 2016
- September 2016
- July 2016
- May 2016
- March 2016
- November 2015
- September 2015
- August 2015
- June 2015
- April 2015
- March 2015
- November 2014
- October 2014
- August 2014
- July 2014
- March 2014
- February 2014
- January 2014
- December 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013