Ajay Puli
Ajay Puli

Reputation: 61

PayPal Android Native Checkout SDK - invalid client_id or redirect_uri, and CHECKOUT_ERROR

I have followed PayPal Android SDK Integration from this link: https://developer.paypal.com/docs/limited-release/native-checkout/android/invoking-sdk.

I am getting this error page on reaching PayPal.. On return to app I am getting this exception from the PayPal Callbacks.

Upvotes: 6

Views: 2987

Answers (3)

Preston PHX
Preston PHX

Reputation: 30359

Edit: it's no longer limited release, so this answer no longer applies


As that limited release document notes in a red box, "Important: PayPal Checkout Native SDK is a limited-release solution available only to select merchants"

If you are not one of those select merchants (and my understanding is there are very few), an error such as "invalid client_id" on reaching PayPal is expected.

Upvotes: 1

Nafis Kabbo
Nafis Kabbo

Reputation: 710

I solved this problem by adding the Return Url. The error comes when the return URL from your app doesn't match with the return URL described in your Paypal sandbox account. So, to solve it, just simply do these steps:

  1. https://developer.paypal.com/developer/applications (go to this link)
  2. Go to your app edit page.
  3. Click under the "SANDBOX APP SETTINGS" > "Return URL" > "Show" Add your BuildConfig.APPLICATION_ID://paypalpay (com.example.appname://paypalpay)
  4. More important step is left also: Do it must: Select the "Native Checkout SDK" checkbox, found within the "Advanced options" of the "Accept payments" option. ** Diagram:- "My apps & credentials" -> "App feature options" >"Accept payments" -> "Advanced options" -> "Native Checkout SDK" (check it)

Upvotes: 4

Humayun Rahi
Humayun Rahi

Reputation: 815

I was able to solve the problem by. The problem occours when the return url from your app doesn't match with the return url described in your paypal sandbox account.

  1. go to https://developer.paypal.com/developer/applications
  2. Go to your app edit page.
  3. Click under the "SANDBOX APP SETTINGS" > "Return URL" > "Show"
  4. Add your BuildConfig.APPLICATION_ID://paypalpay (com.example.mypaypalappdemo://paypalpay)

And the problem is solved.

Upvotes: 3

Related Questions