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/
Related
Sorry, if this topic is too unspecific, but actually I did not know where ask else. If this question is not ok, please feel free to close it.
My question is, if it is possible to execute / approve multiple billing agreements from one user at one purchase at paypal?
We created a shop where the user can buy different virtual products for different periods. If a user buys 2 or more products we want to create for each product a billing agreement (i.e. 12 months). If I understand the paypal API correctly, every product (subscription / billing agreement) has to be approved independently.
Is there a way to let the user approve the billing agreement once for all products at all? Or can we create a billing plan with multiple products in it?
Thanks for your help in advance.
According to PayPal, it is not possible to accomplish this using the latest version of the SDKs. It should be possible, however, to accomplish this using the currently-deprecated SOAP version of SDKs. There are several API calls related to the creation of Billing Agreements, but two calls that are required for basic situations: SetExpressCheckout and CreateRecurringPaymentsProfile. All of the supporting documentation for this calls using the SOAP API clearly state that there is a limit of 10 billing agreements per transaction. For example, this is taken from the documentation from CreateRecurringPaymentsProfile:
RecurringPayments | ProfileDetails
(Required) You can include up to 10 recurring payments profiles
per request. The order of the profile details must match the order
of the billing agreement details specified in the SetExpressCheckout
request.
I am in the process of attempting this with the PHP SDK using Express Checkout specifically and I will provide an update on whether I can in fact get this working.
I apologize that this is not as clear an answer as it should be, but the documentation surrounding this question provided by the developers is directly conflicting and IMO there should be some explanation of that here.
I am looking for alternatives to stripe's per-user pricing subscription : I need :
to charge my user a recurring payment which depends on the number of user accounts he has
to be able to change the number of users via an API, with customer validation is ok, but ideally without changing a plan nor creating a new type of plan. Check status, cancel, etc. via the API too.
Ideally with no up-front charge = fee + percentage of transaction
I found out that stripe might be a good option (see per-user pricing here https://stripe.com/docs/subscriptions) and unfortunately Paypal does not seem to offer this kind of feature (plans can only be increased by 20% each 180 days or you need to cancel previous profile and create a new one). Or am I mistaking about Paypal ?
What alternatives would exist for such needs?
What you want are Reference Transactions, in which case you run an original authorization or sale transaction, and then in the future you'd run DoReferenceTransaction with the original transaction ID and any new amount you need to process. It will process immediately without any redirection or additional authorization required at that point.
If you use reference transactions with Payments Pro (direct credit cards) then all you need to do is save the original auth or sale transaction ID to your database so that you can pull it out for the user when you need to process a future payment using DoReferenceTransaction.
For PayPal payments you'll use Express Checkout w/ Billing Agreements, which will give you back a billing agreement ID. In that case, the billing agreement ID is what you'd pass into future calls to DoReferenceTransaction.
In either case you'll need to build your own system to lookup payments that need to be processed each day and loop through them making a call to DoReferenceTransaction for each one.
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/
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.
Well, I didn't really know how to call this...
I have been surfing PayPal's developer documentation for a while now, but there is nothing that speaks to me with direction as to achieving what I am looking for.
It's probably well documented, but I don't grasp it well enough yet to make sense while reading each part separately.
I have read about Preapproval, though it seem to require that I send the customer's browser to the designated PayPal address.
I have thought about creating a database with credit card information, but that is too scary -- so I am looking to see if there is a way for a customer to allow me to do unattended charges to their PayPal account, much like I would be able to do if I had a database with customer credit card information.
Any direction would be appreciated.
Yes, this is possible. There are two options:
PayPal Express Checkout with a Billing Agreement
This works similarly to Preapprovals (which is Adaptive Payments, a different set of API's). You would need to redirect the buyer to PayPal in order to accept the billing agreement, and from then on you can bill the user using to DoReferenceTransaction API.
PayPal DoDirectPayment (Website Payments Pro) with Reference Transactions
You would need to have an existing transaction, and instead of a billing agreement ID, you would submit a prior transaction ID to the DoReferenceTransaction API. You can then re-bill the user on the card details which are stored with PayPal (up to 1 year. assuming the card details are still valid).
Do note that both options require you having access to the DoReferenceTransaction API, which you will not have access to by default.
For further information on the API itself, see https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_DoReferenceTransaction
Important: You will need to call in to get Billing Agreements activated. Good luck finding someone that knows what you need (no really) :-)
You will eventually find someone who knows what DoReferenceTransaction is and then once you've finally found them they'll probably tell you they can only activate it in the sand box and transfer you to someone in the Business Office. They'll have to then submit it to approval with someone else. Est. Total call time 59 minutes 8 seconds.
The guy I just spoke with said he's probably handled only 2 call in a year about DoReferenceTransaction - so you may need to ask around. They have other subscription billing and that's not what you want.
Also realize that approval is not instant and you may need to have established history. The guy who helped me said this is the best number
888 215 5506. Be sure to explain why you need them carefully and try to reassure them you're legitimate. A reputable website behind the domain for your paypal email will probably help.
Good news: I applied for Reference Transactions Friday and was approved today (Sunday). This was for two accounts - one which had only been established the day before.
Thank you for contacting us about enabling reference transactions on
your PayPal account.
I am pleased to inform you that your request has been approved. You
can begin using this feature immediately.
If you have further questions regarding this email, please contact a
Merchant Services Specialist at 1-888-221-1161.
Sincerely,
AJ Merchant Risk Operations
I was trying to do this recently and I found this question with no luck because the Express Checkout with a Billing Agreement method is deprecated since January 1, 2017.
There is a new REST method called Vault payment methods that recently entered open beta and it's not in the official documentation (to this date), so I leave the link to Create transactions when your buyer isn't present, in case someone needs it.
The process it's explained in the documentation but basically, you need to create a payment token (the source can be a PayPal account or a credit card), and then use that token to capture the payment.