Auth Api invalid client id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I implemented paypal express checkout using braintree
<script>
var config = {
braintree: braintree,
// Configure environment
env : '{$Payment->env}',
client : {
sandbox : '{$Payment->paypalClientToken}', //this is generated in server using BrainTree PHP SDK
production: '{$Payment->paypalClientToken}'
},
// Customize button (optional)
locale : 'en_EE',
style : {
size : 'medium',
color : 'gold',
label : "pay",
shape : 'pill',
tagline: false
},
commit : true,
// Set up a payment
payment: function (data, actions)
{
return actions.braintree.create({
flow : 'checkout', // Required
amount : {$Payment->Order->orderSumGross->formatPrice()->replace(",",".")}, // Required
currency : 'EUR', // Required
enableShippingAddress : false,
shippingAddressEditable: false
});
},
// Execute the payment
onAuthorize: function (payload)
{
$("#paypalWrapper").html("Palun oota.. töötlen makset");
Php.Order.validatePaypal(payload.nonce,{$Payment->Order->orderID}).call(function (goToUrl)
{
window.location = goToUrl;
});
},
};
paypal.Button.render(config, '#paypalWrapper');
</script>
And i get get error "Auth Api invalid client id"
Screenshot : https://tppr.me/bQhZZ
Few weeks ago it worked fine.
I have correct access tokens for both poruction and sandbox envinronment's

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thank you for posting to the PayPal Sandbox Community.
The Error message you are receiving is that the client token you are passing in is invalid.
The very first step is to generate a Client Token.
Make sure when you are generating that token that you are storing it as a session variable.
You may need to do a var dump to make certain that the correct Client Token is getting passed in to the request.
Thank you,
Jennifer
PayPal

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- I get always the error: "invalid client_id or redirect_uri" from signin authorize endpoint. in Braintree Server-side Integration (PHP, Java, .NET, Ruby, Python, NodeJS SDKs)
- PayPal integration with Next, Lambda and API Gateway - 400 Invalid Request in Sandbox Environment
- Getting "Invalid Transaction Type" Error When Calling Payflow Gateway API in Payflow
- Error creating an order for cupture - Issues with Authorization header in Braintree Server-side Integration (PHP, Java, .NET, Ruby, Python, NodeJS SDKs)
- Zero-dollar authorization with PayFlow and error # 10525 in Payflow