How to know MaxFailedPayments has reahced from IPN message? - paypal

I am working on the paypal recurring payment and I have set the MaxFailedPayments as 3. I want to send email to user when the this maximum failed payment has reahced 3. So from which status field in the IPN message ,we can understand MaxFailedPayments has reached ?
Thanks in advance
Boney

There is a "txn_type" value that tells you when a Recurring Profile reaches it maximum failed payment attempt limit - txn_type=recurring_payment_suspended_due_to_max_failed_payment
You can use that to trigger your notice to buyers.
You should receive an IPN post when the payment fails - txn_type=recurring_payment_failed
Trigger a notice to send out after two failed payment IPN posts arrive instead of waiting for the third failure and the Profile going into a suspended status.

Related

PayPal recurring payment verification

After one has created a monthly billing agreement with a customer; how do I verify that the customer has paid (and not cancelled the agreement) at the next bill statement?
Would I use GetRecurringPaymentsProfileDetails for this information? Basically, I want to automate cancellations/etc.
In your ipn end point a subscr_cancel txn_type is sent when this happens. Then you can update a record in your database to account for this.
Ipn messages when enabled send post requests for all kinds of actions such when a Payment is made or a subscription is cancelled. When you receive a message you need to validate the message, determine what message it is, and then perform an action in your application
Ipn info
https://developer.paypal.com/docs/classic/products/instant-payment-notification/

Reject transaction after receiving IPN

Is it possible to reject / auto refund after receiving IPN message with COMPLETED status but the txn_id is duplicated or the price value is incorrect?
Or manual investigation need to be done to refund
If you are verifying your IPN calls with PayPal, this should (in theory) be impossible. PayPal never duplicates transaction IDs.
Is it possible to reject / auto refund after receiving IPN message with COMPLETED status but the txn_id is duplicated or the price value is incorrect?
You can't reject the transaction with IPN. You aren't in a transaction. You're getting notification that a transaction has already occurred.
You may be able to use another API to reverse the transaction, as suggested by #geewhiz.

Will i get an IPN on completion of payment review in Paypal?

I am currently working on a project using PayPal. When I made a transaction, the payment status in the IPN received was 'Pending' and reason was Payment review. I found out that it will take 24 hours for the review process. So I want know if I will get an IPN when the review process is over?
You should get an IPN notification when the transaction changes status. For example, PayPal sends you an IPN notifying you of a pending payment. PayPal later sends you a second IPN telling you that the payment has completed.
Because of security reasons you may get the first IPN with payment status pending But when the payment review is over You will get another IPN with payment status as completed.You can can transfer your stuffs then.The payment review will take maximum 24 hours.

Does PayPal use the same Transaction ID when Retrying failed payments?

I'm building a recurring/subscription payment system with PayPal and all is going well.
Can anyone share the IPN data for when PayPal sends a retry payment? Specifically I need to know if paypal is going to use the same txn_id, or generate a new one every time it retries?
Appreciate the help!
You should receive a new transaction id everytime a payment is processed. You can test this by setting up a recurring payment in the sandbox, and setting it to bill daily.

Does paypal resend IPN once a payment status has been changed from pending to complete/failed?

I have done some scouring but cannot find a definitive answer for this!
I get "VERIFIED" and "Pending" so i can put my orders from "placed" to "in-progress" but need the complete / failed so i can then transfer to "paid" and "cancelled".
Anyone have anything definitive on this, or is it a waiting game until test payments are complete (not using sandbox).
If the payment has a “Pending” status, you receive another IPN when the payment clears, fails, or is denied.
Also, here are some good things to check once you receive Payment_staus=completed
Check that the "txn_id" is not a duplicate to prevent a fraudster
from using reusing an old, completed transaction
Validate that the "receiver_email" is an email address registered in
your PayPal account, to prevent the payment from being sent to a
fraudster's account
Check other transaction details such as the item number and price to
confirm that the price has not been changed
You get another IPN (not a 'resend'), same txn_id, with payment_status='Completed'.