Billing agreement with trial and failed payments notifications - paypal

Hi fellow developpers,
I want to use REST API Billing Plans and Agreement to do the following application:
Create a recurring payment based on user's selected Billing Plan which includes a 30 days free trial.
The user can select from a month by month plan which costs $X or a yearly plan which costs $Y.
Both plans include a free 30 trial
Recurring payments should start automatically at the end of the 30 days trial
Now, I know I can create those 2 billing plans with respective amount/period/cycle, etc. My question is about the trial:
->> Can I create & execute a billing agreement based on the selected billing plan with a startDate that would be in 30 days from now ??
I saw the trial example in Paypal docs for the SOAP API but I really want to use the REST API and there is no clear answer right now!
Thanks guys!
Jean

I'm not sure if this is correct or not, but I think that you would to include two PaymentDefinition objects in your plan. You'd include an additional PaymentDefinition for the trial and set the . Like such:
PaymentDefinition paymentDefinition = new PaymentDefinition();
paymentDefinition.setName("NAME");
paymentDefinition.setType("TRIAL");
paymentDefinition.setFrequency("DAY");
paymentDefinition.setFrequencyInterval("30");
paymentDefinition.setCycles("1");
Currency currency = new Currency();
currency.setCurrency("USD");
currency.setValue("0.00");
paymentDefinition.setAmount(currency);

Related

How is PayPal accepting payment for the first month free? After first month it will pay.

I have create a plan for directory Access on my site. my site is based in real estate directory access plan is $8.99/month i want to create a functionality for first month free access then after every month pay charge $8.99. I have also added recurring function for PayPal.
Please help me how can i do this.
https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECRecurringPayments/#include-an-optional-trial-period
https://developer.paypal.com/docs/classic/express-checkout/ht_ec-freeTrialRecurringPayments-curl-etc/
Implementing a free trial period with PayPal
You can use the trial option.

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!

Paypal : Billing Plan + Agreement - basic Qs

Some fairly basic questions as I don't seem to be able to find simple answers in API documentation.
I have a shop selling magazines + other items.
Currently selling individual items or in groups and charging using PayPal REST API.
We want to add subscriptions - which I gather means using their Billing Plan + Billing Agreement. Have some Questions:
Does every sale need it's own Plan + Agreement ? (Or can I just
pre set-up 4 plans (different postage options), and add all the
agreements to one of those 4 plans)
I can't see a list of acceptable Frequency values- Is "Yearly" an option?
Do I specifically need to call "Bill outstanding agreement amounts" i.e. "POST /v1/payments/billing-agreements//bill-balance" to charge it in a years time - or should it in theory be charged automatically?
To check it's been paid - I need to search for transactions - right ? ("GET /v1/payments/billing-agreements//transactions? start_date=yyyy-mm-dd&end_date=yyyy-mm-dd")
Thanks.
Let me answer one by one:
A Billing Plan (or a Billing Agreement) is an agreement made between the seller and a specific buyer. The answer at this question is yes: every sale needs its plan.
Yes, yearly is a valid option. The variable “frequency” accepts the following value: WEEK, DAY, YEAR, MONTH. Please, find here our REST API Reference: https://developer.paypal.com/docs/api/#billing-plans-and-agreements.
Buyer will be charged yearly (for example) automatically. You need to call “Bill outstanding agreement amounts” only if there is an outstanding amount to resolve. For example, if a payment failed.
Yes, you are right. Please note, dates should be in this: yyyy-MM-ddTHH:mm:ssZ. Here our documentation: https://developer.paypal.com/docs/rest/api/payments.billing-agreements/
If you need more information, please let me know.

Paypal subscription auto payments on a specific day?

I am offering an annual program and want to automatically withdraw payments from my clients via PayPal. I see how to create a subscription to do this.
However, it charges them one month after they pay the first installment. I really want to bill all of my clients on the 1st of the month for 12 months, to simply the accounting for myself and them.
Is there a way to create an automatic payment on the 1st of every month without asking all of my clients to pay on that specific day?
I called Paypal and they said it would require html coding, but couldn't tell me HOW that might be accomplished for someone like me who doesn't write code.
If you're using the Recurring Payments API you can specify the PROFILESTARTDATE and set it to whatever future date you want. The profile will be become active immediatly, but it won't start until that date, which is when the first payment would be made.
Just keep in mind if somebody signs up on the 2nd of the month you'll basically be giving them a free month.

Paypal Overage Pricing

I'm using Paypal website payment subscription. I want to charge overage price from my customers when it's needed. Is that possible? I don't want to use express checkout or double modify existing subscription.
For example, I'm charging $20 each month. For only current month, I want to be able to charge $22. Still my regular payment is $20. Do I need any permission or do I need to take my customers' credit card info and use payflow sdk?
Any solution?
You would just need to modify the amounts you are currently setting in your subscription button. You could set it up so that it has a 1 month trial at $20, then after that it starts its regular recurring amount of $22.
I recently had the same question and had a call with PayPal tech support about this issue and they said there is no way to do this. I too have a normal monthly subscription that I want to be able to charge usage overages when applicable.