3

I develop payout system which is based on PayPal's payouts. To make a call to PayPal API it is neccessary to get OAuth token as described in

https://developer.paypal.com/docs/integration/direct/make-your-first-call/

I found that repeatedly calls to get OAuth token don't refresh it (the token gets the same, expiration time decreases).

Is there any way to force OAuth token refresh?

Sergey
  • 161
  • 9

1 Answers1

0

Depending on your payment system, the short-lived access token can be used immediately for a payment or an authorization/capture. The refresh token is long-lived (currently 10 years), and must be stored securely.

For any future payment or authorization/capture, since the access token will have expired, use the refresh token to get a new access token for use calling the Payment API. For more info check the Exchange the auth code for refresh and access tokens https://developer.paypal.com/docs/integration/mobile/make-future-payment/

Zoran Pandovski
  • 2,312
  • 14
  • 24
  • 1
    My pay system is just a service that hidden from user. The only thing it does is sending payouts from its own business application account to users. So I use my app's client_id and client_secret to get OAuth token for further payouts. But when I get PayPal OAuth token, I see no refresh_token field in http response or smth like this. How can I refresh the token without waiting expire_in time to get an exception and get another access token manually after an error? – Sergey Dec 25 '15 at 17:10