Paypal billing plans and billing agreements - paypal

what happens when you delete a paypal billing plan, with users who are already subscribed to this plan? does the subscription plan gets cancelled? and one more question would be - let's say a user has moved from a plan to an other one, do they get automatically refunded? or do I need to refund them somehow? thank you!

Related

PayPal Recurring Payments - Are Billing Plans meant to have multiple Billing Agreements?

Let's say I have a service where a user can subscribe for:
$10/Month
$25/Month
$50/Year
Am I correct that to set this up properly with PayPal's API, I should:
Create three Billing Plans - one Billing Plan for each payment tier
Activate each Billing Plan
When a customer subscribes, they create a Billing Agreement under one of the preexisting Billing Plans and go through the authorization process? Thus, multiple customers would have agreements under say the $10/Month Billing Plan?
I'm further confused because, astonishingly, there is no way to use the API to list all of the Agreements: https://github.com/paypal/PayPal-REST-API-issues/issues/5
When a customer subscribes, they create a Billing Agreement under one of the preexisting Billing Plans and go through the authorization process? Thus, multiple customers would have agreements under say the $10/Month Billing Plan?
Yeah, that's right.
Because there is no API to list all of the agreements, so you could create a billing plan every time a customer subscribes. Then you would be able to list all of the billing plans you created.
GET /v1/payments/billing-plans
https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_list

get state of agreement paypal subscriptions

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 .

Paypal After Updating a Billing Plan Amount

I have this monthly subscription and I will be making use of the Paypal Rest API SDKs available in this link:
http://paypal.github.io/PayPal-PHP-SDK/sample/#billing
My question is that, If I updated the billing plan amount, what happens to the users(or billing agreements) subscribing to the old billing plan? Do they pay the updated plan amount in the next billing cycle?
thanks.

Some questions about billing plans & agreements REST API

I have some questions about subscription functionality using REST API. We have implemented recurring payments using "Express Checkout NVP/SOAP Integration" but for us it isn't optimal, because:
Webhooks easier and more usable then IPN messages;
We can't force customers to pay from PayPal balance.
That's why I want to rewrite it with REST API. I think the flow will be like:
User press button and we make the first request to get auth token;
Create billing plan;
Activate billing plan;
Create billing agreement;
Because of we're using PayPal payments here we redirect the customer to approve payment;
Execute billing agreement.
My questions are:
Is this flow correct?
To redirect customer for approving payment we need to make four requests to PayPal API servers, is it normal?
Should I create and activate a billing plan for every customer or I can use one plan for all customers?
If so can I create the plan in the merchant's profile page or I can do it only programmatically?
Let me see if I can answer your questions and provide some samples.
Yes, that flow is correct for the first request. If you already have a plan that you'd like to subscribe people to created, you can skip those billing plan steps. More on that below.
For the REST APIs, yes that's the normal flow for PayPal. Think of the plan as setting up the architecture of the payment that you'd like to offer (such as a subscription plan for a service). You set this up once and then can subscribe many people to that same subscription plan using a billing agreement.
If the details of the plan are the same for each person, then create one plan and then use a billing agreement for each person to subscribe them all to that same plan.
I haven't seen an integration of this with the profile system, but it's an interesting idea. For the time being, as far as I know you'll need to do this programmatically.
I've also created some new quickstart guides on the site that should help through creating the billing plan and agreements:
Billing plans: https://developer.paypal.com/docs/api/quickstart/create-billing-plan/
Billing agreements: https://developer.paypal.com/docs/api/quickstart/create-billing-agreement/
I have a more practical example of this billing plan / agreement integration in a Slack bot payment sample, if that helps: https://developer.paypal.com/docs/api/service-integrations/slack-bot/subscribe/

PayPal Recurring Payments Item Purhcase

I am developing a payment system using PayPal Recurring Payments (SOAP API).
I am Creating a Recurring Profile and setting up the monthly billing amt, period etc. Now when the user wants to upgrade his plan, I would like to Bill the buyer for the difference amount by using the same Credit card info which is associated with his recurring profile. How can we achieve this? Shall we do a complete separate transaction? Or DoReferenceTransaction API?
If I do a separate Transaction will PayPal allow me to do another transaction if the monthly recurring day falls in the next 72 hours?
Please share your thoughts.
Thanks
I would go with reference transactions like you mentioned. That would be separate from the profile, so yeah, if the recurring payment comes soon after it would process like normal.