Accept Payments Securely
with Magpie Components
A powerful, drop-in payment card tokenization SDK. Stripe-compatible API, PCI-compliant by design, and easy to integrate into any web application.
Quick Start
Get up and running in under 2 minutes
<!-- 1. Include the Magpie SDK --> <script src="https://components.magpie.im/sdk/magpie.js"></script> <!-- 2. Add a container for the card element --> <div id="card-element"></div> <script> // 3. Initialize Magpie with your public key const magpie = new Magpie('pk_test_your_key_here'); // 4. Create and mount the card element const elements = magpie.elements(); const card = elements.create('card'); card.mount('#card-element'); // 5. Create a payment source const {source, error} = await card.createSource({ name: 'John Doe' }); </script>
How It Works
Three simple steps to secure payment collection
Embed the SDK
Include our lightweight JavaScript SDK on your checkout page. No server-side dependencies required.
Collect Card Data
Card details are entered in a secure iframe. Sensitive data never touches your servers.
Get a Token
Receive a secure token to process payments on your backend. PCI compliance simplified.
Built for Developers
Everything you need to accept payments securely
PCI Compliant
Card data is collected in a secure iframe, never touching your servers. Reduces PCI compliance scope significantly.
Drop-in Compatible
API designed to be compatible with Stripe Elements. Migrate existing integrations with minimal code changes.
Fully Customizable
Style the payment form to match your brand. Support for custom fonts, colors, and themes.
Real-time Validation
Built-in card validation with real-time feedback. Detect card types, validate expiry dates, and more.
Framework Agnostic
Works with vanilla JavaScript, React, Vue, Angular, or any modern framework. Examples included.
Secure by Default
Built with security best practices. Supports CSP, SRI, HTTPS-only, and more.
Live Examples
See Magpie Components in action with different styles and frameworks
🚀 Interactive Demo Website
Explore our fully interactive examples and see Magpie Components in action
Visit components.magpie.asia ↗Basic Integration
Simple single-field card element with minimal styling.
BeginnerStripe Style
Familiar Stripe-inspired design with floating labels.
PopularKitschy Design
Colorful, playful design with custom styling.
CreativeBrutalist
Bold, minimalist design with sharp edges.
ModernComplete Checkout
Full checkout form with billing details and validation.
AdvancedFrequently Asked Questions
Everything you need to know about Magpie Components
Ready to Get Started?
Start accepting payments in minutes