DogeJS / All apps / Get started

Accept Dogecoin on your website

Paste your address, pick a button, copy two lines. Payments go straight to your own wallet. No account, no fees.

The payment window a customer sees on a phone after pressing the button: 12 DOGE, Order 1042, a Pay with DogeJS Wallet button and a QR code.
The same window after the payment arrives: a green check and Payment received.

What you get

A pay button for any website

No shop software and no developer. Two lines of code add a button that opens a payment window.

dogejs.com/start/app/
The builder: a Dogecoin address, a grid of twelve button styles with one chosen, and the two lines of code to copy.

Pick a button

Choose how it looks

Twelve ready-made buttons, from a plain dark one to a Dogecoin badge. The code updates as you pick.

  • Pay, Donate or Tip wording
  • Dark, yellow or outlined
  • Add an amount or a label if you want one
dogejs.com/start/app/
The first step of the builder: a Dogecoin address with a green tick and the words Looks good.

Paste your address

It checks the address for you

Paste the address that should receive your payments. The builder checks it and tells you if something is off.

  • A tick when it looks right
  • Never asks for a key or a recovery phrase and clears one if you paste it
  • No address yet? A short guide shows how to get one
HTML
<script src="https://dogejs.com/pay.js" defer></script>
<doge-pay mode="button" address="YOUR ADDRESS"></doge-pay>

Copy two lines

Two lines, nothing to install

Copy the code the builder gives you and paste it where you want the button. That is all.

  • Works on any page that lets you add HTML
  • Or download a small page to try it first
  • Change the amount or label at any time by making new code
dogejs.com/start/app/
The builder with Where do I paste this open: any web page, WordPress with a Custom HTML block, and Shopify or Squarespace with a code block.

Where to paste

Works with common site builders

Paste the two lines into a Custom HTML block (WordPress) or a code block or embed (Shopify, Squarespace), or straight into a page you edit yourself.

  • Any web page: paste where the button should appear
  • WordPress: a Custom HTML block
  • Shopify and Squarespace: a code block or embed
The payment window on a phone: 12 DOGE, Order 1042, a Pay with DogeJS Wallet button and a QR code.

What your customer sees

A clear payment window

Pressing the button opens a window with the amount, a QR code and a button for the DogeJS wallet.

  • Any Dogecoin wallet can scan the QR code
  • A green check when the payment arrives, if you turn on checking
  • The money goes straight to your address

How it works

Three steps to a working button

  1. Paste your address

    The address that should receive your payments.

  2. Pick a button

    Choose the style and wording you like.

  3. Copy two lines

    Paste them into your page. Done.

Questions

Good to know

Do I need an account or to pay anything?

No. There is no DogeJS account and no fee. The buyer pays the normal Dogecoin network fee from their wallet and the full amount reaches your address.

I do not have a Dogecoin address yet.

Open any Dogecoin wallet, choose Receive and copy the address that starts with D. The builder's "I don't have one yet" link walks through it, and the DogeJS wallet is one option. Keep your recovery phrase to yourself: the builder refuses a phrase or private key if you paste one.

Can I test it without real money?

Yes: use a test-network address (it starts with n) and the builder sets network="testnet". Test coins have no value.

Does it tell me when someone has paid?

Not by itself. Without api the button makes no requests. Check your wallet, or add api and listen for doge-pay:confirmed, as in the developer docs.

Can I change the button text or colours?

Yes: button-label, button-style and the CSS custom properties are described in the Pay button docs.

Can I host pay.js myself?

Yes, and for a checkout page it is the better choice. Copy the file, change the src, and update it when you want a new version.

Get your button code

Two lines for your website. No account, no fees.

For developers

Documentation

What the button does, where it goes, and how to know you were paid.

What the two lines do

HTML
<script src="https://dogejs.com/pay.js" defer></script>
<doge-pay mode="button" address="YOUR ADDRESS"></doge-pay>

The first line loads pay.js, one static file that defines a custom element called <doge-pay>. The second line is the element. With mode="button" it draws only a button; pressing it opens a window with a QR code, the amount if you set one, and buttons for wallets that can pay. The buyer pays from their own wallet straight to your address.

  • Nothing is sent to DogeJS and there is no account. Without the api option the button makes no network requests at all.
  • Only your public address is on the page. Your keys stay in your wallet.
  • The address is checked when the page loads. A mistyped address shows an error in place of the QR code. On the main network the address starts with D; the builder adds network="testnet" for test-network addresses.
  • The builder loads pay.js from https://dogejs.com/pay.js. If you would rather not depend on another host at checkout, copy the file to your own server and change the src (see the Pay button docs).

Where to paste it

Anywhere that lets you add your own HTML to a page and does not strip <script> tags.

WhereHow
A plain HTML pagePaste the two lines where you want the button to appear. The script line can also go in the <head>.
WordPressAdd a Custom HTML block and paste the code. Some security plug-ins and the editor for users without the unfiltered HTML right remove script tags; in that case ask a site administrator.
Shopify, SquarespaceAdd a code block (or embed) and paste the code, as the builder suggests. Which blocks accept a script depends on your plan and theme, and these builders change their editors from time to time; check the button appears on the published page, not only in the editor.
Other site buildersLook for a block called HTML, code or embed. If it only accepts a link or an iframe, the button cannot run there: use a payment link instead.

The snippets below were tested on plain HTML pages only. How individual site builders treat scripts is theirs to decide and is not something this page can promise.

Examples that were run

These three snippets were loaded in Chrome from a test page that serves pay.js from the same folder, with a stand-in Esplora server on the Dogecoin test network. In your page use https://dogejs.com/pay.js and your own address. Test-network addresses start with n; leave out network="testnet" for a real D address.

1. The builder's output: a button with just an address

HTML
<script src="pay.js?v=202611291136" defer></script>
<doge-pay mode="button" address="nqmUZf2kiEYGH5ggBuRewS4EpHBg3kXWkH" network="testnet"></doge-pay>

Result

What the page showed
Button label: Pay with DOGE
Payment link in the window: dogecoin:nqmUZf2kiEYGH5ggBuRewS4EpHBg3kXWkH

With no amount the customer chooses how much to send, and any payment counts.

2. A fixed amount, a label and the pill style

HTML
<script src="pay.js?v=202611291136" defer></script>
<doge-pay mode="button" address="nbvvdX6itqsmT8sBCFAQwafyYjzZcCnMWK" network="testnet" button-style="pill" amount="25" label="Order 1042"></doge-pay>

Result

What the page showed
Button label: Pay 25 DOGE
Payment link in the window: dogecoin:nbvvdX6itqsmT8sBCFAQwafyYjzZcCnMWK?amount=25&label=Order%201042

The amount is DOGE as plain decimal text (up to 8 decimals). The label is percent-encoded into the link and shown in the window.

3. Be told when it is paid

HTML
<script src="pay.js?v=202611291136" defer></script>
<doge-pay mode="button" address="nnd8pQuUHY7AMMVDqocZfrkCGHgppbLnt2" network="testnet" amount="25" label="Order 1042"
  api="http://127.0.0.1:9077" poll="1" since="1"></doge-pay>
<script>
document.addEventListener('doge-pay:confirmed', (e) => {
  console.log('paid', e.detail.txid.slice(0, 8), String(e.detail.amountKoinu), 'koinu');
});
</script>

The test sent 25 DOGE to the address, then mined a block (poll="1" checks every second; the default is 10 and confirmations defaults to 1). The stand-in chain's blocks carry old time stamps, so the test also sets since="1"; on the real network leave both out.

Output

Browser console
paid b25c7c0f 2500000000 koinu

amountKoinu is a bigint, so convert it with String() before JSON.stringify. 1 DOGE is 100,000,000 koinu.

More button options

The builder's Advanced dialog sets the amount and label. Everything else is an attribute you add by hand: button-style (solid, yellow, outline, plaque, plaque-dark, pill, coin), button-size, button-label, button-block, theme, confirmations, expires, api and more. They are listed and checked in the Pay button reference; this page does not repeat them. For the buttons themselves, see the button styles.