Payment Links
Payment links allow you to accept crypto payments without writing any code. Create a link, share it with your customers, and get paid.
How It Works
- Create a Payment Plan in the dashboard with amount, recipient, and supported tokens
- Share the generated link via email, social media, or embed it on your website
- Customer pays by connecting their wallet and completing the transaction
- You get notified via webhook when the payment is confirmed on-chain
Payment Link Format
https:"text-neutral-500">//donutme.xyz/{locale}/pay/{linkId}/checkout| Parameter | Description |
|---|---|
locale | Language prefix (en or zh-TW) |
linkId | Unique payment plan identifier |
Customizing Checkout Appearance
Each project can customize the checkout page appearance:
- Banner Image — Displayed at the top of the checkout page
- Cover Image — Your project logo/avatar
- Accent Color — Primary brand color for buttons and highlights
- Shape — Cover image border radius style
Configure these in Project Settings → Checkout Appearance.
Embedding Payment Links
You can embed the checkout page in an iframe:
HTML
<iframe
src=<span class="text-lime-400">"https:<span class="span>text-neutral-500<span class="text-lime-400">">//donutme.xyz/en/pay/{linkId}/checkout"span>span>
width=<span class="text-lime-400">"100%"span>
height=<span class="text-lime-400">"700"span>
frameborder=<span class="text-lime-400">"0"span>
allow=<span class="text-lime-400">"payment; clipboard-write"span>
></iframe>The iframe communicates payment completion via postMessage:
JavaScript
class="text-sky-400">window.addEventListener(class="text-pink-400">class="text-lime-400">"message", (event) => {
class="text-pink-400">if (event.data.class="text-pink-400">type === class="text-pink-400">class="text-lime-400">"donutme:payment-completed") {
class="text-sky-400">console.log(class="text-pink-400">class="text-lime-400">"Payment completed:", event.data.transactionId);
}
});Test Mode
Enable Test Mode in the dashboard to use testnet networks (Sepolia, BSC Testnet) without spending real funds. Test mode payment links are visually distinguished with a test badge.