AI builders
Built your site with Lovable, Replit, Base44, Caffeine, Bolt or another AI site builder? Then you don’t need to write any code: tell the builder what you want, and it adds Pybara on its own.
Tell your builder
Section titled “Tell your builder”One sentence is enough. Pick the one that matches your site:
| Your site has… | Tell your builder |
|---|---|
| A donation form, with PayPal | “Add Pybara next to PayPal.” |
| A donation form | “Add Pybara to my donation form.” |
| A plain “Donate” button | “Make the Donate button open a Pybara modal instead.” |
Add “…with a monthly option” to offer monthly giving.
The builder finds @pybara/pybara-js on npm and here, adds a Pybara button beside your form’s other payment methods in the same style, and sets up one-time or recurring donations as your site needs. For a Donate button, it may first ask you which amounts to suggest, which currency you take donations in, and whether to offer monthly giving.
Your part, in Pybara Wallet
Section titled “Your part, in Pybara Wallet”Three steps only you can do. Your builder lists them too, when it’s done (Setup has the details):
- Create a Pybara Wallet at pybara.io, then open Manage › Sites › Add a site without a plugin and enter this site’s address.
- Publish the DNS
TXTrecord the wallet shows (_pybara-payto, holding the wallet’s principal) with the domain’s DNS provider, until the wallet shows Verified. - Accept the Pybara Terms of Service for the site there, and copy the wallet’s principal into
recipientPrincipal.
Until then the Pybara button stays hidden. It works on the site’s registered domain, not on a preview URL.
If something doesn’t work
Section titled “If something doesn’t work”The browser console says what is missing and who fixes it, in English; the builder can read it there and relay it.
| The console says… | It means |
|---|---|
…has not accepted the Pybara Terms of Service in Pybara Wallet… |
The site isn’t registered, or its terms aren’t accepted: the owner’s steps 1 and 3 |
…publishes no _pybara-payto DNS record listing… |
The DNS record is missing or lists another wallet: step 2. On a preview URL this is expected; it works on the registered domain |
…does not belong to this page's origin… |
The page isn’t served from the registered site: expected on localhost and preview URLs |
…is not a currency Pybara serves… |
Choose another currency |
checkout.amount … has more decimals than … |
The amount was converted to cents, or has too many decimals: pass '12.34' |
"recipientPrincipal" 2vxsx-fae cannot receive payments… |
A placeholder principal: use the wallet principal the site’s DNS record lists, which the site owner copies in step 3 |
For the builder
Section titled “For the builder”What the builder should produce
Section titled “What the builder should produce”- The package:
npm i @pybara/pybara-js, or on a page without a build step,<script src="https://cdn.jsdelivr.net/npm/@pybara/pybara-js@0.16/dist/pybara-js.iife.js"></script>. - A Pybara button:
Pybara.checkout({ siteUrl, siteName, recipientPrincipal, currency }), then.buttons({ style, createPayment }).render(el), with the PayPal button’sstylecopied as it is — see Pybara next to PayPal. - Amounts as decimal strings in the currency (
'12.34','1000'for JPY), never converted to cents or to USD: the checkout does both. precheck({ amount })when the form’s amount changes, so the button and its minimum stay current.- For a “Donate” button with no amount:
pybara.open({})on its click, and the checkout asks the donor how much (Your own Donate button). Before writing it, ask the site owner, rather than guessing:- which amounts to suggest, if any: up to four, passed as
suggestedAmounts; without them the donor types the amount; - which currency the donations are in, if the site doesn’t say: it is required, in
Pybara.checkout({ currency }), or on eachopen()on a multi-currency site, and never guessed from the visitor; - whether to offer monthly giving, and how: a second “Give monthly” button calling
open({ frequency: 'monthly' }), orfrequencyon the existing one. Without it, donations are one-time.
- which amounts to suggest, if any: up to four, passed as
- The site owner’s steps, listed at the end, word for word: the three steps of Your part, in Pybara Wallet, numbered, then its closing line (“Until then the Pybara button stays hidden…”).
- When it goes wrong, read the browser console: If something doesn’t work maps each message to its cause and its fix.
A prompt, if the builder needs one
Section titled “A prompt, if the builder needs one”If a builder doesn’t find its way from the sentence alone, paste this:
Add Pybara next to the existing payment methods of this site's donationform, using @pybara/pybara-js (docs: https://docs.pybara.com/pybara-js/next-to-paypal/).
Install: npm i @pybara/pybara-js — or, on a no-build page, a script tag:<script src="https://cdn.jsdelivr.net/npm/@pybara/pybara-js@0.16/dist/pybara-js.iife.js"><\/script>
const pybara = Pybara.checkout({siteUrl: '<this site\'s canonical https URL, as registered in Pybara Wallet>',siteName: '<site display name>',recipientPrincipal: '<the site owner\'s wallet principal — ask me>',currency: '<ISO 4217, e.g. "EUR">',});pybara.buttons({style: <the PayPal button's style object, as it is>,createPayment: () => ({ amount: '<the form\'s amount, a decimal string>' }),// add frequency: 'monthly' | 'yearly' for a subscription optiononStateChange: (a) => { /* show a.message, e.g. "Minimum €0.70" */ },onSuccess: (r) => { /* r.blockIndex */ },}).render('<the Pybara button\'s container>');Call pybara.precheck({ amount }) when the amount changes.Amounts are decimal strings in the currency's major units — never cents,never USD.
When you are done, list the site owner's steps you cannot do:1. Create a Pybara Wallet at https://pybara.io and add this site under Manage › Sites › Add a site without a plugin.2. Publish the _pybara-payto DNS TXT record the wallet shows.3. Accept the Pybara Terms of Service for the site, and give me the wallet principal.The Pybara button stays hidden until then, and works on the registereddomain, not on a preview URL.