Google Sheet Extension
PDF to Pass
Image to Pass
QR Code Generator
Barcode Generator
Configure your custom pass share url
Custom share URLs are available on Small Business and Enterprise plans. Upgrade to customize your pass share experience.
Set a custom URL where your pass will be displayed to users
This URL will be used to display the pass to your users for adding it to wallet
Enable SDK integration to allow passes to be added directly from your website
Follow these steps to integrate the AddToWallet widget into your website.
Paste this script tag into the <head> section of your website's HTML file. This will load the AddToWallet SDK.
<script src="https://app.addtowallet.co/lib/addtowallet-sdk-minified-v1.0.0.js"></script>Place this div element where you want the wallet card to appear on your page. The SDK will use this container to render the widget.
<div id="add-to-wallet-container"></div>Add this script to the end of your <body> tag. This will create a new wallet widget and mount it to the container you created in the previous step.
<script>
document.addEventListener("DOMContentLoaded", function() {
// Create a new wallet widget
const widget = new AddToWalletSDK.create(
"add-to-wallet-container",
"your-pass-slug-here",
{
// Add any additional options here
}
);
});
</script>
The AddToWalletWidget supports the following options to customize its appearance and behavior:
{
// Dimensions and Styling
width: "100%", // Width of the widget
height: "600px", // Height of the widget
borderRadius: "12px", // Border radius of the widget
boxShadow: "0 4px 20px rgba(0, 0, 0, 0.1)", // Box shadow for the widget
minHeight: "400px", // Minimum height of the widget
maxHeight: "800px", // Maximum height of the widget
padding: "0px", // Padding inside the widget
margin: "0px", // Margin around the widget
zIndex: 1000, // Z-index of the widget
// Spinner Options
showSpinner: false, // Show a spinner while loading
spinnerColor: "#007AFF", // Color of the spinner
spinnerSize: "40px", // Size of the spinner
// Behavior and Callbacks
retryAttempts: 3, // Number of retry attempts on failure
retryDelay: 2000, // Delay between retry attempts (in ms)
timeout: 30000, // Timeout for loading the widget (in ms)
onLoad: () => console.log("Widget loaded"), // Callback when the widget loads
onError: (error) => console.error("Widget error:", error), // Callback on error
onWalletClick: (wallet) => console.log("Wallet clicked:", wallet), // Callback when a wallet is clicked
onResize: (dimensions) => console.log("Widget resized:", dimensions), // Callback when the widget is resized
onRetry: (attempt) => console.log("Retrying attempt:", attempt), // Callback on retry
logEvent: (eventName, eventData) => console.log("Event:", eventName, eventData), // Callback for logging events
}