cancel
Showing results for 
Search instead for 
Did you mean: 

REST Payments get error 401 UNAUTHORIZED

Options
MTS_Andre
Moderator
Posted on

The most common cause for this error is the payment method passed in your REST API request.

 

"payment_method": "credit_card" VS "payment_method": "paypal"

The payment method can be "paypal" for payments with PayPal accounts and cards (where the buyer has to fill-in his card details on PayPal checkout page and not on your website).Or it can be "credit_card" for direct card payments where the buyer can provide his card details directly on your website (not on PayPal checkout page).

 

The "credit_card" value is reserved ONLY for PRO accounts in UK, US and Canada. In case you receive this error and is due to this then you have 2 options:

 

  1. Pass "paypal" instead of "credit_card" and you can still process card payments where available, all the card details will be collected on a PayPal page
  2. Evaluate, eventually, to upgrade to PRO if your country is Uk, Us or Canada
8 REPLIES 8

REST Payments get error 401 UNAUTHORIZED

Options
Peekayzee
Contributor
Why reserve features for people who are not even in development, this makes no sense...

REST Payments get error 401 UNAUTHORIZED

Options
BuyDealLTD
New Community Member

You need to upgrade to a merchant pro account, starting at 30$ USD Per Month.

 

It will allow you to use API to "pass" your credit card.

 

Thanks,

ER

REST Payments get error 401 UNAUTHORIZED

Options
ihavi
New Community Member

Are you kidding me??? We just spent week implementing and testing this solution, everything worked fine in sandbox. And now I switched to the live environment and "credit_card" option is all the sudden not working??? Why it worked in sandbox in first place? Very confusing documentation!

REST Payments get error 401 UNAUTHORIZED

Options
rohrspatz
Contributor

reply to: 1

 

this is not fully true. Mobile devices are not capable of doing so without using a paypal account.

REST Payments get error 401 UNAUTHORIZED

Options
EricDeem
New Community Member

@MTS_Andre Did earlier "Business" account users get grandfathered into the "credit_card" feature?  I've met customers that are not Pro account users that have been able to use this feature and not incur the $30 monthly fee.  I confused as to why Paypal would do this when competitors offer the same rates but require a monthly fee.

REST Payments get error 401 UNAUTHORIZED

Options
MTS_Andre
Moderator

Hi, PayPal has different products you can integrate depending on your needs.

 

The product developed by PayPal to offer always card payments is PayPal PRO, more recently we offer Braintree. Other standard products still offer the card payment where available (ExpressCheckout, Standard buttons, REST API payments etc..). One recent to mention is PayPal Checkout Smart Buttons.

 

When we talk about PRO and accept card payments we have those 2 scenarios:

 

1) Make a DoDirectPayment API call, which will allows to capture card details directly on your website (you need to be PCI compliant and available in few countries, UK, US, Canada).

 

2) Use the Hosted Version of PRO which shows a hosted iframe where buyer can enter their card details (you don't need to be PCI compliant and available in few more other countries than above).

REST Payments get error 401 UNAUTHORIZED

Options
Brinkley5110
Member

I am using the transaction search API (https://developer.paypal.com/docs/api/transaction-search/v1) and I am getting transactions in the response just fine but under the transaction_detail >> shipping_info >> address object I am not receiving a state (corresponding to a county in the UK and Ireland) , here is an example below where I would expect the state to be "Wicklow". If I look at the transaction in Paypal directly the county is in the address and I am also getting it if I export a report of transaction in a CSV for instance.

REST Payments get error 401 UNAUTHORIZED

Options
Amunike
Contributor

Hi MTS_Andre,

 

What end-point are you using to make payments?  I have been looking for it and can't find it

 

Thanks

Haven't Found your Answer?

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