# API suggestions for Pledge and Benefit tracking

**URL:** <https://www.patreondevelopers.com/t/api-suggestions-for-pledge-and-benefit-tracking/993>\
**Category:** API Feedback\
**Created:** [August 1, 2018, 3:28pm UTC](https://www.patreondevelopers.com/t/api-suggestions-for-pledge-and-benefit-tracking/993 "2018-08-01T15:28:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![axpendix](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/axpendix/32/634_2.png) [@axpendix](https://www.patreondevelopers.com/u/axpendix)\
**Post date:** [August 1, 2018, 3:28pm UTC](https://www.patreondevelopers.com/t/api-suggestions-for-pledge-and-benefit-tracking/993/1 "2018-08-01T15:28:25Z")

</div>

Hello,

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:

```auto
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.

Thanks

---

<div class="post-metadata">

**Author:** ![sam](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/sam/32/492_2.png) [@sam](https://www.patreondevelopers.com/u/sam)\
**Post date:** [August 1, 2018, 4:12pm UTC](https://www.patreondevelopers.com/t/api-suggestions-for-pledge-and-benefit-tracking/993/2 "2018-08-01T16:12:28Z")

</div>

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?](https://www.patreondevelopers.com/t/how-to-determine-if-a-patron-has-been-successfully-charged/125) 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](https://www.patreondevelopers.com/t/how-does-the-patreon-system-work-decline-payments-outstanding-amounts-etc/131) 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](https://www.patreondevelopers.com/t/json-data-to-determine-if-patron-member-is-a-creators-patreon-or-not/760/4)) however as far as I can tell, the Java library does this as of version 0.4.0 (which is mentioned in [this issue](https://github.com/Patreon/patreon-java/issues/9)) – are you using 0.4.0 of the Patreon Java library? You can see in the [PatreonAPI test](https://github.com/Patreon/patreon-java/blob/master/src/test/java/com/patreon/PatreonAPITest.java#L100) 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.
