donate-button
donate-button copied to clipboard
Make an embeddable Donation Card
We can use similar structure to the donate button to also create an embeddable donation card, which would take in a donation ID and create the same UI as the donation card on our main website, except using the shadow DOM in other website contexts. We can use the donation API to get all the requisite information:
https://www.every.org/api/donation/1?nonprofitSlug=givewell&username=omar
That already works with a simple GET
request. We can also do it with donation IDs:
https://www.every.org/api/donation/7714ab02-66a0-440c-9121-ce8eba9d04b9
@osdiab which donation card are you referring to? The idea is to provide another way to the non-profits to show up the donation widget?
This is separate from the donate button, along with #128 - sorry for the confusion. When someone donates on Every.org we show a card representing their donation on our site; we want those cards to be embeddable on other peoples sites too.
before implementing this I want to nail down if we wanna do it with the shadow dom preact technique here, or via an iframe; there are pros and cons to each. So will self assign until it’s ready