How to test Subscription payments
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a MERN stack application which provides subscriptions for pro versions.
A user can click a paypal button and approve a subscription. This subscription is stored in my database by calling my backend with the subscriptionId. My backend calls paypal to get the subscriptions's data and stores the subscription in my database with the start_date, status and next_billing_date.
So now to my Problem.
How can I simulate, when an automatically payment for a subscription was made?
I implemented webhooks, reacting on following events:
- BILLING.SUBSCRIPTION.ACTIVATED - store subscription in our database if not existing (should already exist with status=ACTIVE by onApprove function of paypal button)
- PAYMENT.SALE.COMPLETED - how can I simulate this? I guess I receive a payment with date, amount and currency and have to get subscription again to find out my new next_billing_date
- PAYMENT.SALE.REVERSED - I manually cancel the subscription in paypal and my database
- BILLING.SUBSCRIPTION.PAYMENT.SUSPEND: I manually cancel the subscription in paypal and my database
- BILLING.SUBSCRIPTION.CANCELLED - I manually cancel the subscription in my database

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good day @heiwil,
Thank you for posting to the PayPal community.
I would like to inform you that by utilizing webhooks, you will receive notifications when a user subscribes. These notifications will enable you to make the necessary changes in your database. To gain a better understanding of webhooks and how they work, I kindly suggest referring to the following link: https://developer.paypal.com/api/rest/webhooks/event-names/.
However, I regret to inform you that at this time, we do not have a PayPal code available that allows for the direct updating of subscription statuses in the database. To make the required changes, I recommend reaching out to your website developer who can assist you further with this matter.
If you still facing the issue, please create a MTS ticket via - https://www.paypal-support.com/s/?language=en_US with detailed error information.
Sincerely,
Vaishnavi
PayPal MTS
If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- How to enable on-demand / recurring payments to existing PayPal checkout? in SDKs
- Recurring Payment issue in Braintree Client-side Integration (JS, iOS, Android SDKs)
- Paypal via Adyen Permission Denied in REST APIs
- Unable to test successful payments using sandbox personal accounts in NVP/SOAP APIs
- customer paying after failed subscription payment. in PayPal Payments Standard