What Are Values Of Paypal API?

Among the values of PayPal API include: credentials, service endpoint, call payload, HTTP headers and Call Format.

API Credentials

In essence, API credentials are set of values   that are used to confirm one as an account owner in PayPal. These API credentials are  offered  by PayPay to the account holder  and  may also  necessitate  an  APPID value. While making calls to PayPal API, one is required to provide a recognized set of API credentials. This is a necessary procedure as it enables PayPal to make verifications with regard to the account that is making the call. These API credential includes API Password, API Username, and Signature. Further, this procedure would enable PayPal to generate a particular set of credentials for each of the account holder. There are different API credentials in every member’s sandbox as well as live premier or business accounts. This makes it necessary for the user to employ the correct set while testing (PayPal, 2013, 1).

Service Endpoint

A request of an API could be sent either to the production or sandbox endpoint. The endpoint  which one  decides to utilize depends on  various conditions  such as the environment  being addressed,  call format  and the API operation that is being called. Apparently, a service endpoint offers the URI of the server that handles the request of an account holder. Every PayPal operation and service contains a peculiar endpoint as its value. For instance, the URL of the sandbox payments   that are adaptive is as indicated below

https://svcs.sandbox.paypal.com/AdaptivePayments/Pay

The account holder can use the sandbox during the application testing process. After he or she is through with testing applications in the sandbox, the user can then move to the production section and update the endpoints in his or her application for these requests to be directed at the appropriate PayPal operation or service production. For one to go live, he or she would need to update the API credentials for those responsible for the live PayPal account and not those responsible for the sandbox account.

Call Payload

Every call in the PayPal API consists of a payload; this is a peculiar set of input field that   one supplies alongside the request. Although operation in API has the required fields for input, there are those that are optional. Though one can perform a simple test call with the input fields that are only required, an application in the production level will certainly necessitate the use of optional inputs. The check out call will require the following areas to be filled.

  • USER—User name
  • PWD—Password
  • SIGNATURE—Signature
  • METHOD—operation  being addressed
  • VERSION—API version where the request is being made.
  • AMT— Monetary cash
  • cancelUrl—The URL address to be used in the case of the transaction being cancelled.
  • returnUrl—The URL address to  be used  in the case  when the transaction is completed

These required fields indicate the minimum required set of parameters  which can be included  in requesting  the PayPal  operation.  The following provides examples of formatting payload using the paring of name-value.

USER=<Your_APIUsername>&

PWD=<Your_APIPassword>&

SIGNATURE=<Your_Signature>&

METHOD=SetExpressCheckout&

VERSION=78&
AMT=10&
cancelUrl=http://www.example.com/cancel.html&
returnUrl=http://www.example.com/success.html

 

 Source: (PayPal Inco. 2013)