everydotorg/donate-button
A free donate and p2p fundraising button so nonprofit websites can accept cryptocurrency, stocks, and cash - credit, debit, bank, PayPal, Venmo, Apple Pay, Google Pay.
Featured achievements
The project's latest awards
#1 Repository of the month
#1 Repository of the month
#1 Repository of the month
Every.org Donate Button
For nonprofits — the simplest way to give your supporters a beautiful donation experience. This button opens a donation flow through Every.org.
See some demos at https://embeds.every.org/0.4. And see this in production helping raise funds at https://www.goodjobbub.org/.
Publishing
Run yarn build and check in the latest version of /docs/dist to publish the
latest version of the donate button.
Use
Here is an example html file with a donate button for https://www.every.org/lilbubsbigfund. You can copy paste this code and and then replace lilbubsbigfund with the correct handle.
The below code will use Every.org styling, because the a tag has the data-every-style attribute. To use your own styling, remove that attribute and add your own class or css.
<a data-every-style href="https://www.every.org/lilbubsbigfund#/donate"
>Donate</a
>
Note that you can use the donate button in our staging environment by using a staging link like: https://staging.every.org/ofsds#/donate
Configure
To configure your button manually, add ?explicit=1 to the script src
Here is an example html file with a manual configuration.
<div id="every-donate-btn">
<a href="https://www.every.org/lilbubsbigfund#/donate">Donate</a>
</div>
Note that you can use the donate button in our staging environment by adding the staging: true parameter to the create* calls.
Widget
Configuration options
The createWidget function accepts an object with the following properties:
{
/**
* Selector to render button in
*/
selector?: string;
/**
* Identifier for nonprofit on Every.org; you can get it by going to the
* nonprofit's profile on Every.org and looking at its URL
* @example
* If the URL is https://www.every.org/givedirectly, the slug is "givedirectly"
*/
nonprofitSlug: string;
/**
* Identifier for fundraiser on Every.org; you can get it by going to the
* fundraiser's profile on Every.org and looking at its URL
* @example
* If the URL is https://www.every.org/givedirectly/f/my-fundraiser, the slug is "my-fundraiser"
*/
fundraiserSlug?: string;
/**
* Payment methods: ["card", "bank", "paypal", "venmo", "pay", "crypto", "stocks", "daf", "gift"]
* "pay" - for apple/google pay
*/
methods?: string[];
/**
* An anchor which, if present in the URL, opens the widget
* @default "donate"
*/
openAt?: string;
/**
* If true shows the widget
* @default false
*/
show?: boolean;
/**
* Accent color for widget ui
* @default "#018669"
*/
primaryColor?: string;
/**
* Prefilled donation amount
*/
defaultDonationAmount?: number;
/**
* Prefilled donation amount without the option to change it
*/
amount?: number;
/**
* Minimum donation amount
* @default 10
*/
minDonationAmount?: number;
/**
* Preselected donation frequency without the option to change it
*/
frequency?: DonationFrequency;
/**
* Preselected donation frequency
* @default 'once'
*/
defaultFrequency?: DonationFrequency;
/**
* Amount suggestions
* @default [10, 50, 100]
*/
addAmounts?: number[];
/**
* @default false
*/
completeDonationInNewTab?: boolean;
/**
* If present, do not show the normal www.every.org background,
* only show the donation modal and do not allow people to exit
* the modal.
* @default true
*/
noExit?: boolean;
/**
* if true, the gift card option is displayed
* in the payment selection interface
* @default false
*/
showGiftCardOption?: boolean;
/**
* Partner webhook token
*/
webhookToken?: string;
}
Also you can change them in runtime. Example:
Button
If you don't want to create a button in your site, style it and link to the widget you can use our styled button that it's fully customizable. We are linking the button to the widget automatically!

Minimum configuration
Customize the button
The createButton function accepts an object with the following properties:
{
/**
* Selector to render button in
*/
selector?: string;
/**
* Identifier for nonprofit on Every.org; you can get it by going to the
* nonprofit's profile on Every.org and looking at its URL
* @example
* If the URL is https://www.every.org/givedirectly, the slug is "givedirectly"
*/
nonprofitSlug: string;
/**
* Identifier for fundraiser on Every.org; you can get it by going to the
* fundraiser's profile on Every.org and looking at its URL
* @example
* If the URL is https://www.every.org/givedirectly/f/my-fundraiser, the slug is "my-fundraiser"
*/
fundraiserSlug?: string;
/**
* If present, do not show the normal www.every.org background,
* only show the donation modal and do not allow people to exit
* the modal.
* @default true
*/
noExit?: boolean;
/**
* If not present, just a link to hrefUrl
*/
onClick?: () => void;
/**
* Button text
* @default "Donate"
*/
label?: string;
// Css class to add to the button
className?: string;
// Show the every icon inside the button
withLogo: boolean;
// Useful styling props
bgColor?: string;
textColor?: string;
borderRadius?: string;
fontSize?: string;
padding?: string;
}
API
We expose three functions through the global everyDotOrgDonateButton object:
-
createButton({selector, ...buttonOptions}): Function to generate a styled and customizable button inside the selector. -
createWidget({selector, ...widgetOptions}): Function to link a selector with the widget. As optional you can pass extra options that would be set only when the user open the widget with that button. -
setOptions(options): Function to set/override the configuration of the widget. -
showWidget(): Open the widget with javascript code.
Demo site hosting details
- Vercel hosts
embeds.every.orgas a static site fromdocs/dist/donate-button/- the root URL is theindex.htmlpage in that folder (which was written by hand, not generated) - Github Pages hosts
assets.every.orgas a static site from thedocs/folder; Github Pages hosts our embeddable JS bundle from there.
Similar Projects
Discover other similar projects and AI models.
**Vintage** RealURL extension for TYPO3 CMS. Read the wiki if you have questions!
Charity platform https://podkrepi.bg Docs https://docs.podkrepi.bg
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
A curated list of FOSS (Free and Open-source Software), freemium tools and guides for NGOs
Code for adding various effects to Squarespace v7.1 and v7.0 sites.
Reverse engineer anything with agents, from app behavior down to native binaries.
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞