Universal JS Button
Drop one script tag into any site and send customers to Apa hosted checkout. The button is for simple fixed-amount payments, landing pages, CMS sites, and no-code embeds. For carts and inventory, create checkout sessions from your backend.
Copy-paste button
Add the script where you want the button to appear. The customer clicks it, Apa creates a hosted checkout, and the customer pays on apa.app.
Access unlocks instantly after payment.
Default checkout action
For white surfaces
<script
src="https://apa.app/button.js"
data-apa-amount="25.00"
data-apa-currency="USD"
data-apa-payout-asset="USDC"
data-apa-payout-network="solana"
data-apa-payout-address="8dK3...p91A"
data-apa-display-name="My shop"
data-apa-description="Order #1042"
data-apa-success-url="https://store.example/thanks"
data-apa-cancel-url="https://store.example/cart"
></script>Embed a payment link
If you already created a payment link in the dashboard, embed that link directly. The link keeps its fixed amount or customer-entered amount, promotion-code setting, payout wallet, and return URLs.
<script
src="https://apa.app/button.js"
data-apa-payment-link="pl_123"
></script>Manual mount
Use manual mount when your site builder gives you a fixed container, or when the amount comes from a product selector on the page.
<div id="apa-button"></div>
<input id="amount" value="25.00" />
<script src="https://apa.app/button.js" data-apa-render="false"></script>
<script>
ApaCheckout.mount(document.querySelector("#apa-button"), {
amount: document.querySelector("#amount").value,
currency: "USD",
payoutAsset: "USDC",
payoutNetwork: "solana",
payoutAddress: "8dK3...p91A",
displayName: "My shop",
description: "Custom order",
successUrl: "https://store.example/thanks",
cancelUrl: "https://store.example/cart"
});
</script>Dynamic amount
If another input owns the amount, point the button at it. The script reads the current value when the customer clicks.
<input id="tip-amount" type="number" min="1" step="0.01" value="10.00" />
<script
src="https://apa.app/button.js"
data-apa-amount-selector="#tip-amount"
data-apa-payout-asset="USDC"
data-apa-payout-network="base"
data-apa-payout-address="0x1234..."
data-apa-display-name="Creator tips"
data-apa-description="Tip"
></script>Supported attributes
When to use backend sessions
Use the JS button for simple public payments where the final amount and payout wallet can safely live in the page. Use POST /v1/checkout/sessions from your backend for carts, coupons, inventory holds, customer accounts, fraud checks, or any order that must be created from trusted server state.