IPN - Testing failed subscription transactions (subscr_failed)

JayUk77
Contributor
Contributor

Hi all,

I'm slowly working my way through integrating the PayPal IPN on my site and I currently have the following transaction types simulated and tested:

 

subscr_signup

subscr_payment

subscr_cancel

subscr_eot


This leaves me with the following to simulate:

 

subscr_failed

subscr_modify

 

Can someone please advise on the scenarios when these two transaction types occur and also how I can simulate them in the sandbox? I don't want to create false posts from my own site, I need to actually have the sandbox create them and retrieve all the variables.

Many thanks

Login to Me Too
8 REPLIES 8

MTS_Justin
Moderator
Moderator
Hello,

subscr_failed -- Subscription payment failed
subscr_modify -- Subscription modified

https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/

Simulating a subscription modification is self explanatory, a subscription failure would have to be setup between two accounts correct so the buyer account has an active subscription but no funds in their balance and no funding source available to cover the next subscription amount when the billing period arrives.


Was my post helpful? If so, please give me a kudos!
Login to Me Too

JayUk77
Contributor
Contributor

 Thanks for the reply MTS_Justin,

 

Although the link provided is useful as an overview, I'm trying to get the exact list of variables that are sent for the remaining two transactions.

Regarding the "subscr_failed" transaction type, I have tried setting this up as described however I can't get this to work. If my product is £100 and I create a sandbox account with £50 in the bank, it asks for card details. If I don't add a card, I have to add a card when testing. Am I missing something?

I think I had the "subscr_modify" type the wrong way. Is this event raised when I (the store keeper) modify the subscription? For example, I change the cost from £100 to £105?


Many thanks

Login to Me Too

MTS_Justin
Moderator
Moderator
Hello,

For the "subscr_failed" IPN, you create the buyer account and add £100 to balance (to cover first sub) and also add a card to the account (it's required for backup funding). Create the subscription using the merchant / buyer accounts and set the subscription to start the next day, with a billing period of daily. All the first billing cycle to complete, which should remove the £100 for the balance - Good, now we know the profile is billing correctly.

Now go into the profile > my money section and remove the card you added when creating the account. If you can't remove it, let me know. Upon the next billing cycle of the subscription, there should be no balance and no backup funding source and the subscription should fail billing and sent the "subscr_failed" IPN.

For the "subscr_modify" IPN, you receive those when you are the profile owner modify some of the profile details, such as changing the cost.

Was my post helpful? If so, please give me a kudos!
Login to Me Too

JayUk77
Contributor
Contributor

Thanks again.

I've set-up the failure scenario and will update here tomorrow (I've removed both the card and bank details).

Regarding the 'subscr_modify', could you please provide some more information on creating this scenario? I've logged in as the store owner but couldn't see how to edit the subscription details so I can only assume I'm meant to edit the button? I've increased the price (via edit button) but nothing has come through via IPN so I'm probably not looking in the right place.

Login to Me Too

MTS_Justin
Moderator
Moderator
Hello,

An example of button code for modifying a subscription can be found here : https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/html_example_su...

The second table shown on the following page illustrates when you should expect to receive an IPN for a subscription modification -- https://www.paypal.com/cgi-bin/webscr?cmd=p/acc/ipn-subscriptions-outside

Was my post helpful? If so, please give me a kudos!
Login to Me Too

JayUk77
Contributor
Contributor

For some reason, using the fail scenario described in my last post - I've received a "recurring_payment_suspended_due_to_max_failed_payment" rather than a "subscr_failed".

Login to Me Too

JayUk77
Contributor
Contributor

Still unable to create a 'subscr_failed' notification.

 

I'll continue to leave my progress here as I'm sure it'll help someone in the future.

I've figured out how to receive a 'subscr_modify' notification. My test button is set to daily subscription payment, so once the purchaser has purchased the initial subscription (day 1), you need to log in to the purchaser's account and modify the subscription (activity > *select initial subscription* > manage >  payment method) then change the payment method from the default (card) to the bank account.

Login to Me Too

fabiolnm
Contributor
Contributor

Any luck to reproduce subscr_failed IPN?

 

I'm trying to remove test card from Sandbox account <removed>, but the modal is clearly broken and is not letting me remove the card:

 

Screen Shot 2018-11-05 at 12.28.59.png

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.