DogeJS / All apps / Tip jars

A tip jar for your work

A friendly page where anyone can tip you in Dogecoin. Share the link or show the QR code. No account, no fees.

A tip page on a phone: Coffee fund, a goal bar at 50 percent, three amounts and a Tip in DOGE button.
The same page lower down: Tip 10 DOGE and a list of recent tips.

What you get

Your own page for tips and donations

Name it, set a goal and share it. Visitors pick an amount and pay from their wallet.

A tip page on a phone: Coffee fund with a message, a goal bar, three suggested amounts and a Tip in DOGE button.

Your page

A page with your name on it

Give it a title and a short message. Visitors see a clear page, not a wall of text.

  • A coloured badge with your initial
  • Your address is shown so it can be checked
  • Works on any phone, no app to install
The Advanced options: a short message, three suggested amounts, six colours, a badge letter and a switch to count earlier tips.

Choices

Suggested amounts and your colour

Pick the three amounts you want to offer, a colour that suits you and a short message.

  • Three buttons plus an "other amount" field
  • Six colours
  • Optional: count tips this address received before today
The lower part of a tip page: Tip 10 DOGE and a list of recent tips of 50, 10, 25, 10 and 5 DOGE.

Goal bar

A goal bar and recent tips

Set a goal and the page shows how far you are. When it can read your address's history, it also lists recent tips.

  • The bar fills as tips arrive
  • Nothing is stored by DogeJS
  • If no server can be reached, the page simply leaves the bar out
The tip jar result: link, QR code, and under Embed and poster the two-line code for a Tip in DOGE button and a Print poster button.

Embed and poster

Put it on your site or on a wall

Copy two lines to add a Tip in DOGE button to your own website, or print a poster with a large QR code.

  • Two lines of code, no account
  • A printable poster for a counter or a stall
  • Both use the same address
dogejs.com/tip/app/
The tip jar builder: address, title Coffee fund, goal 200, and the finished link with a QR code.

Share

Share one link

Copy the link, post it in your bio, or show the QR code. The page is the link, so there is nothing to log in to.

  • Short link, easy to paste anywhere
  • My pages lists the ones you made, in this browser only
  • Make a new one any time

How it works

Three steps, no sign-up

  1. Paste your address

    Tips arrive at this address, in your own wallet.

  2. Name it and set a goal

    A title, an optional goal and an optional message.

  3. Share the link

    Send it, post it, or print the poster.

Questions

Good to know

What does a tip jar cost?

Nothing. No account and no fee. The visitor pays the normal network fee and the full tip reaches your address.

Does the page store the tips?

No. It reads your address's history from a server when it can, to draw the goal bar. Nothing is kept by DogeJS. "My pages" in the builder lists pages you made, in this browser only.

Why does the goal bar stay empty?

Either nothing has reached the address since the page started counting, the page has no server it can read (a test network page without a server of its own says so), or the free service is paused or switched off.

Can I change a tip page later?

No. The page is the link. Make a new one and share that; the old link keeps working as it was.

Can I use it for donations from a company or a group?

Yes, it is just an address. If several people share the address, the goal counts everything paid to it.

Is the title checked?

No. It is whatever you typed, shown as plain text. Visitors should check the address, which the page shows.

Start your tip jar

A minute to set up. No account, no fees.

For developers

Documentation

The tip page format, where the goal bar gets its numbers, and how to make pages from code.

How it works

A tip jar is a link to a static page, /t/, with the whole page packed into the part of the URL after #. That part never reaches a web server, so there is no account, no database and nothing to host. The page shows your title and message, three suggested amounts, a "Tip in DOGE" button and a QR code. A tip goes from the visitor's wallet straight to your address.

Builder/tip/ makes the linkYou share itlink, QR, posterTip page/t/#1.… reads itVisitor's wallettips your address

Only your public address is in the link; the builder clears a private key or recovery phrase if you paste one. The format, checksum and security notes are the same as for payment links; this page covers what is different.

Fields of a tip page

The JSON array has exactly twelve entries, in this order, inside the same 1.<base64url(JSON + CRC-32)> envelope as a payment link (at most 1,800 characters).

#FieldValueLimit
0network"m" or "t"
1addressAddress on that network
2titleRequired. The big heading.60 characters
3messageOptional short text200 characters
4goalDOGE as plain text, or empty for no goal. Same bounds as an amount: 0.01 to 1,000,000,000.
5-7chipsExactly three suggested amounts in DOGE (the builder starts with 5, 10, 50)
8colorgold, ink, green, blue, rose or violet
9initialOne letter or digit in any script for the badge, or empty. Emoji and symbols are refused.1 character
10sinceA number, not text: Unix seconds from which tips count. 0 means all history; otherwise between 2013-01-01 and 2100-01-01.
11serverServer for the goal bar, or empty. Same rules as in a payment link: https (http only for localhost), no credentials, query or fragment.200 characters

The embedded fragment

Example 1 below makes this one:

Fragment
1.WyJ0IiwiblVDQUdHZ1pFUE4xUXlrbm1RZTFvQWt1ODE3YlFBRktGdCIsIkNvZmZlZSBmdW5kIiwiVGhhbmtzIGZvciBrZWVwaW5nIHRoZSBsaWdodHMgb24uIiwiMjAwIiwiNSIsIjEwIiwiNTAiLCJncmVlbiIsIkMiLDE3OTUwMDAwMDAsIiJdiYChFw

Decoded the same way as in the payment link walkthrough (split at the dot, base64url, check the last four bytes against the CRC-32 of the rest, read the JSON), it gives:

JSON
["t","nUCAGGgZEPN1QyknmQe1oAku817bQAFKFt","Coffee fund","Thanks for keeping the lights on.","200","5","10","50","green","C",1795000000,""]

Note that since is the only number in the array and the goal is "200" (200 DOGE) as text.

The goal bar and where its numbers come from

A tip page can show progress towards the goal and a list of recent tips, but only when it can read your address's history from a server. Where that comes from:

  • A server in the link (the "Server that reads the progress bar" option): an Esplora-style server you run or trust. The page re-reads it every 60 seconds and looks at the latest 200 transactions.
  • The free public service (BlockCypher), for main network pages without a server of their own: re-read every 2 minutes, 50 transactions each time. Its limits are shared with every DogeJS page in that browser, and the page says when it is paused. The visitor can turn it off. It is a free public service, not run by DogeJS.
  • Otherwise the page tries the community server for its network (the QED demo servers, which come with no promise of being up), and if none answers it shows no progress. A test network page says that live counting needs your own server. Tipping itself always works.

What counts as a tip is any output to your address in those transactions: the page cannot tell a tip from a page visitor apart from any other payment to the same address. With since set, confirmed transactions in blocks before that time are left out. The builder sets since to the start of today (UTC) when you give a goal, so a jar starts at zero; turn on "Count earlier tips" to count all history (since 0). With no goal there is no progress bar. If the transaction limit is reached the page says the total may be incomplete. Progress is a convenience read from a server, not proof.

Embed on your site, and the poster

"Embed on your site or print a poster" in the result card gives a tip button for a page you already have. It is the pay button with a different label and your page title as the payment label:

HTML
<script src="https://dogejs.com/pay.js" defer></script>
<doge-pay mode="button" button-label="Tip in DOGE" address="YOUR ADDRESS" network="testnet" label="Coffee fund"></doge-pay>

network="testnet" appears only for test network addresses. The button has no amount (the visitor chooses) and does no progress counting: it only opens the payment window. For all its options see the Pay button reference.

Poster: "Print poster" opens your browser's print dialog with a page that holds "Tip in DOGE", your title and message, a large QR code of the tip link, "Scan with your phone camera to tip" and your address. Paper size and margins are up to your browser and printer.

Make tip pages from code

The helper library is @dogejs/links (not on npm yet: build it from the repository, see Self-hosting). These programs were run with Node 22 against the built package.

1. Encode and decode a tip page

Exactly three chips; goal is null for no goal; since is a Unix time in seconds.

JavaScript
import { encodeTipPage, decodeTipPage } from '@dogejs/links';

const page = {
  network: 'testnet',
  address: 'nUCAGGgZEPN1QyknmQe1oAku817bQAFKFt',
  title: 'Coffee fund', message: 'Thanks for keeping the lights on.',
  goal: 20_000_000_000n,                                   // 200 DOGE, or null for no goal
  chips: [500_000_000n, 1_000_000_000n, 5_000_000_000n],   // exactly three suggested amounts: 5, 10, 50 DOGE
  color: 'green', initial: 'C',
  since: 1_795_000_000,                                    // count tips from this Unix time; 0 = all history
  server: '',
};
const fragment = encodeTipPage(page);
console.log('https://dogejs.com/t/#' + fragment);

const back = decodeTipPage(fragment);
console.log(back.ok, back.page.title, back.page.color, back.page.since);
console.log('same page back:', JSON.stringify(back.page, (k, v) => typeof v === 'bigint' ? String(v) : v) === JSON.stringify(page, (k, v) => typeof v === 'bigint' ? String(v) : v));

Output

Output (run with Node 22)
https://dogejs.com/t/#1.WyJ0IiwiblVDQUdHZ1pFUE4xUXlrbm1RZTFvQWt1ODE3YlFBRktGdCIsIkNvZmZlZSBmdW5kIiwiVGhhbmtzIGZvciBrZWVwaW5nIHRoZSBsaWdodHMgb24uIiwiMjAwIiwiNSIsIjEwIiwiNTAiLCJncmVlbiIsIkMiLDE3OTUwMDAwMDAsIiJdiYChFw
true Coffee fund green 1795000000
same page back: true

2. Count tips and goal progress

tipsTo picks the outputs that pay your address (ignoring confirmed ones before since), sumTips adds them and goalPercent gives a whole percent from 0 to 100, rounded down.

JavaScript
import { tipsTo, sumTips, goalPercent, formatDoge } from '@dogejs/links';

const jar = 'nUCAGGgZEPN1QyknmQe1oAku817bQAFKFt';
const other = 'nZ5MPBZfdfXjGDPFxnKEwXRnZgtCCgRCLL';
const t = (n) => String(n).repeat(64);
// What an Esplora-style server returns for the address, decoded (amounts in koinu as bigint)
const txs = [
  { txid: t(1), outputs: [{ address: jar, valueKoinu: 1_000_000_000n }], status: { confirmed: true, blockHeight: 10, blockTime: 1_794_000_000 } },   // before the page started
  { txid: t(2), outputs: [{ address: jar, valueKoinu: 2_500_000_000n }, { address: other, valueKoinu: 100_000_000n }], status: { confirmed: true, blockHeight: 20, blockTime: 1_795_100_000 } },
  { txid: t(3), outputs: [{ address: jar, valueKoinu: 500_000_000n }], status: { confirmed: false } },                                             // seen, not in a block yet
  { txid: t(4), outputs: [{ address: other, valueKoinu: 9_000_000_000n }], status: { confirmed: true, blockHeight: 21, blockTime: 1_795_200_000 } }, // not to the jar
];
const goal = 20_000_000_000n;                          // 200 DOGE

for (const since of [0, 1_795_000_000]) {
  const tips = tipsTo(jar, txs, since);
  const total = sumTips(tips);
  console.log(`since ${since}: ${tips.length} tips, ${formatDoge(total)} DOGE, ${goalPercent(total, goal)}% of the goal`);
}

Output

Output (run with Node 22)
since 0: 3 tips, 40 DOGE, 20% of the goal
since 1795000000: 2 tips, 30 DOGE, 15% of the goal

3. What a tip page refuses, and what it cleans

The checks run on decode, so a link made elsewhere gets the same treatment. Angle brackets are dropped from text; the title's text is always shown as plain text.

JavaScript
import { encodeTipPage, decodeTipPage } from '@dogejs/links';

const base = {
  network: 'testnet', address: 'nUCAGGgZEPN1QyknmQe1oAku817bQAFKFt',
  title: 'Coffee fund', message: '', goal: null,
  chips: [500_000_000n, 1_000_000_000n, 5_000_000_000n],
  color: 'gold', initial: '', since: 0, server: '',
};
const tryIt = (label, change) => {
  const r = decodeTipPage(encodeTipPage({ ...base, ...change }));
  console.log(label.padEnd(22), r.ok ? 'ok' : 'refused: ' + r.reason);
};
tryIt('plain', {});
tryIt('colour not in palette', { color: 'pink' });
tryIt('emoji as badge', { initial: '🐕' });
tryIt('letter as badge', { initial: 'Ж' });
tryIt('no title', { title: '' });
tryIt('since before 2013', { since: 1000 });
tryIt('server over plain http', { server: 'http://example.com' });
tryIt('markup in the title', { title: 'Tips <b>here</b>' });
console.log(decodeTipPage(encodeTipPage({ ...base, title: 'Tips <b>here</b>' })).page?.title);

Output

Output (run with Node 22)
plain                  ok
colour not in palette  refused: color
emoji as badge         refused: initial
letter as badge        ok
no title               refused: text
since before 2013      refused: since
server over plain http refused: server
markup in the title    ok
Tips bhere/b

Self-hosting

The builder and the tip page are part of github.com/DogeJS-Dev/payment-links, together with the payment link pages. Build it as described under Payment links: self-hosting: npm install && npm run build writes dist/tip.js (the builder) and dist/t.js (the tip page). Serve them with the tip and t folders from the website repository, and change SITE in src/common.ts to your own origin first, so the links the builder makes open your copy.