- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all.
I'm creating subscriptions for membership customers using the REST API.
I'm also keeping track of all payments transactions on my app's DB.
I'm listening to the PAYMENT.SALE.COMPLETED webhook notification to capture payments made.
However, I cannot identify any data in this event's payload that will help me trace its parent Subscription ID (typically looks like this: I-BW452GLLEP1G).
The only ID keys I see are:
"id": "WH-2WR32451HC0233532-67976317FL4543714",
"resource": {
"parent_payment": "PAY-1PA12106FU478450MKRETS4A",
"id": "80021663DE681814L",
None of which can lead me to the parent subscription, as far as I could find.
I did include a custom_id value in the Create Subscription call that would point me to the Subscription record in my DB, but I don't see this custom_id as part of the PAYMENT.SALE.COMPLETED payload (at least not as the webhooks mockup simulator generated).
Or maybe my process is not the best practice to track payments on subscriptions for customers?
Thanks!
Mor
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, inspecting a real payload coming back for this event from Paypal, I can see my custom attribute I added when creating the subscription is indeed part of the payload and can be accessed with:
event.resource.custom
Also, it looks like the subscription_id is also part of this payload:
event.resource.billing_agreement_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am about to start a project where I will need to do the same as you're doing. That obviously would include being informed when payment are made.
Did you solve the issue ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Corobori.
Haven't received any replies yet. I've only posted here, so we should both know when that happens...
Good luck with your project!
Mor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, inspecting a real payload coming back for this event from Paypal, I can see my custom attribute I added when creating the subscription is indeed part of the payload and can be accessed with:
event.resource.custom
Also, it looks like the subscription_id is also part of this payload:
event.resource.billing_agreement_id
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- can we assign a unique detail to every subscription creation? in NVP/SOAP APIs
- I want to implement subscription functionality. in REST APIs
- I need to integrate a recurring payment with a variable for a pay-as-you-go product in REST APIs
- Subscription notifications in PayPal Reporting
- Buy Now button in the sandbox - no customer confirmation email in Sandbox Environment