Webhooks for subscription are fireing in a random order?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
i am very confused by all the webhooks for recuring payment.
My scenario:
I have a paypal button for subscription with a hidden field (e-mail of the buyer, plan-id), which i need to identify the plan that was bought and the user who has bought it. This works. Now i need the webhook job, which gives me the possibility to create a bill.
What i need for this bill:
- Name
- Address
- Plan
- Costs
- E-Mail of PayPal
- My custom field
I am currently lost in the webhook API. I think i need the very first successfull payment notification (Create first bill) and then i need a notification for each recuring payment (e.g. every month) and create the follow up bills.
There is a "event_type":"BILLING.SUBSCRIPTION.ACTIVATED" and "event_type":"PAYMENT.SALE.REFUNDED" and "event_type":"PAYMENT.SALE.COMPLETED".
The data that comes with it is extremly hard to identify. I did not found a Java DTO for these types, so i builded my own POJO for it.
There is so much confusing me.
For example i have a friend that made a payment for test in the live environment. There was an error in my code, so i reverted the payment.
If i resend the webhook, sometimes there is a sale id , sometimes there is refund reason, sometimes there is the payment sale completed event.
It is so confusing.
I just want to create my bills and mark the subscription time, so that the user can use the service for the paid period.
Does anybody have a good example for doing such thing?
I am using Java.
- Labels:
-
Webhooks REST APIs
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Receiving a PAYMENT.SALE.COMPLETED webhook notification - how can I trace the parent Subscription in REST APIs
- Webhook notifications are not being sent to my server in REST APIs
- webhook not send update notification in REST APIs
- Subscriptions API is highly inconsistent in REST APIs
- WebHook Events delayed/not received in SandBox mode in Sandbox Environment