Developer-First Payment Infrastructure
MAGNETPAY's payment API is built by developers, for developers. RESTful design, comprehensive webhooks, idempotent operations, and SDKs in 6 languages make integrating payments as straightforward as any modern API.
Key capabilities
RESTful API Design
Predictable, resource-oriented URLs with standard HTTP methods. JSON request/response bodies, consistent error formats, and pagination across all endpoints.
Webhook Events
Real-time event notifications for 50+ event types. HMAC-SHA256 signed payloads, automatic retries with exponential backoff, and a searchable event log for debugging.
Idempotency Keys
Every mutating endpoint supports idempotency keys to safely retry requests without duplicate side effects. Critical for payment operations where network failures happen.
Sandbox & Live Modes
Separate sandbox and live environments with isolated API keys. Test your full integration with simulated payment flows before going to production. No real money moves in sandbox.
SDKs & Libraries
Official SDKs for Node.js, Python, Go, Ruby, PHP, and Java. Type-safe clients with auto-generated models, built-in retries, and idempotency key management.
Rate Limiting & Quotas
Transparent rate limits with headers on every response. Burst-friendly limits for payment operations. Automatic backpressure with Retry-After headers for graceful degradation.
How it works
Get API Keys
Sign up and receive sandbox API keys instantly. Your sandbox environment mirrors production with simulated payment flows for cards, crypto, and payouts.
Install an SDK
Choose your language and install the official SDK. Every SDK provides typed models, automatic retries, webhook verification helpers, and idempotency key management.
Build & Test in Sandbox
Develop your integration against the sandbox API. Use test card numbers, simulated crypto deposits, and webhook testing tools to validate every flow.
Go Live
Switch to live API keys when ready. The same code works in both environments. Our onboarding team reviews your integration for best practices before launch.
Quick start example
1import MagnetPay from '@magnetpay/node';23const magnetpay = new MagnetPay('sk_live_...');45// Create a payment intent with idempotency6const payment = await magnetpay.paymentIntents.create({7 amount: 4999,8 currency: 'usd',9 customer: 'cus_9f3kR2xL',10}, { idempotencyKey: 'order_abc123' });1112// Verify a webhook signature13app.post('/webhooks/magnetpay', (req, res) => {14 const event = magnetpay.webhooks.verify(15 req.body, req.headers['magnetpay-signature'], 'whsec_...'16 );17 res.json({ received: true });18});
Frequently asked questions
Start Building with MAGNETPAY
Get your API keys in 30 seconds. Full sandbox access, interactive documentation, and SDKs in 6 languages. No credit card required to start.