Bitcoin Donations

Explore integration of Bitcoin donations on your website or mobile app.

Start accepting Bitcoin donations today.

To offer Bitcoin Donations directly on your web site, use our Donation component. Easy to craft manually or generate in your TripleA dashboard, then copy-paste into your site’s HTML templates.

Donations can be tracked via your TripleA dashboard. You can also receive real-time updates from our API in your own backend or by e-mail.

How it works

Use our Donation component to accept donations within your own site.

Our smart component handles the display of the donation button, the interactions with the user and the display of the Bitcoin QR code.

TripleA Donation button

Front-end user-facing flow:

Live demo

Copy-paste this code into an existing web page, or simply create an index.html file and place below code inside.

Note: This code is for a live demo. Donations made here are sent to the Yayasan Chow Kit charity in Malaysia.

Preview:

<script 
  data-api-id="HA1556538923RGAL" 
  data-redirect-url="https://www.yck.org.my/donate?msg=thankyou" 
  data-currency="USD" 
  data-amount="100.00" 
  data-client-txid="user-or-session-identifier" 
  data-crypto-currency="BTC" 

  src="https://triple-a.io/donations/cdn/moip-donate-button-app.js" 
  id="triplea-donation-button" 
  async >
</script>

Embed your Donation component

Step 1. Obtain your API ID per settlement mode

There are 2 settlement modes:

Bitcoin to Bitcoin
Donations are sent directly to your own Bitcoin wallet. We recommend creating a new wallet for use with TripleA only.
We will need your Bitcoin wallet’s public key.

Bitcoin to local currency
We receive your Bitcoin donations and automatically convert them to the local currency at the current exchange rate. Donations are transferred to your bank account daily when there is at least USD 100 in donations.
We will need your bank account information.

An API ID is issued once a settlement mode is selected. If you didn’t receive your API ID, please contact us at support@triple-a.io.

Optional features

E-mail notifications: please provide your preferred e-mail address.
Updates for your backend: please provide us with a web hook URL. See “Donation tracking and notifications” below.

Step 2. Create your Donation component

Manual configuration through code

Specifying donation amount

Users can specify the donation amount either by scanning a QR code or by inserting the amount directly on their wallet. Users have full control over how much they wish to donate, no matter what amount is displayed on the website.

Customisable attributes
data-api-idProvide your API ID (as obtained in Step 1 above).
data-redirect-urlOptional.
When a donation has been made, the donation popup will show a confirmation message for a brief instant. The user will then be redirected to this URL.
data-currencyUse this field to indicate the local currency in which the donation is made, for example “SGD”, “USD” or “EUR”.
The up-to-date exchange rate relative to Bitcoin will be retrieved the moment a user clicks the Donation button.
data-amountUse this field to indicate the amount to be donated in the specified local currency.
data-client-txidOptional.
This is your transaction reference ID which allows you to reconcile donations with users.
(Example: can be used with a token to track which user is donating to which charity or project.)
data-crypto-currencyDefault value is “BTC”.
Support for other cryptocurrencies will be added.
<script 
  data-api-id="YOUR-API-ID-HERE" 
  data-redirect-url="https://demo-charity.org/notify-donation/" 
  data-currency="USD" 
  data-amount="100.00" 
  data-client-txid="user-or-session-identifier" 
  data-crypto-currency="BTC" 

  src="https://triple-a.io/donations/cdn/moip-donate-button-app.js" 
  id="triplea-donation-button" 
  async >
</script>

Step 3. Insert it into your website

Place the component (the <script> tag) at the location where the “Donate” button should be shown.

The component will load and inject its own HTML content at that position in the page and be ready to function.

Donation tracking and notifications

When a user visits your website and makes a donation via the Donation component, the transaction will be detected in real-time by the TripleA API.

The following happens then:

  • A confirmation message is shown to the user.
  • The donation appears in your TripleA dashboard.
  • An e-mail notification is sent to you (if you provided a notification e-mail in the TripleA dashboard).
  • A transaction notification is sent to your own backend (if you specified a web hook URL in the TripleA dashboard).

E-mail notifications

Provide your email address in the TripleA dashboard to enable real-time donation notifications by e-mail.

Backend notifications

In your TripleA dashboard, you can configure a web hook URL pointing to your backend.

The TripleA API notifies your backend in real-time of every donation.

Example

Parameters
client_txid
string
The value you specified in data-client-txid in the Donation component.
crypto-currency
string
The cryptocurrency used for the payment.
crypto-amount
float
The donated cryptocurrency amount.
currency
string
Your preferred (local) currency (as indicated by you in the TripleA dashboard).
currency_amount
float
The donated amount, in the currency of your choice.
exchange_rate
float
The exchange rate of your chosen (local) currency relative to the cryptocurrency used for the payment, at the time the user started making a Donation.
(= The exchange rate obtained at the moment when the user clicked the Bitcoin donation button.)
datetime
timestamp
Unix timestamp representing the date and time the transaction took place (UTC time).


Sending a POST request to
https://your-charity.org/notify-webhook

{
  "client_txid": "some-user-id-here",
  "crypto_currency": "BTC",
  "crypto_amount": 0.00100779,
  "currency": "SGD",
  "currency_amount": 15.00,
  "exchange_rate": 14884.01,
  "datetime": 1561923544213,
}

On the roadmap:

  • External Donations.
  • Mobile app-specific documentation.