Is there any need to use IPN with
1. EXPRESSCHECKOUT (SETEXPRESSCHECKOUT => DOEXPRESSCHECKOUT)
2. RECURRING PAYMENT (SUBSCRIPTION)
It depends on how you operate your business...
If you ship physical goods, then, of course a human will check if you received a payment before you send the goods to the customer...
But with digital goods it's another story, you want to deliver the digital content as soon as you get the payment in your account. That's the main usage for IPN. If you get the IPN confirmation, you fire an email with a download link directly to the customer's email.
Other use cases would be, automate tasks, like accounting, mailing, renewing subscription status, reverting all you need to revert in case you get a payment cancelled notification, etc.
Yes, IPN can be very useful with any PayPal transactions. It is simply a POST of transaction data sent to your listener script on your server. This script receives the data and can process it however you wish, which allows you to automate tasks like updating databases, sending custom email notifications, hitting 3rd party web services, etc.
IPN works with all transactions once you have it configured, so you can use it to process payments, refunds, disputes, cleared e-checks, subscription payments, canceled profiles, suspended profiles, etc.
Whether or not you need to utilize it is up to you and your project requirements, but it is indeed very useful for Express Checkout, Subscriptions, and any other transaction types.
Related
We operate an application that utilizes PayPal's Mass Payments API to handle bulk payments of our users' customers. We have a listener set up to handle the IPNs for these payments, and process the successes/failures accordingly.
Recently, we discovered that one of our major clients had mistakenly disabled IPNs from their PayPal account, causing a large number of Payments to not have their final status in our application. While the "Resend IPN" option was available, is there an API or anything we can call out to to check payment status for these without relying solely on IPNs?
You could try this , but you need sufficient access to that particular account which means the account holder have to grant you the permission to view the transaction.
I am useing paypal exprees checkout API. I want to cancel recurring profile. I add a note for reason of canceling. The recurring profile cancel successfully and note setup to buyer profile history page. But The note does show buyer email notification.
Can you tell anyone how can I show user reason of cancellation in email notification?
Thanks advance
That note is considered an internal use sort of thing, and isn't meant to be shown to the buyer.
What you can do, though, is setup an Instant Payment Notification (IPN) solution which would get hit when the profile is canceled. Within this you can generate a custom, branded email notification, update your database, hit 3rd party web services, etc. It's a very useful tool that allows you to automate all sorts of things based on different transaction types.
My customer is using recurring payment. I have two problem to resolve:
Case 1 : My a customer have some recurring bill. This want change these recurring bill to other paypal account. Is there paypal api to support to delete recurring bills in current account and renew thes bills to new account.
Case 2 : If due to payment,customer's paypal account is not enough money, my system will lock some customer's function. I want paypal call my system 's function to handle this. Is there a way to resolve my problem.
1) You can use ManageRecurringPaymentsProfileStatus to cancel/suspend the profile on the existing account. You'll need to have the user go through the process of creating the new profile on the new account, but this can be done via the use of CreateRecurringPaymentsProfile.
If you happen to be working with PHP my class library for PayPal will make these calls very simple for you.
2) You'll want to utilize Instant Payment Notification (IPN) to automate the management of the profiles. PayPal will POST transaction data in real-time to a listener script that you have setup on your web server. This script can receive that data and then update your database, send out email notifications, hit 3rd party services, or whatever you want to do from within it.
PayPal will send an IPN when a profile is created, updated, suspended, canceled, as well as when payments are completed, failed, skipped, etc.
I am working on a subscription system that integrates payments through CC and paypal account, the problem happens in delay in activating the recurring profile of subscribers paying through CC.
I am using "CreateRecurringPaymentsProfile" API call for creating recurring profile. Initially I relied solely on IPN messages for payment confirmation, but there are delays in receiving these sometimes for few hours, for some users, but since IPN messages are only initiated with changes made in merchant's account, i believe the transfer of money could take time, and thus the delay.
I then thought of momentarily activating the profile based on instant responses from "CreateRecurringPaymentsProfile" and then the account is deactivated if we subsequently receive a IPN messages of txn_type payment skipped. My question is how most sites implement instant activating recurring payments using paypal api and is SUCCESS response from "CreateRecurringPaymentsProfile" is reliable to indicate that payment has happened?
I'm having some trouble choosing between PayPal's Instant Payment Notification (IPN) and Payment Data Transfer (PDT).
Basically, users buy a one-off product on my site, pay on PayPal, and return to my site. I understand how IPN works but I'm now seeing that I might be able to trigger the various actions that take place after a successful purchase more easily with PDT, as the data gets returned there and then (as opposed to needing a separate listener).
However, PayPal's PDT documentation contains this cryptic line: "PDT is not meant to be used with credit card or Express Checkout transactions." ... but I can't find anything further whatsoever on the topic.
Are credit cards REALLY not meant to be used with PDT? I would like more than a sentence.
Does that mean that a user must have/create a PayPal account to pay?
Does it mean that if I want to allow users to pay with their PayPal accounts AND/OR with credit cards directly, I must implement IPN?
Could anyone who's gone through this kindly shed some light?
The APIs for PDT and IPN are similar. The main difference is when you receive the notification. For that reason I would recommend implementing both.
With PDT you get the notification instantly and can do any additional processing required and show the user a confirmation page.
With IPN you are guaranteed to be notified that the payment was received even if the user's computer explodes before it can send you the PDT.
Implement both and get the best of both worlds. But if you're only doing one, IPN is the reliable one.
One catch: if you implement both then there's a chance your payments could be processed twice. Take care to ensure that doesn't happen. The application I wrote handles the PDT and IPN almost identically (the backend part is the same) and that code acquires a per-web-user lock in the database, so that if the same user tries to submit the exact same payment multiple times it can only be processed once. Once processed the result of that process is re-used for any subsequent attempts to process it.
Edit
One more thing: IPN carries more information than PDT. There are lots of different messages that you can receive from IPN, such as chargeback notification, etc, and thus you really should implement it.
PayPal's PDT system sends order confirmations to merchant sites that use PayPal Payments Standard and lets them authenticate this information. Such sites can then display this data locally in an "order confirmation" page.
When to Use PDT?
IPN provides the same capabilities described above. So, when should you choose PDT instead of IPN?
With PDT, your site is notified immediately when a customer completes payment. With IPN, however, there is a material lag between the time a customer completes payment and the time your site receives notification of this event.
So, use PDT if your site includes a feature that requires immediate payment notification.
For example, consider a digital music store. With PDT, this store can let customers download their purchases right away since PDT sends order confirmations immediately. With IPN, such immediate order fulfillment is not possible.
Advantages of IPN
PDT has a a major weakness: it sends order confirmations once and only once. As a result, when PDT sends a confirmation, your site must be running; otherwise, it will never receive the message.
With IPN, in contrast, delivery of order confirmations is virtually guaranteed since IPN resends a confirmation until your site acknowledges receipt. For this reason, PayPal recommends that you implement IPN rather than PDT.
Another advantage of IPN is that it sends many types of notifications, while PDT sends just order confirmations. So, using IPN, your site can receive, for example, chargeback notifications as well as order confirmations.
Note: If your site must be notified of payments immediately, you can implement both IPN and PDT. However, if you do, your site will receive two order confirmations for each sale. As a result, you must be careful to take action (say, ship a product) on just one copy of a given confirmation message.
Documentation Here
Re 1. PDT is meant to use with Auto Return for Website Payments feature. Auto Return redirects to PDT site after paying money to seller. Unfortunately it's not possible to use that feature along with PayPal Account Optional - used to enable Credit Card payment. Here is note from PayPal: 'If you have turned on Auto Return and have chosen to turn on PayPal Account Optional for new users, a new user will not be automatically directed back to your website, but will be given the option to return.'. User will have an option to go back to your site(PDT step) or stay on PayPal site. To sum it up when paying by Credit Card user can skip PDT step if user will not click 'return to store link'.
Re 2. It is up to you what paying options do you want to allow. If you want to allow paying without a PayPal Account you can enable Account Optional. If you want to allow only users with PayPal accounts disable that feature. There might be more options.
Re 3. In your case you need to trigger action after successful purchase. Recommended way would be to implement IPN. PDT doesn't work for all cases and doesn't guarantee message delivery. Here is link to doc covering that topic PDT vs IPN.
This is an old question, but my simple answer would be - Why not use both PDT and IPN? They will work fine for card transactions.
PDT can provide the immediate transaction status to your website, where you can quickly check the payment success or failure status and provide the user with appropriate message.
Meanwhile, you can await the full verification from IPN in the background. Once received, you can use this to further update your DB and process the order.
You can follow this step-by-step guide which I found to be very clear and helpful - and it's still valid in 2018.
https://www.codexworld.com/paypal-standard-payment-gateway-integration-php/