How to simulate a subscription payment failure ?

EvelynSung
Contributor
Contributor

Hi, we are implementing our IPN listener .  

Since we need do something in response to the failure subscription payment in sandbox environment ,

we want to know how to make a subscription payment fail then we can get the ipn content for  testing .

I have check the developer page (https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/),

but it seems there are two txn_types , recurring_payment_failed and subscr_failed.

I am not sure which one is for my situation. 

for example,

JULY 3,  create a monthly subscription profile, and payment for first month is successful.(got 2 ipn, txn_type=subscr_signup and subscr_payment)

Augest 3 , the payment failed(assume setting  no re-attemp) .  what is the txn_type value and other fields of this ipn? we want to simulate this .

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

MTS_Justin
Moderator
Moderator

Hi @EvelynSung

If the impacted payment is for a subscription, the "txn_type" will be "subscr_failed".  Subscriptions are non-API based, normally initiated via a button.

 

If it's for a recurring payment which has had a failed payment, it will be "recurring_payment_failed".  Recurring payments are API-based, initiated via an API call.


Was my post helpful? If so, please give me a kudos!

View solution in original post

Login to Me Too
1 REPLY 1
Solved

MTS_Justin
Moderator
Moderator

Hi @EvelynSung

If the impacted payment is for a subscription, the "txn_type" will be "subscr_failed".  Subscriptions are non-API based, normally initiated via a button.

 

If it's for a recurring payment which has had a failed payment, it will be "recurring_payment_failed".  Recurring payments are API-based, initiated via an API call.


Was my post helpful? If so, please give me a kudos!
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.