Cannot find resource on suspending subscription - paypal

I am not a developer. I am managing a team of developers and they are telling me this cant be done. However i am finding on here that it indeed can be done.
Our website that we are building is subscription based. I need a way to award free subscription time to an account.
For example:
User signs up on Jan 1 and pays the 7$ per month subscription.
Next billing date is Feb 1 but sometime in Jan we grant this user 1 free month.
We need to skip the Feb 1 bill date and resume billing on March 1 (with out back charging them for Feb)
Can anyone show me where on the paypal dev site i can find the info on this? I would greatly appreciate it! I have looked through the other posts but cant find a link.

Based on what I know, this can be done using PayPal API but it is not through recurring payment API. One way to do this is to use reference transaction API and charge the customer whenever your system indicates that it should. Links:
https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns
https://developer.paypal.com/docs/classic/express-checkout/ht_ec-refTrans-SetEC-DoRefTrans-curl-etc/
This particular implementation requires your system to use scheduler of some sort such as cron jobs or daemon process to charge the customer when needed. So the flow looks something like this:
Customer goes to your website/system to subscribe
Your system runs Billing Agreement API to obtain billing agreement with the customer. Your system receives billing agreement ID and store it into database for future charges
Your system would determine when to charge the customer and when to skip.
When the time came to charge the customer, use the billing agreement ID and include it in Reference Transaction API.
I am outlining the above as general guide but I hope you got the gist of it.

Related

PayPal Subscribe with a custom billing date at the last business day of every month

For the taxation purposes, the subscription should charge the customer at the last business day of every month. Is there a way to do that instead of charging the customer every month/week?
In the docs https://developer.paypal.com/docs/subscriptions/integrate/ I have not found any way to implement that.
Subscriptions bill on calendar days, and have no knowledge of business days.
Other non-Subscription PayPal integrations, such as using reference transactions or vault, are capable of billing arbitrary amounts at arbitrary times when you do an API operation with the token. (They require the reference transaction feature which is not enabled on live accounts by default, the account owner must contact PayPal's business support --not technical support-- to request it and only then can PayPal guide you on which API to integrate)

How long is a payment executable?

When I create a payment and locally store the paymentId and payerId, is it possible to execute the payment two months later?
I want to allow a free testing phase for an application and execute only if the user still wants to use the product after two months.
Basically, PayPal guarantees to capture the funds up to 3 days from the day of authorization. I remember we had to automatically approve PayPal orders that required manual review or we would lose them after the 3-day authorization period.
Looking at their documentation they explain that an authorization can be re-authorized in a 29 day period.
Check their autorization period and honor period documentation here:
https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/authcapture/#honor-period-and-authorization-period
Having said that, I believe that the capability you're looking for is called a "billing agreement" or "reference transaction". It allows to create an agreement with the shopper (on a 0$ payment) that can be charged at a later time. This feature requires special underwriting by PayPal, and is not easily approved. See documentation here:
https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/

PayPal subscription not working properly when one account has been used for two users

We have tested with a personal account in sandbox and live for three users for paypal subscription.After purchasing three subscription we cancelled one of them and continue with other two.So after one day, two of those should renew the subscription and continue and another one should not renew.For example those three accounts are A(purchase time: 4apr 2.30pm ),B(purchase time: 4apr 3pm),C(purchase time: 4apr 3.30pm,cancel time:4apr 3.45pm). Say we have cancelled account C. So on 5 apr at 2.30 pm A should renew,at 3 pm B should renew and 3.30pm C should cancel.But the problem we are facing is that those renew and cancellation process are not happening at the correct time.A is not renewed at exact 5apr 2.30pm. B is not renewed at exact 5apr 3pm.C is not cancelled at exact 5apr 3.30pm.All those actions are fired around 5apr 4.30pm(which is not right).So that is an time error.We set notify url in the paypal form and also in the business account for renewal functionality in database.
Here is the paypal form which we are using.
Note: We have used a single paypal account for all those three users.
So if any one have a solution for this please post here.Thanks in advance.
PayPal doesn't guarantee that subscription payments will happen at a particular time of day -- only that they will happen on the day that they're supposed to. Likewise, it's virtually impossible to predict exactly what time a subscription payment will take place.
If you need payments to happen at a particular time of day, you might consider establishing a billing agreement with the buyer and running a reference transaction against the billing agreement at the proper time. More information on billing agreements is available here: https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/

Do I need to execute my PayPal BillingAgreement one time only or every time the bill is due

I am trying to incorporate a member subscription on my website using the paypalrestsdk with python in a django application. I understand that I need to do the following:
Set up a BillingPlan for each type of subscription (ie. a monthly plan for $10 a month and a yearly plan for $100 a month)
Create a BillingAgreement, which (based on the user choice of billing plan) redirects the user to approve the agreement and which returns the agreement object which will give me the ability to access the plan information in order to update, suspend, reactivate the agreement.
Finally, in order to get started, I need to execute the BillingAgreement. This is the part that confuses me. Do I execute the agreement each month (for my users who have agreed to monthly subscription) or do I execute the agreement one time in order to tell PayPal to automatically process the monthly payment? If the latter case is the answer then how would I know if a payment failed for some reason? (Or do I need to check every time the user logs in by retrieving their BillingAgreement and searching for transactions within a particular date range for that agreement to make sure they are up to date and none of them failed?)
I have looked at the PayPal developer docs as well as GitHub samples. I have also successfully written code to create and execute one-time payments using the sandbox and all seems to be working just fine. I am just confused by how the recurring payments in the REST api work - specifically see #3 above.
You do not need to execute the billing agreement each month but only once to start the agreement i.e. tell PayPal to automatically process the monthly payment.
You can use the search for transactions feature to check that none of the payments of a user failed, but you might only need to do that at the start of every monthly payment cycle for a particular user. As opposed to everytime they log in. In the future, we will try to provide better notification mechanisms to inform the merchant that a payment on a billing agreement has failed/changed status.

Paypal Recurring Payment API CALL when taking money

I am writing a subscription where I need to provide users a month trial and charge $5.00 after trial is finished. I just found an amazing code to do that for me.
I also have setup paypalpro plus recurring payments
This is the link
https://github.com/krio/paypal-recurring-subscriptions
Questions:
1- How to make first month Free Trial?
2- I need to update users billing and update their payment in my database so it can calculate their subscription, how would i get to call from paypal to my files to update?
If you are using subscriptions and you are wanting to make the first month a free trial, you would need to pass over the following variables and values.
a1=0
p1=1
t1=M
You can find a description of all of the variables for subscriptions here.
If you are wanting to get updates back to your system/database to update your profiles and etc, you can use IPN to do this. Instant Payment Notification (IPN) is a message service that notifies you of events related to PayPal transactions. You can use it to automate back-office and administrative functions, such as fulfilling orders, tracking customers, and providing status and other information related to a transaction.