Setup
A site is set up in Pybara Wallet, not in code: until it is, a Pybara button stays hidden and open() refuses. These are the site owner’s steps; whoever adds Pybara to the site relays them, once.
The site owner’s steps
Section titled “The site owner’s steps”- 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.
The terms are the Pybara Services Terms of Use, the same for every site, however it integrates Pybara. Pybara records the version and the date you accepted them. The Sites page details the DNS record and the terms.
Then, the code
Section titled “Then, the code”With the site verified and its terms accepted, Pybara.checkout({ siteUrl, siteName, recipientPrincipal, currency }) binds it once, then either:
.buttons()draws a Pybara button beside the form’s other payment methods — see Pybara next to PayPal;.open()opens the checkout from your own Donate button’s click — see Your own Donate button.
Every field is in Options.
The two rules to know
Section titled “The two rules to know”Testing on staging
Section titled “Testing on staging”Pybara.checkout({ …, staging: true }) points every call at the staging canisters and staging.pybara.io, so you can exercise the whole flow against a site registered there. Never ship staging: true to a live site.