PayPal (custom form)
Custom order form that triggers PayPal.
Keys required. Create a site in the dashboard and copy your site key (HTML) and secret key (server). Replace
sq_live_your_key in the snippets below.
How this integration works
Same three steps as every other platform — only the paste location and server hook change.
| Step | What you do for PayPal (custom form) |
|---|---|
| 1 | Load squeaker.js once on pages with the form. |
| 2 | Widget before PayPal button; verify on server before creating PayPal order. |
| 3 | Verify squeaker-token on your server before saving or forwarding the submission. |
Where to put the widget
Widget before PayPal button; verify on server before creating PayPal order.
Recommended settings
| Setting | Value |
|---|---|
| Widget mode | Interactive — User clicks to verify — sign-up, checkout |
| Form ID | #order-form |
| Server verify | Node.js, PHP |
Copy-paste snippet
Paste into your PayPal (custom form) form or template. Load squeaker.js once per page.
<!-- Widget before PayPal button; verify on server before creating PayPal order. --> <squeaker-widget data-sitekey="sq_live_your_key" data-api="https://api.squeaker.cc/v1" data-mode="interactive" data-theme="light" ></squeaker-widget> <!-- Load squeaker.js once per page --> <script src="https://cdn.squeaker.cc/squeaker.js" async defer></script> <!-- Verify squeaker-token on your server before processing the form -->
Server verification
Read squeaker-token from the request and POST to /v1/verify with your secret key.
Full reference: Server verify docs.
// In your form handler — no npm package required
const apiUrl = process.env.SQUEAKER_API_URL ?? 'https://api.squeaker.cc/v1';
const token = req.body['squeaker-token'];
if (!token) return res.status(400).json({ error: 'Missing token' });
const verifyRes = await fetch(`${apiUrl}/verify`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
secret: process.env.SQUEAKER_SECRET,
token,
remoteip: req.ip,
}),
});
const result = await verifyRes.json();
if (!result.success) {
return res.status(403).json({ error: result.error ?? 'Invalid token' });
}
// Token valid — process the form Open setup generator with PayPal (custom form) pre-selected · Browse all platforms