Getting Started
Quick start
Add the script and render your first button.
Create or copy a payment UID
Create a payment link in MakeCrypto and copy its UID, or create one through the MakePay payment-link API. The hosted page remains available at /payment/:uid for direct links and fallbacks.
Install the script and add a button
Place the script once on the page. The recommended URL is
https://unpkg.com/@makecrypto/makepay-modal@latest/dist/makepay.min.js with
data-api-url-prefix="https://your-checkout-host.example" on the script tag.
Then add
data-makepay-payment-link to any clickable element that should open the modal.
The script attribute configures the checkout host, so no makepay.init() call
is required.
<script src="https://unpkg.com/@makecrypto/makepay-modal@latest/dist/makepay.min.js" data-api-url-prefix="https://YOUR_CHECKOUT_HOST"></script>
<button type="button" data-makepay-payment-link="YOUR_PAYMENT_UID">
Pay with crypto
</button>Handle completion in the host page
Embedded mode emits lifecycle events instead of redirecting the top window automatically. Listen for redirect requests when your site should navigate after payment completion.