Authentication failing with PayPal Checkout Server Integration

WayneSmallman
Contributor
Contributor

Hi, I've followed the guide for implementing the PayPal Checkout Server Integration and it's failing via Node on the create payment endpoint with the message:

 

Authentication failed due to invalid authentication credentials or a missing Authorization header.

Thing is, there's no mention of headers anywhere in the guide. However, I am passing the client ID and secret, as instructed by the guide.

Login to Me Too
2 REPLIES 2

fromage9747
New Community Member

I am also experiencing this issue.

 

I am using NestJS which is pretty much NodeJS.

 

When I create the order, it all works fine and then when I want to capture/make payment, I get "Authentication failed due to invalid authentication credentials or a missing Authorization header".

 

Pretty confident that I am doing everything correctly as if there was a problem with authentication, I doubt that the "Create Order" API would work. 

Login to Me Too

fromage9747
New Community Member

As always... Whenever I ask a question about a problem I am facing, I solve my problem.

 

The issue here is that PAYPAL_API + '/v2/checkout/orders/' + payment_id + '/capture' still requires a post body request even though the documentation does not state it.

 

I used the same request for creating the order with one difference.  I changed the INTENT to "SALE".

 

Everything went through and it was successfully processed.

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.