Shopify Integration
Accept crypto payments on your Shopify store with Pelago.
Installation
From Shopify App Store
- Visit the Pelago Shopify App
- Click Install App
- Authorize the app
- Enter your Pelago API credentials
- Configure your settings
Manual Installation
For custom Shopify themes:
<!-- In checkout.liquid or cart.liquid -->
<script src="https://js.pelago.tech/shopify.js"></script>
<script>
Pelago.init({
publicKey: '{{ shop.metafields.pelago.public_key }}',
buttonSelector: '#pelago-checkout-button'
});
</script>
<button id="pelago-checkout-button">
Pay with Crypto
</button>
Configuration
Dashboard Settings
In the Pelago Shopify app settings:
| Setting | Description |
|---|---|
| API Key | Your Pelago public key |
| Merchant Wallet | Crypto wallet for payments |
| Networks | Enabled blockchain networks |
| Currencies | Accepted cryptocurrencies |
| Checkout Mode | Redirect or embedded |
Theme Customization
/* Customize the Pelago button */
#pelago-checkout-button {
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
color: white;
padding: 12px 24px;
border-radius: 8px;
font-weight: 600;
}
Payment Flow
Order Fulfillment
Orders paid via Pelago are automatically:
- Marked as Paid in Shopify
- Tagged with
pelago-payment - Updated with transaction hash in notes
Webhooks
The Shopify app automatically handles:
payment.completed→ Mark order paidpayment.failed→ Notify customerpayment.refunded→ Process Shopify refund
Customization
Custom Checkout Button
{% if settings.pelago_enabled %}
<div class="pelago-payment-option">
<h4>Pay with Crypto</h4>
<p>Fast, secure crypto payments via Pelago</p>
<button
id="pelago-pay"
data-amount="{{ cart.total_price | money_without_currency }}"
data-currency="{{ cart.currency.iso_code }}"
>
<img src="https://assets.pelago.tech/icons/crypto.svg" alt="Crypto" />
Pay {{ cart.total_price | money }}
</button>
</div>
{% endif %}
Multi-Currency Support
// Auto-detect customer currency
Pelago.init({
publicKey: PELAGO_PUBLIC_KEY,
currency: Shopify.currency.active,
cryptocurrency: 'USDC',
network: 'stellar'
});
Testing
Sandbox Mode
Enable sandbox in app settings:
- Go to Settings → Development
- Toggle Sandbox Mode
- Use test API keys
Test Orders
Create test orders using Shopify's test payment gateway, then select Pelago at checkout.
Troubleshooting
Button Not Appearing
- Check theme compatibility
- Verify API key is correct
- Check browser console for errors
Orders Not Updating
- Verify webhook URL in app settings
- Check Shopify permissions
- Review webhook logs in Pelago dashboard