Documentation
Learn how to integrate ShopInYourCoin into your website to boost sales with localized currency prices.
Frontend Integration
Integrate ShopInYourCoin into your frontend to automatically display prices in your customers' local currency.
Step 1: Add the ShopInYourCoin Script
Add our script to your website's HTML to enable automatic currency conversion.
<script src="https://cdn.shopinyourcoin.com/js/converter.min.js"
data-api-key="YOUR_PUBLIC_API_KEY"></script>Add this script to the <head> section of your HTML. Make sure to use a PUBLIC API key.
Step 2: Mark Price Elements
Add data attributes to your price elements to enable automatic conversion.
<span data-siyc-price="49.99" data-siyc-currency="USD">$49.99</span>
The script will automatically detect the user's location via /api/public/localize and convert the price to their local currency.
Step 3: Initialize the Converter
Initialize the converter with your configuration options.
<script>
document.addEventListener('DOMContentLoaded', function() {
ShopInYourCoin.init({
selector: '[data-siyc-price]',
roundPrices: true,
showOriginalPrice: true,
refreshRate: 3600 // Update rates every hour
});
});
</script>Code Generator
Generate code for your specific implementation.
<script src="https://cdn.shopinyourcoin.com/js/converter.min.js"
data-api-key="YOUR_PUBLIC_API_KEY"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
ShopInYourCoin.init({
selector: '[data-siyc-price]',
defaultCurrency: 'USD',
roundPrices: true,
showOriginalPrice: true
});
});
</script>