1
votes

My PayPal recurring payment profiles have an initial payment.

My backend checks for canceled payment profiles. If the profile is canceled the subscription on my website ends at the canceled profile's expiration date (this is so people who pay for a subscription and cancel afterwards keep their website subscription until the subscription end date).

When the user doesn't have any balance or payment method bound to their PayPal, they can still create the payment profile. PayPal allows users to click 'Agree & Pay Now' and notifies my backend even though the initial payment isn't made (because the user has no paypal balance or valid payment method).

In my payment history I can see the profile has been created and canceled instantly without a payment made.

Is there a way to simply not accept payments if the initial payment hasn't gone through?

1
I think by default, if the initial payment failed, PayPal places the profile into a pending status until the initial payment is completed.ivan.sim
All profiles that fail to make the initial payment show up as 'Canceled' for meDean

1 Answers

2
votes

To capture the initial payment the best way is to call the doexpresscheckout API for the initial amount and then create recurring profile using the same token . In this way , if the doexpress checkout call is successful this means you receive your initial payment and their funding source also is good . Once this step is successful you can procees to create recurring profile .