I have some questions about "pledge_sum", "currency_code" field

I am writing to enquire about “currency_code” and “pledge_sum”.

(I’m using an api “https://api.patreon.com/users?filter[vanity]=user_vanity&json-api-version=1.0”)

  1. I found a code used a field “pledge_sum” divided by 100 to express in dollars.
    Does this field base on a cent?

  2. and I heard that the “currency_code” field is updated.
    if returned data was “currency_code=EUR, pledge_sum=1000”, is it right to divide it into 100 to express in euros?
    I don’t know about which monetary unit(dollars or cents) based the pledge_sum field is.

  3. what’s the difference between “data>attributes>patron_currency” and “included>attributes>pledge_sum_currency” ?

I look forward to hearing from you soon.

thank you.

pledge_sum seems related to a creator’s campaign.

https://docs.patreon.com/#campaign

api.patreon.com/ is and old address, better transition to https://www.patreon.com/api/oauth2/v2/

1 - Yes, cents.

2-3 - Depends on how you are getting the data. Are you getting a user, and then including other includes and relations? If so what is the exact call?

thank you for your answer.

As I said, I’m using this API -> “https://api.patreon.com/users?filter[vanity]=user_vanity&json-api-version=1.0

and using the data “included>attributes(of type: campaign)>pledge_sum”
if I use this data, is it right? (about the second of three question of the original post)
and in this api, what is the difference between patron_currency and pledge_sum_currency? (about the third of three question of the original post)

I also want to use the latest API.
However, it is still difficult due to various conditions.

thank you.

pledge_sum pertains to campaign, patron_currency pertains to patron. So pledge_sum_currency should give you the currency which the pledge_sum of the campaign is in. Whereas patron_currency should tell you the set currency of the patron.

Creating a test patron account with a new email and maybe a new creator account with another email would give you the means to test these.

Thank you for your answer.
It helped me a lot.

Let me ask you one more question.
If the user changes to EUR, is the “purge_sum” automatically exchanged?

thank you.

pledge_sum shouldnt change since it pertains to the campaign. It should reflect the total amount in the currency that the creator’s campaign is.

But best would be to just try it and see. With your new test patron account, change the currency, and see if it affects the campaign pledge sum. It shouldnt.