# Currently\_entitled\_amount\_cents field is zero when a pledge is gifted

**URL:** <https://www.patreondevelopers.com/t/currently-entitled-amount-cents-field-is-zero-when-a-pledge-is-gifted/9532>\
**Category:** API Feedback\
**Created:** [November 13, 2024, 3:43am UTC](https://www.patreondevelopers.com/t/currently-entitled-amount-cents-field-is-zero-when-a-pledge-is-gifted/9532 "2024-11-13T03:43:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZakFahey](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/zakfahey/32/2780_2.png) [@ZakFahey](https://www.patreondevelopers.com/u/ZakFahey)\
**Post date:** [November 13, 2024, 3:43am UTC](https://www.patreondevelopers.com/t/currently-entitled-amount-cents-field-is-zero-when-a-pledge-is-gifted/9532/1 "2024-11-13T03:43:05Z")

</div>

It seems that gifting is a new feature? Anyway, I have an API integration that relies on currently\_entitled\_amount\_cents to distribute perks. For normal pledges this works fine, but I recently got a gifted pledge and the value is zero. Is this intended? Is there another field like currently\_entitled\_tiers that I’d have to use instead?

This is for the [https://www.patreon.com/api/oauth2/v2/campaigns/.../members](https://www.patreon.com/api/oauth2/v2/campaigns/.../members) endpoint

---

<div class="post-metadata">

**Author:** ![ZakFahey](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/zakfahey/32/2780_2.png) [@ZakFahey](https://www.patreondevelopers.com/u/ZakFahey)\
**Post date:** [November 17, 2024, 5:41pm UTC](https://www.patreondevelopers.com/t/currently-entitled-amount-cents-field-is-zero-when-a-pledge-is-gifted/9532/2 "2024-11-17T17:41:23Z")

</div>

After experimenting with this further I can confirm that using the maximum value of `currently_entitled_tiers.amount_cents` is a functional workaround.

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [November 22, 2024, 4:25pm UTC](https://www.patreondevelopers.com/t/currently-entitled-amount-cents-field-is-zero-when-a-pledge-is-gifted/9532/3 "2024-11-22T16:25:58Z")

</div>

Yes, gifting is not supported in the api at the moment but some work is underway. For now try using workarounds.

---

<div class="post-metadata">

**Author:** ![katiedev](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/katiedev/32/1666_2.png) [@katiedev](https://www.patreondevelopers.com/u/katiedev)\
**Post date:** [December 9, 2024, 2:11pm UTC](https://www.patreondevelopers.com/t/currently-entitled-amount-cents-field-is-zero-when-a-pledge-is-gifted/9532/4 "2024-12-09T14:11:18Z")

</div>

Is there any progress on this?

I have the WordPress plugin running and am testing out gift memberships. It is showing a zero pledge.

I currently use `Patreon_Wordpress::getUserPatronage();` to determine the user’s pledge.

```auto
  // determine user's current pledge
  $user_patronage = Patreon_Wordpress::getUserPatronage();

```

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [January 7, 2025, 3:55pm UTC](https://www.patreondevelopers.com/t/currently-entitled-amount-cents-field-is-zero-when-a-pledge-is-gifted/9532/5 "2025-01-07T15:55:52Z")

</div>

Gifted membership support is still not implemented. If you are using the WP plugin, you could check for user’s tier from the user’s return response.

---

<div class="post-metadata">

**Author:** ![katiedev](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/katiedev/32/1666_2.png) [@katiedev](https://www.patreondevelopers.com/u/katiedev)\
**Post date:** [January 9, 2025, 6:20am UTC](https://www.patreondevelopers.com/t/currently-entitled-amount-cents-field-is-zero-when-a-pledge-is-gifted/9532/6 "2025-01-09T06:20:14Z")

</div>

@codebard can you please supply the PHP code to do this.

I used `print_r` to output the json data.

```auto
print_r(json_encode(['user_patronage' => $user_patronage, 'pledge' => $pledge, 'user_response' => $user_response], JSON_PRETTY_PRINT));

```

This showed my Patreon account was not connected properly to Patreon.

After much testing I realised my issues were caused by an API error. I disconnected and reconnected my Patreon account. All is working now.

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [January 16, 2025, 7:31pm UTC](https://www.patreondevelopers.com/t/currently-entitled-amount-cents-field-is-zero-when-a-pledge-is-gifted/9532/7 "2025-01-16T19:31:28Z")

</div>

This function should give you the max entitled tier $ value of the patron:

> <https://github.com/Patreon/patreon-wordpress/blob/1a2657091741136d7b4e407ad71064fec701a7a9/classes/patreon_wordpress.php#L750>

In the same function, you can also see how you can get the exact tier.

---

<div class="post-metadata">

**Author:** ![noertap](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/noertap/32/2868_2.png) [@noertap](https://www.patreondevelopers.com/u/noertap)\
**Post date:** [February 27, 2025, 4:10am UTC](https://www.patreondevelopers.com/t/currently-entitled-amount-cents-field-is-zero-when-a-pledge-is-gifted/9532/8 "2025-02-27T04:10:18Z")

</div>


