I've created a recurring payments profile on Paypal setting an initial payment.
When I receive the IPN, the txn_id is the same for both the initial payment and the recurring payment. I would like to know if there's a way of differentiating between them.
I've noticed that when I receive the recurring payment, there's this variable "period_type= Regular". This doesn't appear in the initial payment IPN. Is this a good way to make the distinction?
Thanks
I think you might be getting confused with what you're getting in the IPN's.
When the profile is first created, you'll get an IPN with the profile ID of the profile that was just created, and you would only get a transaction ID if you included the original amount to be charged. The transaction ID here is only for that original amount. If you didn't have that all you would get is the profile ID.
If your recurring payments are scheduled to start on the same day as well you will get an additional IPN for the recurring payment and that will have its own transaction ID.
Related
I'm creating a website using paypal recurring payments. Each month the payment happens automatically, but I need to know when this happens in order to update the user profile in my application, so I know until when the subscription is valid.
Using paypal webhooks, which events do I need to subscribe to in order to know when the payment actually happens (or fails) each month?
I'm testing recurring payment on Sandbox of Paypal.
But I find out client's account is not enough money, but their own account is still recieved money.
If client 's account is not enough money, how does the paypal process?
This transaction will be suspend or cancel...
If client'account have enough money then the transaction become activate.
For initial payment, use FAILEDINITAMTACTION, Action you can specify when a payment fails. It is one of the following values:
ContinueOnFailure – By default, PayPal suspends the pending profile in the event that the initial payment amount fails. You can override this default behavior by setting this field to ContinueOnFailure. Then, if the initial payment amount fails, PayPal adds the failed payment amount to the outstanding balance for this recurring payment profile.
When you specify ContinueOnFailure, a success code is returned to you in the CreateRecurringPaymentsProfile response and the recurring payments profile is activated for scheduled billing immediately. You should check your IPN messages or PayPal account for updates of the payment status.
CancelOnFailure – If this field is not set or you set it to CancelOnFailure, PayPal creates the recurring payment profile, but places it into a pending status until the initial payment completes. If the initial payment clears, PayPal notifies you by IPN that the pending profile has been activated. If the payment fails, PayPal notifies you by IPN that the pending profile has been canceled.
Once you are into the regular billing cycle, Be sure to assign a value to MAXFAILEDPAYMENTS, which is the number of scheduled payments that can fail before the profile is automatically suspended. An IPN message is sent to the merchant when the specified number of failed payments is reached.
Then, AUTOBILLOUTAMT Indicates whether you would like PayPal to automatically bill the outstanding balance amount in the next billing cycle. The outstanding balance is the total amount of any previously failed scheduled payments that have yet to be successfully paid. It is one of the following values:
NoAutoBill – PayPal does not automatically bill the outstanding balance.
AddToNextBilling – PayPal automatically bills the outstanding balance.
it is up to you how to handle profiles that suspend.
On recurring paypal payment, what happens when CC expires?
Will it send IPN notification?
Will it send email to seller and buyer?
Will it be stopped till CC is not updated and continues when it get updated?
what exactly will happen, many thing is dependent on payment on sites.
When a credit card is going to expire the buyer needs to update their billing information. They buyer will get an e-mail from PayPal saying it is going to expire and asks the user to update their billing information.
If the buyer does not update their billing details the payment will probably fail. The reason it may not fail is because they may have money in their PayPal account or another funding source. And IPN post would be sent for the failed payment.
If the buyer does update their credit or debit card information before the Recurring Profile bills you should receive the payment successfully.
I'm using the Paypal "Subscription" button. I have an IPN handler and overall I think I've got it all figured out. My last problem is that apparently there's no good way to test a recurring payment (except to wait for the cycle to occur). This issue is discussed here: [question]: Testing Paypal subscription IPN
I don't really need to test this recurring payment but I do need to know if every recurring payment will have it's own txn_id or if every payment in a subscription shares the same ID.
Thanks!
Yes, each recurring payment cycle will create a new transaction with its own transaction ID.
You'd link these transactions together via their recurring payments profile ID.
I've got a question on Paypal's IPN.
After creating subscription profile (recurring payment profile), the confirmation of type 'recurring_payment_profile_created' is received on IPN.
After proceeding payment, the confirmation of type 'recurring_payment' is received on IPN.
The question is how should I identify that the payment (recurring_payment) belongs to the unique(specific) profile.
Thanks.
recurring_payment_id. This will be a recurring payment profile ID in the form of I-xxxxxxxx.
This should be included in all recurring payment IPN posts.