PayPal Recurring Payments and Item Numbers - paypal

I am having my users select a product for purchase, which is a monthly subscription. It is renewed every 30 days. My intention was to create a Recurring Payment and handle the subscription renewal via an IPN. However, I am unable to set a product number and get it to return in the IPN. I have several subscription products to configure and if I am unable to distinguish between them in the IPN's, I can't perform the actions on my side to renew their subscription for another 30 days.
First, am I doing this the right way? Is this the proper usage of recurring payments? If so, how can I set the identifying information I need? Is it set when the billing agreement is created? Which parameters do I use to set this? I've been unable to find a comprehensive list.

Related

configure reoccurring payment and one time payment for paypal using php

I am working on a website which provides the subscription plans like for 1 year, 2 year and 3 year. User can make payment using the one time payment and using the monthly payment. for achieving this functionality I integrated reoccurring payment and one time payment using paypal gateway and I have successfully integrated. But I have some problem below is my scenario.
Suppose customer checkout using one time payment for one year subscription plan and make payment on paypal then paypal will hit at my IPN handler script and I will update the subscription plan for that customer for one year.
Now if customer checkout using the reoccurring payment for one year subscription plan then it will hit at my IPN handler script and i will update the subscription plan.
But here i want to know how i will differentiate with one time payment and reoccurring payment because whenever paypal hit the IPN for monthly payment then it will update my database for that customer and it will update the subscription date with one year. In this way it will update database every month and customer subscription date will update every month with one year.
I hope you can understand what i am trying to say,
Thanks.
The txn_type in your IPN will be different depending on the type of payment, so that's one way to distinguish between the two. Configure your IPN to handle each txn_type different depending on what you need to do for one-time vs subscription payments.
Also, keep in mind that you can add an initial payment in to a recurring payments profile and it will be treated as a one-time payment. Sort of like a setup fee when signing up for cable service or something like that.
Are you using the Recurring Payments API or Standard Subscription buttons or what?

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.

Allow end user to modify recurring paypal subscription amount

I've read a few responses here regarding the modification of the recurring fee amount but still confused.
We have 5 subscriptions levels per month:
£10
£15
£20
£30
£50
We want to be able to let customers change their subscription package to any of the other options.
It sounds like if they are changing to a package with more than 20% difference from the one they are on - we would have to make them cancel and start a new subscription.
Surely there is a way to have the subscriber confirm they are happy to change the amount?
thanks
User can modify your paypal amount, but some restriction are there.
In Standard account, you can use "modify" html variable to change subscription amount as below.
0 – allows subscribers only to sign up for new subscriptions
1 – allows subscribers to sign up for new subscriptions and modify their current subscriptions
2 – allows subscribers to modify only their current subscriptions
The default value is 0.
Following link will hel you more,
https://cms.paypal.com/uk/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_subscribe_buttons#id08ADF500NXK
you can not modify often your amount, you can only increase the subscription amount by 20% for 180 days.
but if you move to paypal payflow($30/month), paypal itself provide API to communicate with paypal service. its very flexible to modify, cancel subscription.
paypal standard - user cannot cancel subscription their self if they dont have paypal login.
paypal payflow - user can able to cancel their subscription.

Get Transactions associated with a Recurring Payment Profile in Paypal

I have gone through nearly all the question related to Recurring Payment using Paypal and have not found a solution to my problem.
We are implementing a system that is subscription based on a monthly basis (fixed amount). We do not want to store CC details for security reasons, hence we are trying to use Website Payments Pro from Paypal.
Once a user agrees to recurring payments, we are creating a RecurringPaymentProfile for that user and are storing the returned Profile_Id for the user.
Now we need to get information about all the transactions related to this Recurring Profile_Id. This information is available when we login to the Paypal account but this needs to be automated so that the application is aware of all the payments and also of the current subscription of the user.
We have found two methods (possibly) to implement this.
1. IPN (Instant Payment Notification, for this we will have to create a service to listen to notifications, which seems to be cumbersome and is more informational than we require)
2. TransactionSearch (but this returns transactions for the Paypal account and not Profile_Id)
Since we just want to know the transaction history associated with the Recurring Profile and whether this months payment was successful (implying the user is active member), what is the best method to implement this ?
Thanks,
You're looking for the GetRecurringPaymentsProfileDetails API Operation. This operation will allow you to view a majority of the details associated with a recurring payment profile using a valid PROFILEID.
Relevant detail fields you may be interested in:
LASTPAYMENTDATE
The date of the last successful payment received for
this profile, in YYYY-MM-DD format.
LASTPAYMENTAMT
The amount of the last successful payment received for this profile.
FAILEDPAYMENTCOUNT
The total number of failed billing cycles for this profile.
NEXTBILLINGDATE
The next scheduled billing date, in YYYY-MM-DD format.
NUMCYCYLESCOMPLETED
The number of billing cycles completed in the
current active subscription period. A billing cycle is considered
completed when payment is collected or after retry attempts to collect
payment for the current billing cycle have failed.

Changing the Amount of a PayPal Subscription

We are using PayPal subscriptions to automatically make ongoing monthly donations. The user initially creates a subscription with some pre-determined monthly donation amount (e.g., say $50/month). This creates a recurring subscription which we process by way of IPN. All good there. But, our interface allows the user to come in and change their monthly donation amount, say from $50/month to $100/month. I am wondering how I can change the PayPal subscription to reflect this new amount?
There is a method in PayPal's NVP API called "UpdateRecurringPaymentsProfile" which says I can update the subscription amount, but unfortunately it says:
For recurring payments with Express Checkout, the payment amount can be increased by no more than 20% every 180 days (starting when the profile is created).
(reference: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_UpdateRecurringPaymentsProfile)
To be honest, PayPal's API's are quite confusing so I'm not sure if I am using the Express Checkout or not. (We are creating Subscription buttons using the simple Website Payment Standard API).
Will this work? If not, is there an alternative to achieve what we need?
Thanks!
I'm not sure if I am using the Express Checkout or not. (We are creating Subscription buttons using the simple Website Payment Standard API).
I hope rereading the above, you will realize that you answered your own question: You are using Website Payments Standard (WPS) not Express Checkout (EC).
With WPS, you can create a subscription modify button but this is super inflexible and I would not recommend it.
With EC, you can modify subscriptions as well (page 99):
Use the UpdateRecurringPaymentsProfile API to modify a recurring payments profile.
NOTE: You can also modify recurring payments profiles from the PayPal website.
You can only modify the following specific information about an active or suspended profile:
Subscriber name or address
Past due or outstanding amount
Whether to bill the outstanding amount with the next billing cycle
Maximum number of failed payments allowed
Profile description and reference
Number of additional billing cycles
Billing amount, tax amount, or shipping amount
NOTE: You cannot modify the billing frequency or billing period of a profile. You can
modify the number of billing cycles in the profile.
NOTE: For recurring payments with Express Checkout, certain updates, such as billing
amount, are not allowed within 3 days of the scheduled billing date, and an error is
returned.
You can modify the following profile information during the trial period or regular payment
period:
Billing amount (excluding tax and shipping)
Number of billing cycles
With that information out of the way... For the most flexibility:
Look at creating Billing Agreement IDs through Express Checkout. You will need to get Reference Transactions enabled on your PayPal account (talk to merchant support to get this done).
With a BAID, you control when your customers are charged, how much they are charged, and pretty much anything else having to do with the transaction. The drawback is the same as the benefit.. you (see 'have to') control it all.