'paypal transaction api does give invoice data?
I am using this API to get all transactions of user subscription
https://developer.paypal.com/api/subscriptions/v1/#subscriptions_transactions
and I have an option to get an invoice for each recurring payment. But I can't find any subscription API that gives data of invoice(invoice id) of transaction.
how to get invoice data of each transaction? Anyone can tell me, The id field in response from the above API belongs to which entity? I try to find transaction details from this id then payment details from this id but no resource found?
Solution 1:[1]
What invoice data are you looking for, specifically? The Subscriptions API does not have an invoice ID or field.
At subscription creation time you can supply your own ID in the custom_id field, which will be stored as part of the subscription profile itself and each transaction. Such an ID is useful for reconciliation with your own records later, e.g. when receiving event notifications.
In general rather than using an API to query past transactions, it's best to subscribe to webhooks for the event PAYMENT_SALE_COMPLETED so you can receive a notification every time a new payment takes place, and simply update your own database record of the subscription/profile's last paid date.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Preston PHX |
