Build charges into your product.
Use buclePay as your payments backend.
Everything you need, in one place
The guide, examples and SDK are public on GitHub: read and copy them freely. To charge for real you need a free buclePay account: your API key, webhook and production access live in your dashboard.
Ask your AI to install it
Paste this message into your AI coding assistant. It reads our public guide and does the code for you.
Add buclePay recurring payments (USDT and USDC, no custody) to this project. Read and follow https://github.com/buclepay/buclepay/blob/main/AGENTS.md step by step.
When you finish, tell me exactly what I must do by hand to go live: create my account at https://app.buclepay.com/entrar, complete the onboarding, create the API key and the webhook in Developers, and run one 1.99 USD test payment. Guide me through each step.- The AI reads our public guide and writes the code.
- You create your buclePay account and finish the onboarding.
- You create the API key and the webhook in Developers.
- You run one 1.99 USD test payment.
- You go live.
When it finishes, it will guide you to register and complete everything to go live. The AI cannot register for you.
Web button
Paste this on any page. You need the payment link from your dashboard; the button itself holds no secret.
<script src="https://app.buclepay.com/js/v1.0.2/buclepay-button.js"
integrity="sha384-lsQGw8fNn2EHn5tJDdHXofv91K2aBBw3oxspjqLK+9ueqelZBxYdI76ZiFoPvsqF"
crossorigin="anonymous" defer></script>
<buclepay-button link="<payment link url>" label="Subscribe"></buclepay-button>API
Create a payment link from your server. Needs your API key (bp_…), which you create in your dashboard. Never put it in client code.
curl -X POST https://app.buclepay.com/api/v1/payment_links \
-H "Authorization: Bearer $BUCLEPAY_API_KEY" -H "Content-Type: application/json" \
-d '{"amount_usd":49.99,"interval":"month","client_reference_id":"user_123"}'Webhooks
buclePay calls your server for every payment. Verify the signature on the raw body, then grant or remove access. Needs the webhook secret (whsec_…) from your dashboard.
app.post('/webhooks/buclepay', express.text({ type: '*/*' }), (req, res) => {
let event;
try {
event = bp.webhooks.constructEvent(req.body, req.get('buclepay-signature'), process.env.BUCLEPAY_WHSEC);
} catch { return res.sendStatus(400); }
if (event.type === 'payment.succeeded') { /* grant access */ }
res.sendStatus(200);
});SDK
One file, no dependencies, for Node. For Flutter apps use the checkout kit. The code is public; using it for real needs your API key.
npm i @buclepay/node
import BuclePay from '@buclepay/node';
const bp = new BuclePay(process.env.BUCLEPAY_API_KEY); // bp_… server only