Notion Sites
Notion Sites lets you publish Notion pages as websites. You can add Sanwo payments using the /embed block.
1. Create a payment page
Section titled “1. Create a payment page”Host a small HTML file with your payment button. You can use any static hosting (GitHub Pages, Netlify, Vercel, or even a simple HTML file):
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> body { margin: 0; display: flex; justify-content: center; align-items: center; min-height: 100px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; } .sanwo-button { padding: 14px 28px; background: #6366f1; color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; } .sanwo-button:hover { background: #4f46e5; } </style></head><body> <button class="sanwo-button" data-sanwo-provider="paystack" data-sanwo-key="pk_test_xxxxx" data-sanwo-amount="500000" data-sanwo-currency="NGN" data-sanwo-email="customer@example.com" > Pay ₦5,000 </button>
<script src="https://cdn.jsdelivr.net/npm/@sanwohq/embed/dist/sanwo.global.js"></script></body></html>2. Embed in Notion
Section titled “2. Embed in Notion”- In your Notion page, type
/embed - Paste the URL of your hosted HTML file
- Resize the embed block to fit your button
Custom amounts
Section titled “Custom amounts”For donation or tip pages, use a custom amount form:
<div data-sanwo-provider="paystack" data-sanwo-key="pk_test_xxxxx" data-sanwo-currency="NGN" data-sanwo-custom-amount="true" data-sanwo-button-text="Support Us" data-sanwo-placeholder="Enter amount"></div>
<script src="https://cdn.jsdelivr.net/npm/@sanwohq/embed/dist/sanwo.global.js"></script>Set the embed height to at least 200px for the form to display properly.
- Notion embeds run in iframes — include the
<script>tag in your hosted HTML file - Use a transparent background (
background: transparent) for a seamless look - Notion Sites supports custom domains — the embed URL can be any publicly accessible page
- For all available data attributes, see the Embed / CDN guide