Getting 400 Bad Request error when rendering PayPal Button using JS SDK

zylvie
Contributor
Contributor
The JS SDK returns a Bad Request 400 error when loading the buttons component, e.g.:
 
GET sdk/js?client-id=BAAvg01YGnEQa8i2Cq2vz1TJ3X6b9p4FfJom4S0GsLVyotPyD2VQZlO5_NEsNu1zP1EoIVqI9jyJKRkTo0&merchant-id=FU45FYTZTGK9A&components=buttons&currency=USD
 
I've tried onboarding several different accounts across several browsers to make sure it's reproducible.
 
Am I doing something wrong?
 
Here's a test URL: zylvie{.}com/momspirations/p/testingproduct42
 
Click Buy Now, and on the next page the PayPal buttons components load erroneously (you can verify it using Developer Tools).
 
I look forward to your response.
Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

zylvie
Contributor
Contributor

I resolved it for my case.

 

I was supposed to load it from www{.}paypal{.}com/sdk/js.

 

Instead I loaded it from paypal{.}com/sdk/js.

 

Apparently there's no naked domain redirect to www.

 

Hope this helps you out!

View solution in original post

Login to Me Too
3 REPLIES 3

dejancosmodine
New Community Member

Hi! I saw your issue about the PayPal SDK returning a 400 Bad Request error when loading the buttons component. I’m curious—have you been able to resolve it? If so, I’d really appreciate any tips you could share. Thanks!

Login to Me Too

zylvie
Contributor
Contributor

No, I haven't been able to resolve it yet.

 

Was hoping for PayPal mods to chime in on this.

Login to Me Too
Solved

zylvie
Contributor
Contributor

I resolved it for my case.

 

I was supposed to load it from www{.}paypal{.}com/sdk/js.

 

Instead I loaded it from paypal{.}com/sdk/js.

 

Apparently there's no naked domain redirect to www.

 

Hope this helps you out!

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.