I’m trying to calculate the revenue of a ‘per creation’ patreon for the current month.
I can achieve this by iterating the members of the user’s campaigns and sum their pledges.
The thing is I can’t find how to access monthly caps for those pledges.
Is it possible to access this info?
Thanks in advance.
All the currently supported resources, you would find in the documentation:
If the value you seek is not available there, you may need to infer it via calculations like you proposed.
Ok, but how can I know if a patron hit the monthly limit?
If the api does not return that info, im afraid you wont be able to do that at this moment.
Ok, what I’m thinking of is retrieving the pledge_history of all members and then sum up the “amount_cents” of all the pledges of type “subscription”. Is this flow correct in order to get the complete revenue of a given campaign? Or am I missing something?
currently_entitled_amount_cents or currently_entitled_tiers may be a more accurate way. But best way would be to create a few $1 - $2 subscriptions using patron accounts to pledge to a creator account you own, and then see which way of calculating it would be the most accurate.