Paypal REST API Verification

The REST Api for Paypal payment is used when the payment is made from a source other than Paypal account i.e.  using a Credit Card information.

Credit Card Payment

Before we verify credit card payments, there are few steps we should do to make REST Api available for our app.

  • Get Access Token for your App
  • Making sure the recipient is our account
  • Check the account and currency of Payment

Access token helps Paypal authenticate our app account and at the same time uniquely identify transactions.

  1. Getting Access Token
    Continue reading

Get an Access Token for REST Api

Access Token

This is a key provided by Paypal once it has verified our app and account as being authorized in Paypal. We will mostly use access token for REST Api calls in Paypal. Access token helps uniquely identify the authorized bearer of Paypal.

The Fields in Response we receive

  • access_token : The unique key we are trying to gain
  • token_type : The specification for the key , here it is authorized as being a bearer key.
  • app_id : Our app ID, make sure this is the ID of your app.
  • expires_in : Each token has an expiry date specified in seconds, for eg. 28800 . So make sure to gain your access token right before you intend to use one.

Before we can get an access token we need to create a Continue reading

Paypal Adaptive Payment Verification

Paypal adaptive payment is the case when a user pays using their Paypal account.

Adaptive Payment

Once the “proof of payment” response is received we still have one simple step to do before we end our Paypal environment, that is we still need to verify if the payment has reached to our account (seller account). By doing so we are

  • authenticating the response we are receiving
  • making sure the recipient is our account
  • check the amount and currency of payment

From the response we will need pay_key and app_id to further authenticate the payment details.

  • pay_key : this key helps to identify the payment for which you want to retrieve details.
  • app_id : the unique id of your application.

Furthermore, Continue reading