REST Payments get error 401 UNAUTHORIZED

MTS_Andre
Moderator
Moderator

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
Login to Me Too
9 REPLIES 9

Peekayzee
Contributor
Contributor
Why reserve features for people who are not even in development, this makes no sense...
Login to Me Too

BuyDealLTD
Contributor
Contributor

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

Login to Me Too

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!

Login to Me Too

rohrspatz
Contributor
Contributor

reply to: 1

 

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

Login to Me Too

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.

Login to Me Too

MTS_Andre
Moderator
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).

Login to Me Too

Brinkley5110
Member
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.

Login to Me Too

Amunike
Contributor
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

Login to Me Too

checkoutclub
Member
Member

Hello
[URGENT]
Is there a way to see if my account is hacked through the API? I believe a hacker got into the API and is able to siphon funds directly from the PayPal business account elsewhere. For the past few months the available balance and money received does not match. For example, account may say $1,000 received yet $100 is in available balance. I am not exactly sure how it is being done but I believe it is the backend through the API. I've lost thousands to this. Please help.

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.