API suggestions for Pledge and Benefit tracking


I’d like to state some of my findings with the API.

  1. There are TIERS and GOALS and BENEFITS in the page creator. However, TIER is named as REWARD and BENEFITS are nowhere to be found in the API. Also, there’s no notion of continuous vs once-a-month (rewarded after processing the pledge every month) benefit. There’s just one-time vs monthly. It doesn’t help a bit. New endpoints like this would help:

GET /benefit/current_user Return all benefits to be applied to current user
POST /benefit/current_user/apply/1 Mark benefit=1 as applied
DELETE /benefit/current_user/apply/1 Mark as not-applied

  1. By looking at the returned PLEDGE object, it is not possible to understand whether the patron has made any payments or not. To actually understand a patron paid for the last month, I have to first check month(pledge.created_at) < month(now) and day_of_month(now) >= 2 and I don’t know how to process declined_since: Since you process at a random time on 1st of each month, if the patron declines today, and today is the first day of the month, how do I know whether this decline was not for the next month or last month? To solve this issue, you must return pledges for each month individually like:
Example 1:
  { amount: 1.00, status: 'processed', month: '2018-04' }, // pledge successful on April
  { amount: 0.00, status: 'deleted', month: '2018-05' }, // deleted on May
  { amount: 3.00, status: 'declined', month: '2018-07' }, // re-pledged on July with 3$ but declined
  { amount: 3.00, status: 'pending', month: '2018-08' } // waiting for the end of month
Example 2:
  { amount: 1.00, status: 'processed', month: '2018-06' }, // June is OK
  { amount: 2.00, status: 'pending', month: '2018-07' }, // increased pledge to 2$ last month, but still processing due to delays
  { amount: 2.00, status: 'paused', month: '2018-08' } // this month will be paused
  1. It is not possible to get optional parameters (like is_paused) on pledge objects while getting current user’s pledges with Java client.


There has been previous discussion by the Patreon development team on this forum about expanding the payment data available through the API. You can read How to determine if a patron has been successfully charged? to learn more about how to determine if a payment has been received, and mention of their future plans. There’s also How does the Patreon system work? Decline payments, outstanding amounts etc which covers more information about how the Patreon system works that you may find helpful.

Regarding is_paused in the Java library: the Patreon API requires that if you specify an optional property to be returned (e.g: is_paused) then you must specify all properties that you’d like to be returned (more info in this post) however as far as I can tell, the Java library does this as of version 0.4.0 (which is mentioned in this issue) – are you using 0.4.0 of the Patreon Java library? You can see in the PatreonAPI test that optional fields are included along side default fields as of 0.4.0. Although, I am not a java dev, so maybe I’m missing something there.

Based on the linked posts and the timelines provided, I’m guessing that the Patreon platform team have been delayed in introducing payment data to the API but maybe they’ll be able to provide an updated timeline in this thread.