Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Give API returns inconsistent amount formats #4073

DevinWalker opened this issue Apr 2, 2019 · 1 comment


None yet
3 participants
Copy link

commented Apr 2, 2019

Bug Report

The current version if the Give API has inconsistent amount formatting for multiple keys.


  1. Some amounts have six decimals
  2. Some amounts are strings and others like total are integers
  3. The amounts don't respect other currency formats.
  4. Add-ons like Fee Recovery also have six decimals "_give_fee_donation_amount": "100.000000"

User Story

As a Give admin who wants to use Zapier, I want clear amount formatting within the API so that I can set properly pipe the data in need.

Possible Considerations

  1. Is there a standard for APIs to return amounts?
  2. What does Stripe and WooCommerce return for their amount fields?
  3. Should some of the duplicate

Bug Type

  • This bug describes functionality that never worked as expected.

This comment has been minimized.

Copy link

commented Apr 3, 2019



@DevinWalker As we can see Woocomerce output price item as string and format them as per the number of decimal set in Woocommerce setting while stripe output amount as the float.

As we discussed we can output price as Woocommerce doing

DevinWalker added a commit that referenced this issue Apr 4, 2019

Merge pull request #4077 from impress-org/issue/4073
fix: Give API returns inconsistent amount formats #4073 and feat: add unit test to check for valid JSON object returned in API #4074
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.