"Will pay amount cents" inconsistent with new currency options

I just started getting some pledges with the new currency exchange system. I think this is great, but it’s now causing some problems with my API hooks. Up until now, I used the value in the “Will pay amount cents” to determine what benefits patrons have access to in my game. This works great because it can accommodate patrons who might pledge an amount in between tiers. They will essentially receive the benefits for the greatest tier they have reached. I have also read about people having problems with patrons changing tiers and the entitled tier not reflecting properly, so using “Will pay amount cents” is another way to avoid this problem.

With that said, the problem I’m not having is that the value “Will pay amount cents” is not in US dollars, which is my currency, but the value of the patron’s currency. For example, a $10 tier will give the “cents” value as 1000 but if the patron is using Euros the “cents” value in the API comes up as 950.

Is there a way around this, or could someone who controls the API create another option to use the cents value of the Patreon page’s currency rather than the patron’s individual currency?

This is an issue we are aware about and looking into a solution. Currently you can use currently_entitled_tiers to get the tier which user is entitled to, and then match this to a monetary value over your tiers. But this does not cover custom pledge patrons, of course.

1 Like

@CodeBard Thank you for the suggestion. I’ll give that a try but right now I can’t test it because the Pateon API isn’t sending the information to Integromat.

API started working again. I gave your suggestion a try but it didn’t pull over a level number, just “NaN”

1 Like

When you say api started working again, are you talking about currently_entitled_amount_cents?

Correct, when I say it’s working I mean Patreon is sending the API alert to Integromat that a pledge was made or changed. This is what will cut out randomly for a few days at a time with no warning or indication of what’s happening.

I tried currently_entitled_tiers instead of currently_entitled_amount_cents and it produces NaN instead of an actual value.

To pull currently entitled tiers, you must request it as a relationship. An example call is below in fetch_user call of the WordPress plugin:

The call there is an efficient call which gets you user details, membership info, pledge/tier level in just one call. You can use it in your app to check for an individual user who has logged in.

It looks like this has been changed so the cents value is in USD even if the patron is paying with another currency, so it’s working just as requested now. Thank you for your help.

1 Like

I’m having a similar issue, but mine is for total_historical_amount_cents isn’t in USD when fetching member data - it’s in whatever the person is paying in. The way I do things are similar to how @SkyCorp seemed to explained things back in 2020 - the most hacky way ever (as the webhooks wouldn’t work for me as I require Discord social connections linked to it, and most patrons don’t link Discord until after pledging, which means when webhooks are fired, the field is almost never there.) where periodically, I fetch through all the wonky pagination and compared amounts in increments of 5. This means if someone is pledging with 4.5 GBP for my 5 USD tier, total_historical_amount_cents returns 450, whereas it being paid in USD would be 500.

Please help me - I’m at my wits’ end here. There’s no reliable way of conversion anywhere in the API.

campaign_lifetime_support_cents may be the field you are looking for. It is in campaign currency. total_historical_amount_cents is still in patron currency, though it should be made in campaign currency as well.

Heya, thank you for your prompt response.

I’m using this endpoint from the docs, and it does not respond with campaign_lifetime_support_cents that I know of…? Am I using the wrong endpoint or version of the api or something? If so, what endpoint should I use?

ohhh i just found it, i guess i was on v1 instead of v2 and need to rewrite to this endpoint

1 Like

Yep. Always v2 client with v2 calls to v2 endpoints.