Why Payhip? Architectural Strengths
Direct Payouts
Revenues deposit immediately into your connected Stripe, PayPal, Paystack, or Mercado Pago account without platform holding holds.
Automated EU/UK VAT
Payhip acts as the Merchant of Record, validating B2B EU VAT numbers and remitting taxes to HMRC and EU OSS.
Universal Embeds
Embed seamless modal checkouts, slide-out drawer carts, or PWYW inputs on any external website using payhip.js.
License Key API v2
Issue autogenerated or uploaded license keys and verify/activate seats programmatically using scoped secret keys.
Secure Webhooks
Receive immediate notifications on purchases, refunds, and subscription changes verified via SHA-256 signatures.
Anti-Piracy PDF Stamping
Automatically stamps customer email addresses and order timestamps across digital book pages.
Quick Start: Embedding Payhip Checkout
Include the lightweight loader script in your HTML <head>:
<!-- Load Payhip client runtime -->
<script type="text/javascript" src="https://payhip.com/payhip.js"></script>
Add a seamless checkout button:
<a href="https://payhip.com/b/BaFxk"
class="payhip-buy-button"
data-product="BaFxk"
data-theme="none">
Buy Modern Masterclass ($49)
</a>
Pro Tip: Setting data-theme="none" disables default button styling so you can style the anchor with your own CSS or Tailwind utility classes.
Direct Checkout Links & Metadata Passthrough
Direct checkout links skip product landing pages and send buyers straight to payment:
https://payhip.com/buy?link=BaFxk
You can forward up to 20 custom metadata key-value pairs directly to your webhooks:
https://payhip.com/buy?link=BaFxk&metadata[user_id]=usr_9841&metadata[campaign]=summer_sale
Webhook Signature Verification
Payhip signs webhook payloads using SHA-256 over your secret API Key: SHA-256(API_KEY).
const express = require('express');
const crypto = require('crypto');
const app = express();
app.use(express.json());
app.post('/webhooks/payhip', (req, res) => {
const { signature, type, email, price, items } = req.body;
const expectedSignature = crypto
.createHash('sha256')
.update(process.env.PAYHIP_API_KEY)
.digest('hex');
// Verify signature safely
if (!crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expectedSignature))) {
return res.status(401).send('Unauthorized');
}
// Acknowledge immediately with 200 OK
res.status(200).json({ received: true });
if (type === 'paid') {
console.log(`Order paid: $${price / 100} by ${email}`);
// Unlock customer access in database
}
});
Software License Keys API (v2)
Verify licenses and track seat activations using your scoped product-secret-key:
curl -X GET "https://payhip.com/api/v2/license/verify?license_key=WTKP4-66NL5-HMKQW-GFSCZ" \
--header "product-secret-key: YOUR_PRODUCT_SECRET_KEY"
Response on success:
{
"data": {
"enabled": true,
"product_link": "BaFxk",
"license_key": "WTKP4-66NL5-HMKQW-GFSCZ",
"buyer_email": "developer@example.com",
"uses": 1,
"date": "2026-09-14T10:15:00+00:00"
}
}
Frequently Asked Questions (FAQ)
How does Payhip calculate and remit EU/UK VAT?
Payhip acts as the Merchant of Record for digital services. It identifies buyer locations, charges destination VAT rates, verifies B2B EU VAT numbers for reverse charge, and remits taxes to tax authorities directly.
What payment gateways can I connect?
You can connect Stripe (credit/debit cards, Apple Pay, Google Pay, iDEAL), PayPal (PayPal balance, Pay in 4), Paystack (for African markets), and Mercado Pago (for Latin America).
Can I install this skill into my local agent workflow?
Yes! Clone the repository into ~/.agents/skills/payhip (for Google Antigravity) or ~/.claude/skills/payhip (for Claude Code). Your AI assistant will immediately gain full mastery of Payhip.