REST Payments get error 401 UNAUTHORIZED
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:
- 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
- Evaluate, eventually, to upgrade to PRO if your country is Uk, Us or Canada
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!
@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.
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).
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.
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.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Is "Automatic Payments" dead or not? in PayPal Payments Standard
- Payments problems. in PayPal Payments Standard
- Is it safe to re-send messages when the hostname could not be resolved? in REST APIs
- Card Payments not working in PayPal Payments Standard
- Single Payout - PayPal AUTHORIZATION_ERROR API (Payout) in REST APIs