I setup a paypal rest api application for my account. I'm using the production credentials given in the hidden "Live credentials" section of the app.
I'm using the ruby gem client (https://github.com/paypal/rest-api-sdk-ruby) for this, and when I do Payment.all( :count => 100 ) I get zero results, even though my live paypal account has payments made to it in the last couple of days.
Am I doing something wrong, or do I just not understand what the REST API should be returning?
All I'm trying to do is read my incoming payments to my paypal account.
That call will only return the list of RESTful transactions so if you haven't received any transactions generated from the RESTful APIs, then you won't have any results.
Related
There is a code returned by the credit card processor when the transaction is approved, usually 5-6 digits. I'm trying to retrieve this code with REST API in their sandbox.
If you are using PayPal Payflow you can see this on the transaction result page when logged in to your Payflow account. This number is also on a printed receipt when you go to a store, it's a very common number to have after an approved CC payment. I have yet to accept a real payment through REST API, just working with sandbox so far. Looking at the response for the sandbox payment and the sale transaction I cannot see anything that looks like the processor authorization code.
Documentation for this authorization code is difficult to research and I don't want to lead anyone astray; I'm not looking for anything related to the auth code used for access and refresh tokens, same name but completely different.
I am working with paypal first time.
I have a product and I want to integrate paypal with it.
I want to achieve the following tasks :
Client comes to my website and select a plan,which is a monthly recurring plan.
Then client is redirected to Paypal for payment.
Client makes payment.
Return backs to home page.
I have gone through the documentation of paypal and I have the following questions.
What should I use REST API or Classic Sdk, as I want to create Recurring Profile,Work with EXPRESS-CHECKOUT and REFERENCE TRANSACTIONS.
I have customers all over globe and it is stated in the documentation that, for the customers in Germany and China , I have to use REFERENCE TRANSACTION.
Some where in the documentation of Merchant SDK it is stated that the classic API's will be deprecated, so is it a good approach to use Classic SDK
I also wanted to track the transactions(payment) made by user, so that I can show him the amount that is deducted in each month in his profile details.
Please suggest a feasible solution to my problem.
Thanks in advance.
Here's what I use. I went to Web Payments Standard and created a Subscription button. (I like the unencrypted variety, but you can encrypt if you want.) In there, you set the terms of the subscription, as well as where to post the IPN message. When the IPN message comes back, you deal with it. You'll get a subscr_signup at the start along with a subscr_payment. Then, on renewals, you'll get a subscr_payment again. What I like to do is store every verified IPN message in the database for my customer.
For handling the management of those subscriptions for things like tracking info, refunds, subscription cancellations, and voids, you'll need to use NVP API, which is a very simple API. If you stored in a database every IPN message with all those fields, then you should be able to pass certain fields of those to the NVP API in order to get what you need done.
If you're worried about longevity of the APIs, then don't. All they do when they deprecate APIs is stop giving you good docs on them. They still let those older versions run. If they didn't, there would be major upheaval on the web with web commerce products breaking all over the place. However, that said, if you want to prepare for the future, then get on the Braintree Payments API because PayPal bought Braintree and that's the future of their API.
I have a Java application that has just been updated with e-commerce features that use the Paypal REST API (https://developer.paypal.com/docs/api/).
I have multiple customers who run this application, each of them can log in to their own admin panel and manage their store and other features.
The Java client for Paypal REST API is working, I have tested it in the Sandbox of my own Paypal account and also in the live environment.
Question: Will each customer have to go into their Paypal account and activate the REST API to generate their key/secret for use in the Java app or is their a way for me to pay multiple PP acounts from the App/key/secret that is already active for my own PP account?
The only thing the Java app is doing with the PP API is creating and executing a payment.
If each customer has to create their own key/secret is there a quick way for them to do this from their PP admin panel? Currently the only way I know is to go into the developer.paypal.com section of the site, which doesn't seem very intuitive for a non techy.
At this time the PayPal REST API does not support third party payments in that way. The customer would need to use developer.paypal.com as you suggested to get their own PayPal REST credentials.
You can collect money and send it out using your own REST credentials but this would make you the liable receiver for the purchase.
PayPal has solutions outside of the REST API that might work for you here: https://developer.paypal.com/docs/marketplace-split-payments/
The Classic API does have a subject option, the subject is the third party. You do need permissions for some of the API calls; however, the permissions API can ease that process.
I'm using Paypal REST to process payments.
Recently I've got INSTRUMENT_DECLINED error from my user.
User has been billed from his credit card and redirected to Success endpoint.
API returned INSTRUMENT_DECLINED error, so my UI has shown Error 500.
I can't see the payment in paypal admin ui.
User lost his money. He feels upset.
It seems to be a common problem, handled well in Classic API:
https://developer.paypal.com/docs/classic/express-checkout/ht_ec_fundingfailure10486/
So in Classic API if I get an error, I just redirect a user back to Paypal, so that Paypal guides him. Paypal knows what happened and what to do, it's ok.
But I can't find any docs about processing error recovery in REST API.
Should I hack into classic express checkout with my REST-gathered data?
Or is there any proper way to make the good user experience in case of a problem on paypal's side?
I have been working paypal integration to an existing system of ours and successfully done tests on sandbox by using rest api and express checkouts.
Although documentation is detailed, I couldnt see anything about chargeback (i.e reverse transactions) and cancellations on rest api documentation page http://developer.paypal.com/docs/api/
So in case a user buys something successfully and the payment status becomes "completed", then there is a reverse transaction like chargeback, paypal will send a request to the return and cancel urls which are predefined while creating the related payment, or the client application has to check the payment statuses manually by rest calls? Or are there any other configs that I need to send while triggering the very first payment request?
You'll need to setup Instant Payment Notification (IPN) to handle that sort of thing.
IPN will automatically POST data about all transactions that hit your PayPal account to a URL you specify. This URL (a script) can receive the data and update your database, generate email notifications, or anything else you might want to automate based on the transactions.
You can handle all sorts of things with IPN. For chargebacks specifically, you would receive an IPN with the following params...
txn_type=new_case
case_type=chargeback
Of course, you'll get a bunch more parameters, too, but those would be how you can pick out the chargebacks and processing them accordingly.