Guides
Hosted checkout and pay.js
Send buyers to our checkout, or open it over your page with one script.
Every invoice has a page: pay.perly.io/i/{id}. It is phone-first, works without an account and speaks the buyer's language. You never build a payment form.
Redirect
Create an invoice on your server and send the buyer to its url. Pass return_url to bring them back when it's paid.
Overlay with pay.js
First allow your site: Settings → Checkout → Sites that may embed the checkout, one origin per line (https://yourshop.com). The checkout opens over the sites listed there only; anywhere else the button opens it in a new tab.
Then add the script once. Any element with data-perly-pay opens that payment link over your page.
<script src="https://pay.perly.io/pay/v1.5bdf2776ee74.js"
integrity="sha384-W98ndu50hymNVBtxKpwAcr3BxXUEFVzpxXZGF4AzqToIFMBPrQFVd4H60xXBzVJZ"
crossorigin="anonymous" defer></script>
<button data-perly-pay="coffee-beans">Pay with crypto</button>The value is a payment link's slug. The overlay closes itself when the invoice is paid; your webhook still decides what to ship.
Which to use
| You want | Use |
|---|---|
| No code at all | A payment link |
| A button on your site | pay.js |
| A cart with its own total | An invoice from the API, then redirect |