Paypal recurring payment change account and decline - paypal

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.

Related

Is it possible to transfer money from one paypal account to another without touching my paypal account, but I get notified when the payment happened?

Is it possible to transfer money from one PayPal account to another without touching my paypal account, but I get notified when the payment happened?
scenario:
Seller on my website uploads product
Buyer comes on the website and purchase
If Seller receives the amount from buyer
Me (the websites unlock product for download (money dosen't touch the websites account)
coding Language dosen't really matter, if not possible is it possible to a business account with automated payout to the seller?
Use PayPal Checkout with a server backend
Specify a payee object in the purchase_unit: https://developer.paypal.com/docs/checkout/integration-features/pay-another-account/

Paypal Not too sure about IPN, when to use?

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.

PayPal handling of subscr_eot if user switch to different subscription?

Here is the scenario:
on 25/3 user purchases a basic monthly subscription (recurring payment profile)
on 7/4 user cancels basic monthly subscription and start a premium monthly subscription (a different recurring payment profile)
Now my question is whether I am going to receive a "subscr_eot" on the 25/4 (referring to the first basic monthly subscription) or is PayPal smart enough not to send subscr_eot since the user has started a new recurring payment profile with me?
I would like to set the user profile to "no subscription" as soon as I get a "subscr_eot", but I am not sure whether I can trust PayPal to notice that a new subscription was started between cancellation and end_of_term.
If it's canceled then the end of term was never reached. In such a case you'd get an IPN with txn_type=subscr_cancel. You would then get another IPN with txn_type=subscr_signup when the new profile is created.
That is assuming you're using standard subscriptions. You specifically mentioned subscr_eot, so that's why I made that assumption. However, you also mentioned "recurring payment profile". The Recurring Payments API is separate from standard subscriptions and would have different txn_type values for IPN, so if that's what you're actually using you'll need to adjust accordingly.

Paying automatically from PayPal

I need to know if the following scenario can be developed.
I have a website where the mode of payment is pay-by-usage. So when the customer exceeds a particular amount, I need to charge his PayPal account automatically. Is this possible in the PayPal API?
You can use PayPal Adaptive payment and there is an option to charge user account automatically. It is called PayPal Pre Approval payment.
In the first phase the user has to authorize your app to perform payment onbehalf of user. During this authorization step, you will get and authorize pre approval key. Later you could automatically charge user PayPal account using this key.

ipn using customer business pp account

my ipn works perfectly its setup under our business PayPal account. our asp.net website is being used by multiple customers with their own members, unique by their login. as of now the cart writes to our database with the orders and sets a status code that gets changed to 'completed' via the ipn call/authentication from PayPal using our PayPal email. now, a couple want to use their own PayPal accounts, non-for profits, so in order for this to work as previously described what changes in the post variables?
ex of what i need: a member of our customer logs in to our website, adds items to their cart and chooses PayPal payment option. it writes to our database as an 'in-process' order. it opens our customer PayPal account to complete the payments then once complete it calls our ipn setup under our PayPal account and redirects back to the custom page.
again, everything is already working great just want to call their own PayPal account instead of ours w/o needing to have them setup the ipn settings under their account, but use the ipn setup under our PayPal account. members see their own customer PayPal account billing theme and the money is in their account not ours. is this possible?
do we send the ipn location url and our customer PayPal account info in the post variables?
thanks for any help
As far as processing the payment on their PayPal account, you can go about this 2 different ways. You can either use their API credentials and pass those over in the API call and the payment will be processed on their account. Second option would be to have them grant 3rd party API permissions to your API to be able to process transactions on their account. Then you would just pass over your API credentials in your API call and also pass over their email address of their PayPal account in the variable "SUBJECT". This will then process the payment on their account.
As for still haveing the IPN POST sent to your script, you will just need to pass over the IPN URL in the API call. When pass it over in the API call, it will override whatever is set in the account. For example, if you are using NVP the variable would be "NOTIFYURL".