Do Paypal recurring payments have unique txn_ids? - paypal

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.

Related

Is the INVOICING.INVOICE.SCHEDULED automatically created?

I've implemented PayPal gateway in my application, and I'm looking for a way to send a notification to my customer when an upcoming renewal is coming.
Unfortunately in the documentation I didn't find a depth explaination about INVOICING.INVOICE.SCHEDULED but I'm guessing should be the same as invoice.upcoming of Stripe which is triggered when a recurring payment is going to be renewed.
My question is: INVOICING.INVOICE.SCHEDULED is sended by PayPal automatically when a recurring payment is going to be renewed?
Invoicing and Subscriptions are two separate PayPal products. I would not expect an Invoicing webhook in relation to a Subscription recurring payment.
The subscription webhooks are listed here: https://developer.paypal.com/docs/integration/direct/webhooks/event-names/#subscriptions
If you are looking for one that happens "in advance" of a scheduled payment, I am not aware of one.

Which webhooks to subscribe for payments on paypal recurring payments?

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?

Recurring Payment IPN

Quick question about the notify_url HTML variable (from PayPal Payments Standard). I am specifying the URL as a variable that is sent to PayPal via a redirect URL for a recurring payment setup (all is working as expected when setting up the recurring payment).
But I am wondering, when PayPal goes to actually process a payment in the future (actual recurring payment), will it use the same URL for the IPN notification that was used during the recurring payment setup?
I have multiple IPN scripts, one for regular payments and one for recurring payments - I want to be sure that each future recurring payment uses a specific IPN script.
Cheers!
First, for the sake of terminology, if you're using HTML buttons then you're using Standard Subscriptions, not Recurring Payments. Technically, they're the same thing, but Recurring Payments is API based and IPN data is different for Standard Subscriptions vs. Recurring Payments. Just keep that in mind when searching for information about the two.
As for the IPN's, unfortunately, it will not continue to use that same URL. You'll need to make sure that IPN is configured in the PayPal account profile in order for future transactions related to the profile to trigger IPN's.
This goes for both Standard Subscriptions and Recurring Payments API transactions.

Paypal IPN - Differentiating between Recurring Payment and Initial Payment

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.

Detecting cancellation of a paypal billing agreement setup with reference transactions

I am using the 'reference transactions' of the Paypal express checkout api to set up a recurring billing scenario for our customers. I have chosen this method since the amount billed per month will vary and there is no initial payment when entering into the billing agreement.
My question is, can I use the paypal IPN to detect when the user cancels this? I know that if the customer enters into this agreement they have the power to log into their own Paypal account and cancel the agreement. What variables should I be listening for through the IPN?
Whilst I see mention of recurring payments and recurring payment profiles in the IPN documentation these are not actually the same as setting up a recurring billing scenario via reference transactions (recurring payments and reference transactions are in two different parts of the general paypal api documentation).
Enable IPN in your PayPal account , then PayPal will notify you via IPN about the Billing agreement cancel from the customer.
If you include IPN with SetExpressCheckout, it will not work with Reference Transaction. You need to Enable IPN on PayPal site.