How can i change plan for subscription in paypal api - paypal

I want integrate paypal to my membership site. After i checked paypal documentation i realised that i cant find any information about how to change user subscription plan, for example some users become with "basic" plan but after asked to use "pro".
Can't find this function in api docs https://developer.paypal.com/docs/api/subscriptions/v1/#subscriptions
What is best practice to do it?

Per https://developer.paypal.com/docs/subscriptions/customize/revise-subscriptions/
You can upgrade or downgrade a subscription by changing the plan and/or quantity of the subscription. Changing from one plan to another is allowed only across plans within the same product.
For example, you can revise a subscription from a $10 basic plan to a $14 premium plan, or revise a five software licenses monthly subscription to 10 licenses per month.
Subscription revisions require the buyer's consent. If the buyer doesn't consent, they continue to be billed according to their current subscription. All successful revisions are effective in the next billing cycle.
It's documented here, although sometimes the "Revise Subscription" section is not rendered correctly.
https://developer.paypal.com/api/subscriptions/v1/#subscriptions_revise

Related

Pay as you go with Paypal

I want to implement a pay as you go with Paypal, as I read the subscriptions API we need to create a plan and product, and as I understand it, it works based on the regular payments which obviously we don't want that we want if the user's budget is below a certain amount we recharge the user by a fixed amount again, can anybody guide me how to approach and implement pay as go using Paypal?
You are correct, subscriptions bill on a regular schedule whereas what you are describing is the ability to bill an arbitrary amount at any time.
That feature is called "reference transactions", or sometimes "billing agreements". It is not enabled for PayPal business accounts by default. To request the feature, the owner of the PayPal account should contact PayPal's general business support (note: not technical support) and explain the business need for this reference transactions feature.
If it's approved for the account, PayPal can then guide you on which API integration to use; potentially something like the newest v2/vault.

PayPal - Multiple billing agreements on one purchase possible?

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.

Regular payment in Paypal using billing plans

I would like to ask you about regular payment in paypal using billing plans. I use the PHP library from paypal (REST API) to create billing plans and agreement for users but I have some problems:
I have two plans: STANDARD and PRO. What when the user buys a standard plan and after some time will be want to switch to another? What with the old subscription? I don't see the option to cancel subscription via REST API. Should I create a personal billing plan for every user and in this case update this changes?
My plans include some additional parameters like: ,,How many people can use one account" - and this parameter influences on the final price. I don't know what I should do to get regular payments with flexible parameters.
Should I create a billing plan for every user and then create an agreement for this personal billing plan? What if user paid for 12 months and after 9 months will want to change some parameters - then I should upgrade price in the billing price (for stability in the next billing cycle) and to get this difference in plan costs I should create the normal payment by http://paypal.github.io/PayPal-PHP-SDK/sample/doc/payments/CreatePaymentUsingPayPal.html?
Cheers!

Using PayPal REST API, is it possible to change any attributes of a Billing Plan that already has Agreements?

My question is whether I am allowed to change any attributes of a Billing Plan that already has Agreements associated with it. (I understand that I am not allowed to change the terms of the Plan i.e. payment_definitions - amount, frequency etc..)
It seems that some of the fields of a Plan should be allowed to be updated even if they have Agreements.
For example, my initial monthly plan was $10 a month and I don't want to offer that plan anymore. I would like to update the Billing Plan to make its state "INACTIVE". This will not affect users who already have an Agreement with this plan, but will allow me to go ahead and offer a $12 monthly plan to new users who sign up.
Another example might be if I want to change the name or description of the plan. This would not affect the terms that the user agreed to, so am I allowed to update it?

What is the proper way to upgrade a member via authorize.net

what is the proper way to upgrade a member with an ARB subscription.
We currently have members who sign up for monthly subscriptions during our sign up page... but they also are now attempting to upgrade once in the site (the page code does not work) but im trying to understand how to do this? Picture a match dot com type of site.
So i sign up on Jun 1st for $9.99/m (my card get charged on June 1st for $9.999)
Then i sign in on June 10th and try to upgrade for $29.99/m...........
Do i recharge them on the 10th? Or do i wait until July 1st and charge them $29.99/m
Is there a way to pro-rate the charges? We change our 3 tier pricing system often for testing so not sure if thats going to cause issues
The only reason i ask is this is a digital product in which users can abuse this privilege for that in between time then just cancel later. Thank you.
As of right now the only way to modify a subscription after it has begun is to cancel it and create a new one with the new amount. This means asking the customer for their credit card information again as ARB offers no way to store that information.
If you're going to allow users to change their subscriptions at any time you should consider using the CIM API which creates payment profiles so you don't have to ask the user for their credit card information again. Unfortunately CIM doesn't do recurring billing so you will have to manage subscription payments yourself. But it is more flexible then ARB when it comes to anything that isn't a basic subscription.
As far as changing subscription payments mid-cycle, you will need to pro-rate their first payment at the new tier. This can mean using the AIM API to make the difference in payment immediately or adding it to their next subscription payment. If you use ARB you can use a trial payment of one month for the pro-rated amount to make this easy to do).