Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
puffin.js —— 为您的网站提供的零依赖模态结账
puffin.js
<script src="https://pay.puffinmoney.com/puffin.js"></script>
<button id="pay">支付 25 USDC</button> <script> document.getElementById('pay').onclick = () => PuffinPay.open({ intentId: 'INTENT_ID_FROM_YOUR_SERVER', onSuccess: (checkout) => (window.location = '/thanks'), onExpired: () => alert('支付窗口已过期——请重试'), onClose: () => console.log('客户关闭了结账窗口'), }); </script>
PuffinPay.openLink({ slug: 'consulting-invoice-x7k2m9', amount: '150.00', // 如果链接有固定金额可省略 customerEmail: 'buyer@example.com', onSuccess: () => (window.location = '/thanks'), });
PuffinPay.open(opts)
intentId
onSuccess
onExpired
onClose
PuffinPay.openLink(opts)
slug
amount?
customerEmail?
onError
PuffinPay.close()
payment.confirmed