Skip to content

Checkout Button

The ByteConnect Checkout Button is the fastest way to accept crypto payments on your website. No backend integration required.

Add this snippet to your website:

<!-- ByteConnect Checkout Button -->
<script src="https://byteconnect.us/checkout.js"></script>
<button
class="byteconnect-button"
data-affiliate-id="YOUR_AFFILIATE_ID"
data-amount="25.00"
data-label="Product Name"
>
Pay with Crypto
</button>

Replace YOUR_AFFILIATE_ID with your merchant ID from the admin panel.

AttributeRequiredDescription
data-affiliate-idYesYour merchant affiliate ID
data-amountYesPayment amount in USD
data-labelNoReference label for the transaction
data-emailNoPre-fill customer email
data-cryptoNoPre-select cryptocurrency
data-callbackNoJavaScript function to call on completion
<button
class="byteconnect-button"
data-affiliate-id="abc123"
data-amount="50.00"
>
Pay $50 with Crypto
</button>
<button
class="byteconnect-button"
data-affiliate-id="abc123"
data-amount="25.00"
data-crypto="BTC"
data-label="Bitcoin Payment"
>
Pay with Bitcoin
</button>
<button
class="byteconnect-button"
data-affiliate-id="abc123"
data-amount="99.00"
data-callback="handlePaymentComplete"
>
Complete Purchase
</button>
<script>
function handlePaymentComplete(result) {
if (result.status === 'succeeded') {
console.log('Payment successful!', result.transaction_id);
// Redirect or update UI
}
}
</script>

The button comes with default ByteConnect styling. You can customize it with CSS:

.byteconnect-button {
background: #ec0401;
color: white;
padding: 12px 24px;
border: none;
border-radius: 8px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
}
.byteconnect-button:hover {
background: #b50301;
}

Use your own button design by adding the required data attributes:

<button
class="my-custom-button"
data-byteconnect
data-affiliate-id="abc123"
data-amount="25.00"
>
<img src="bitcoin-icon.svg" alt="">
Pay with Crypto
</button>

When clicked, the button opens a payment modal that:

  1. Displays available cryptocurrencies
  2. Shows the QR code for payment
  3. Converts USD to crypto in real-time
  4. Monitors for payment confirmation
  5. Shows success/failure status

Listen for payment events:

document.addEventListener('byteconnect:payment', function(event) {
const { status, transaction_id, amount } = event.detail;
switch(status) {
case 'started':
console.log('Payment initiated');
break;
case 'succeeded':
console.log('Payment complete!', transaction_id);
break;
case 'cancelled':
console.log('Payment cancelled');
break;
case 'timedout':
console.log('Payment timed out');
break;
}
});

Test your integration with small amounts before going live:

  1. Set data-amount="1.00" for testing
  2. Complete a real payment to verify the flow
  3. Check the transaction in your admin panel
  • Ensure the script is loaded before the button element
  • Check browser console for JavaScript errors
  • Verify your affiliate ID is correct
  • Customer may need to complete payment within 15 minutes
  • Check transaction status in admin panel
  • Ensure the QR code is scannable