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.
Related
I am building a paypal subscription system but i have some difficulties to understand some points. When using sandbox i can't simulate a payment denial process so when the payment is made, paypal redirect me to my "approval url callback" and a billing agreement is created.
So i want to know , in a real situation, will paypal redirect me to the approval url and create this billing agreement even if the payment didn't occur yet ? or this one can be created if and only if the payment is accepted ? (So if paypal denied the payment the billing agreement will never be created)
In my case, my customers will need to access to some paid features of my website so, should i wait for the "ipn webhook notification (PAYMENT.SALE.COMPLETED)" which can take several minutes to be fired to my endpoint, or can i grant access immediately after the billing agreement is created ?
Which is the most secure thing to do ?
thanks.
If the user cancels the checkout, Paypal will redirect to your cancel URL.
But the failed payment cases are not clear to me either. I believe that the agreement will be created even if the payment fails, since it needs to exist for the payment attempt to be done, but I don't work at Paypal :).
My approach is to activate the subscription on a successful redirect no matter what, [edit: the execute response returns an agreement_details.next_billing_date in the past, so you can't use that] with a short initial subscription expiration (4h). When our webhook receives a PAYMENT.SALE.COMPLETED message, we fetch the agreement billing agreement details, and update the subscription expiration to the new agreement_details.next_billing_date. But if the webhook receives a PAYMENT.SALE.DENIED, we just let the subscription expire.
HTH.
I have integrated paypal php rest api to create plan and then I have create billing agreement for this plan but the issue is payment is not deducting instantly and I want to know that how will came to know that payment is deducted from payee account.
after executing billing agreement I get object of billing agreement as response and in that object it show that billing agreement is activated but in payee's account transaction status of agreement is pending in response object outstanding amount is also zero
I want to know way to identify that amount is deducted form payee's account or not. so that I can take action accordingly.
I have solved this issue but for this I have to use callback or we can say webhooks
One more thing was there is
Webhook never works on subdomain and ssl is also requiered .
I'm not a developer, but a project manager. So please excuse my lack of proper language.
We are trying to figure out how to handle subscription refunds and then limit account access on the site.
Here's a scenario. Member signs up for an annual subscription to gain certain capabilities in the account. 3 months into it member decides to cancel and requests a refund. Normally, if no refund is issued, subscription is good until the end of the billing period, at which point account is deactivated.
In our case, if a refund is issued, account should be deactivated immediately. Question: is it possible to set this up as part of PayPal Subscriptions? Some type of call from PayPal to our system that will trigger account deactivation.
Thank you.
We recommend using IPN (Instant Payment Notifications) to be asynchronously notified of any events, in this case of those related to existing subscription/recurring payments.
https://developer.paypal.com/webapps/developer/docs/classic/ipn/gs_IPN/
If you enable IPN notifications you will receive a POST of PayPal in the following events (among others):
When a recurring profile is cancelled.
When a refund has been made to a previous completed transaction.
This way, you can set up your IPN script to keep the subscription “open” in your side for the remainder of the month even if the profile has been cancelled, or to deactivate it if the last month has been refunded.
For more information about IPN variables:
https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/
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 have gone through nearly all the question related to Recurring Payment using Paypal and have not found a solution to my problem.
We are implementing a system that is subscription based on a monthly basis (fixed amount). We do not want to store CC details for security reasons, hence we are trying to use Website Payments Pro from Paypal.
Once a user agrees to recurring payments, we are creating a RecurringPaymentProfile for that user and are storing the returned Profile_Id for the user.
Now we need to get information about all the transactions related to this Recurring Profile_Id. This information is available when we login to the Paypal account but this needs to be automated so that the application is aware of all the payments and also of the current subscription of the user.
We have found two methods (possibly) to implement this.
1. IPN (Instant Payment Notification, for this we will have to create a service to listen to notifications, which seems to be cumbersome and is more informational than we require)
2. TransactionSearch (but this returns transactions for the Paypal account and not Profile_Id)
Since we just want to know the transaction history associated with the Recurring Profile and whether this months payment was successful (implying the user is active member), what is the best method to implement this ?
Thanks,
You're looking for the GetRecurringPaymentsProfileDetails API Operation. This operation will allow you to view a majority of the details associated with a recurring payment profile using a valid PROFILEID.
Relevant detail fields you may be interested in:
LASTPAYMENTDATE
The date of the last successful payment received for
this profile, in YYYY-MM-DD format.
LASTPAYMENTAMT
The amount of the last successful payment received for this profile.
FAILEDPAYMENTCOUNT
The total number of failed billing cycles for this profile.
NEXTBILLINGDATE
The next scheduled billing date, in YYYY-MM-DD format.
NUMCYCYLESCOMPLETED
The number of billing cycles completed in the
current active subscription period. A billing cycle is considered
completed when payment is collected or after retry attempts to collect
payment for the current billing cycle have failed.