Package Exports
- shieldpay-api-sdkjs
Readme
shieldpay-api-sdkjs
Official JavaScript/TypeScript SDK for the ShieldPay API.
Anti-spam, VPN blocking, email authentication, and PayPal payments — all in one package.
Install
npm install shieldpay-api-sdkjsQuick Start
import { ShieldPay } from 'shieldpay-api-sdkjs'
const sp = new ShieldPay({ apiKey: 'sk_live_YOUR_KEY' })
// All calls go to: https://fixle.ch/shieldpay/api/worker=sk_live_YOUR_KEY/...
// Create a PayPal payment
const order = await sp.payment.create({
amount: 49.99,
currency: 'CHF',
return_url: 'https://yoursite.com/success',
cancel_url: 'https://yoursite.com/cancel',
})
window.location.href = order.approve_url // redirect to PayPal
// After PayPal redirects back, capture
const captured = await sp.payment.capture(orderId)
// Check IP reputation (Pro: real IPQS check)
const ip = await sp.security.checkIp('1.2.3.4')
// Passwordless email auth for your users
const { token } = await sp.auth.createToken('user@email.com')
const { verified } = await sp.auth.verifyToken(token)API Endpoint
Your API key is embedded in the URL — no headers needed:
https://fixle.ch/shieldpay/api/worker=sk_live_YOUR_KEY/payment/create
https://fixle.ch/shieldpay/api/worker=sk_live_YOUR_KEY/security/check-ip
https://fixle.ch/shieldpay/api/worker=sk_live_YOUR_KEY/mePlans
| Feature | Free | Pro (1 CHF/mo) |
|---|---|---|
| PayPal payments | ✓ | ✓ |
| Transaction fee | 2% | 0% |
| VPN/Tor blocking | Basic | Full IPQS |
| Auto-fallback | ✗ | ✓ |
| Email alerts | ✗ | ✓ |
Docs
Full documentation: https://fixle.ch/shieldpay/SDK/docs/