How to determine the subscription_id from the PAYMENT.SALE.COMPLETED webhook?

kenansd
Contributor
Contributor
We are using the BILLING.SUBSCRIPTION.PAYMENT.FAILED webhook and this provides the subscription id which we can use to associate it to a user in our system. However the PAYMENT.SALE.COMPLETED webhook fires on payment success and does not provide the subscription id and instead provides a billing_agreement_id. Is there an API to link a billing_agreement_id to a subscription_id or a customer_id? The https://developer.paypal.com/docs/api/payments.billing-agreements/v1/ note that they are deprecated and it is unclear that it links to a subscription id from that API. How can we link a PAYMENT.SALE.COMPLETED webhook to a user in our system?
Login to Me Too
1 REPLY 1

kenansd
Contributor
Contributor

I looks like billing_agreement_id is the subscription_id.

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.