Payhip Expert Skill
A complete reference and operational guide for selling digital goods, courses, memberships, physical products, and coaching on Payhip based on the official Payhip Help Center and Developer APIs.
Table of Contents
- Platform Overview & Core Architecture
- Product Setup & Monetization Models
- Storefront Embeds &
payhip.js SDK
- Direct Checkout Links & Metadata
- Public API & Software License Keys
- Webhooks & Real-Time Event Handling
- Payment Gateways & Direct Payouts
- EU/UK VAT & Global Sales Tax
- Marketing, Affiliates & Growth Engines
- Troubleshooting & Best Practices
1. Platform Overview & Core Architecture
Payhip is an e-commerce platform designed for creators, software developers, educators, and merchants. Key architectural highlights:
- Instant Direct Payouts: Unlike marketplaces that hold merchant balances for weeks, payments process directly into your connected Stripe, PayPal, Paystack, or Mercado Pago accounts.
- Built-in Merchant of Record for EU/UK VAT: Automatically calculates, collects, and remits digital EU and UK VAT to tax authorities without extra merchant paperwork.
- Tiered Pricing Structure:
- Free Forever: $0/month + 5% transaction fee (+ standard gateway processing fees).
- Plus: $29/month + 2% transaction fee.
- Pro: $99/month + 0% transaction fee.
- Zero-Storage/Bandwidth Restrictions: Generous file size allowances (up to 5GB per file, multiple files per product).
2. Product Setup & Monetization Models
Payhip supports 7 distinct product types:
A. Digital Products & Downloads
- File Distribution: Upload e-books, software, audio, presets, templates, or archives up to 5GB.
- PDF Stamping: Protects digital books by automatically stamping buyer details (buyer email, order date) onto PDF pages to deter piracy.
- Download Limits: Restrict download attempts per customer (e.g., maximum 3 downloads) and set link expiry windows.
- Variants: Deliver different files based on options selected (e.g., EPUB vs. MOBI vs. PDF, Standard vs. Extended License).
B. Courses
- Curriculum Architecture: Sections, lessons, video hosting, downloadable resources, assignments, and quizzes.
- Video Player: High-performance, anti-piracy video player with adaptive bitrate streaming.
- Drip Content: Release lessons on specific dates or X days after enrollment.
- Prerequisites & Certificates: Lock advanced lessons until prior quizzes/sections are completed; award branded completion certificates.
C. Memberships & Subscriptions
- Flexible Tiers: Multiple membership levels with monthly, annual, or custom recurring intervals.
- Content Gating: Restrict posts, video streams, downloads, or Discord communities to active subscribers.
- Trial Periods & Setup Fees: Configure free trials (e.g., 7 or 14 days) or upfront initiation fees.
D. Software & License Keys
- Two Generation Engines:
- Autogenerated: Payhip generates cryptographically unique keys for every order.
- Pre-generated: Upload up to 10,000 keys per batch (from your custom license server, Steam, etc.).
- License Enforcement: Verify activations and manage seat counts via Payhip v2 API.
E. Physical Products
- Inventory & SKU Management: Track stock levels per variant (sizes, colors).
- Shipping Rules: Configure flat-rate, weight-based, or country-specific shipping zones.
F. Coaching Services
- Client Onboarding: Intake questionnaires and client scheduling integrations (direct sync with Calendly or Zoom).
- Milestone Tracking: Manage 1-on-1 consultations, homework check-ins, and session files.
G. Bundles & Collections
- Group multiple standalone products into a discounted bundle with single-click checkout.
3. Storefront Embeds & payhip.js SDK
Integrate Payhip checkout into any website (WordPress, Webflow, Squarespace, Wix, Shopify, or custom static sites) using payhip.js.
Step 1: Include the Script
Add to the <head> of your website:
<script type="text/javascript" src="https://payhip.com/payhip.js"></script>
Step 2: Global Configuration
Configure cart drawer behavior and positions:
<script type="text/javascript">
window.PayhipConfig = {
enableCart: true,
cart: {
position: "top-right", // "top-right", "top-left", "bottom-left", "bottom-right"
launcherBackground: "#111827",
checkoutButtonBackground: "#2563eb"
}
};
</script>
Step 3: Embed Buttons & Triggers
Modal Checkout Button:
<!-- Opens seamless modal overlay -->
<a href="https://payhip.com/b/BaFxk"
class="payhip-buy-button"
data-product="BaFxk"
data-theme="none">
Buy Now
</a>
Add to Cart Button:
<a href="#"
class="payhip-add-to-cart-button"
data-product="BaFxk"
data-theme="none">
Add to Cart
</a>
Open Slide-Out Cart:
<button class="payhip-open-cart-button">
View Cart (<span class="payhip-cart-count">0</span>)
</button>
Pay What You Want (PWYW) Input:
<input type="number"
class="payhip-pwyw"
data-product="BaFxk"
placeholder="Name your price (min $5)"
min="5" />
Supported Data Attributes for Buy Buttons
| Attribute |
Type |
Description |
data-product |
string |
Unique product alphanumeric key (e.g. BaFxk). Can be comma-separated. |
data-theme |
string |
Button theme: "green", "blue", "grey", or "none" (for custom CSS). |
data-method |
string |
"overlay" (default modal), "fallback_window" (popup), or "inline". |
data-iframe-target |
string |
CSS selector for container when data-method="inline". |
data-success-callback |
string |
Name of window function invoked on successful transaction. |
data-close-callback |
string |
Name of window function invoked when checkout modal closes. |
data-success-url |
string |
Redirect URL after successful order. |
data-metadata |
string |
JSON string or encoded string passed directly to webhooks. |
data-subscription-plan |
string |
Specific tier plan ID for memberships. |
data-target-variant |
string |
Specific pre-selected variant key. |
4. Direct Checkout Links & Metadata
Skip product landing pages and send visitors straight to checkout or bundle checkout.
Single Product Direct Checkout:
https://payhip.com/buy?link=BaFxk
(If using a custom domain, use https://store.yourdomain.com/buy?link=BaFxk)
Multi-Product Cart Checkout:
https://payhip.com/buy?cart_links[]=BaFxk&cart_links[]=RGsF
Checkout URL Metadata (Passthrough to Webhooks):
Attach custom tracking parameters (such as user_id, referral_code, session_id) that Payhip passes directly into webhook payloads:
https://payhip.com/buy?link=BaFxk&metadata[user_id]=usr_94821&metadata[campaign]=summer_sale
- Max metadata pairs: 20 key-value pairs.
- Key limit: 40 characters (forbidden characters:
[, ], <, >).
- Value limit: 500 characters (forbidden characters:
<, >).
5. Public API & Software License Keys
Payhip provides a REST API for programmatic coupon management and license key verification.
API v2 Software License Keys
For software products, verify and manage activations securely without exposing merchant credentials.
1. Verify a License 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 (Success):
{
"data": {
"enabled": true,
"product_link": "BaFxk",
"license_key": "WTKP4-66NL5-HMKQW-GFSCZ",
"buyer_email": "customer@example.com",
"uses": 1,
"date": "2026-03-15T10:14:00+00:00"
}
}
2. Increase License Usage Count (Activation):
curl -X PUT "https://payhip.com/api/v2/license/usage" \
--header "product-secret-key: YOUR_PRODUCT_SECRET_KEY" \
-d "license_key=WTKP4-66NL5-HMKQW-GFSCZ"
3. Decrease License Usage Count (Deactivation):
curl -X PUT "https://payhip.com/api/v2/license/decrease" \
--header "product-secret-key: YOUR_PRODUCT_SECRET_KEY" \
-d "license_key=WTKP4-66NL5-HMKQW-GFSCZ"
4. Disable / Revoke a Key:
curl -X PUT "https://payhip.com/api/v2/license/disable" \
--header "product-secret-key: YOUR_PRODUCT_SECRET_KEY" \
-d "license_key=WTKP4-66NL5-HMKQW-GFSCZ"
6. Webhooks & Real-Time Event Handling
Subscribe to real-time store events from Account > Settings > Developer.
Event Types
paid: Fired whenever a customer completes a purchase or recurring charge.
refunded: Fired whenever a payment is fully or partially refunded.
subscription.created: Fired when a customer signs up for a recurring plan.
subscription.deleted: Fired when a subscription is cancelled or terminated.
Security & Signature Verification
Every webhook request includes a signature property in the JSON body. Verify it by computing the SHA-256 hash of your Payhip API Key:
signature == hash("sha256", API_KEY)
[!IMPORTANT]
The hash is computed on the secret API key alone (sha256(apiKey)), not an HMAC over the payload body.
Webhook Delivery Rules
- Your endpoint must return HTTP status code
200.
- If non-200 is returned, Payhip retries once an hour for up to 3 hours.
- Amounts and prices are in cents/pennies (e.g.,
$10.00 is represented as 1000).
7. Payment Gateways & Direct Payouts
Connect one or more payment gateways under Account > Settings > Payment Details:
- Stripe: Credit/debit cards, Apple Pay, Google Pay, iDEAL, Giropay, Bancontact, Sofort.
- PayPal: PayPal wallet, Pay in 4, PayPal Credit.
- Paystack: Leading African payment provider (Nigeria, Ghana, South Africa, Kenya).
- Mercado Pago: Latin American payment gateway (Brazil, Mexico, Colombia, Argentina, Chile).
Direct Deposit Benefit
Funds flow directly from customer to your merchant account immediately; Payhip deducts its platform fee (5% on Free, 2% on Plus, 0% on Pro) automatically at transaction time.
8. EU/UK VAT & Global Sales Tax
Under Account > Settings > Taxes:
Automatic EU & UK Digital VAT
- Payhip acts as the legal Seller/Merchant of Record for digital goods in the EU and UK.
- It identifies customer geolocation via IP and payment billing address.
- Computes the appropriate local VAT rate (e.g., 20% UK, 19% Germany, 21% Spain).
- Collects and remits VAT directly to HMRC and EU MOSS/One Stop Shop (OSS).
Pricing Strategies for Tax:
- Add VAT on top of price (Recommended): Customer pays
$10.00 + 20% VAT = $12.00. Your net revenue remains unchanged.
- Include VAT in price: Customer pays
$10.00 total; the tax is deducted from your earnings ($10 / 1.20 = $8.33 net).
9. Marketing, Affiliates & Growth Engines
Payhip includes comprehensive growth tooling built right into the platform:
- Coupons & Promotional Codes: Percentage or fixed discounts, expiry dates, redemption limits, or restriction to specific products.
- Affiliate System:
- Run your own affiliate network with custom percentage commissions.
- Set custom cookie duration (e.g., 30, 60, or 90 days).
- Public or private affiliate registration pages.
- Cross-Selling: Offer related add-ons with a discount when a user adds a product to cart.
- Upgrade Discounts / Upsells: Offer a higher-tier product at checkout when viewing a lower-tier product.
- Social Discounts: Automatically apply a discount if the buyer tweets or shares the product URL.
- Referral Programs: Incentivize existing customers with cash or credit when their friends purchase.
- Email Marketing Sync: Seamless auto-sync of customer emails with Mailchimp, ConvertKit, ActiveCampaign, Drip, AWeber, or GetResponse (supports GDPR double opt-in).
10. Troubleshooting & Best Practices
- Custom Domain Issues:
- Create a
CNAME record pointing to domains.payhip.com (for subdomains like store.example.com).
- For root domains (
example.com), create an A record pointing to Payhip's designated IP.
- SSL certificates generate automatically within 24 hours of DNS propagation.
- PayPal Checkout Blockers:
- Ensure the PayPal account is upgraded to a Business Account.
- Verify that your PayPal email is confirmed and API permissions are granted.
- Webhook Failures:
- Ensure your server returns a fast
200 OK response before processing asynchronous tasks.
- Check firewall or Cloudflare rules that might block Payhip's POST requests.
- License Key Depletion Alert:
- When selling pre-generated license keys, always enable "Limit the number of products sold" to match your uploaded inventory so buyers aren't issued blank keys.
References & Companion Files
- Detailed API & Webhook Specifications: api-webhooks.md
- Complete Embeds & JavaScript SDK Reference: embeds-sdk.md
- Tax & Compliance Rules: taxes-compliance.md
- Node.js Express Webhook Server: webhook-server.js
- Python License Key Validator: license-validator.py
1---2name: payhip3description: Expert guide and integration toolkit for Payhip e-commerce platform (help.payhip.com). Use when setting up or managing Payhip stores, products (digital downloads, courses, memberships, physical, coaching, bundles), custom domains, embed buttons/modals, direct checkout links, license keys API, webhooks, affiliate marketing, EU/UK VAT compliance, or building custom developer integrations with Payhip.4---56# Payhip Expert Skill78A complete reference and operational guide for selling digital goods, courses, memberships, physical products, and coaching on [Payhip](https://payhip.com) based on the official [Payhip Help Center](https://help.payhip.com/) and Developer APIs.910---1112## Table of Contents131. [Platform Overview & Core Architecture](#1-platform-overview--core-architecture)142. [Product Setup & Monetization Models](#2-product-setup--monetization-models)153. [Storefront Embeds & `payhip.js` SDK](#3-storefront-embeds--payhipjs-sdk)164. [Direct Checkout Links & Metadata](#4-direct-checkout-links--metadata)175. [Public API & Software License Keys](#5-public-api--software-license-keys)186. [Webhooks & Real-Time Event Handling](#6-webhooks--real-time-event-handling)197. [Payment Gateways & Direct Payouts](#7-payment-gateways--direct-payouts)208. [EU/UK VAT & Global Sales Tax](#8-euuk-vat--global-sales-tax)219. [Marketing, Affiliates & Growth Engines](#9-marketing-affiliates--growth-engines)2210. [Troubleshooting & Best Practices](#10-troubleshooting--best-practices)2324---2526## 1. Platform Overview & Core Architecture2728Payhip is an e-commerce platform designed for creators, software developers, educators, and merchants. Key architectural highlights:2930- **Instant Direct Payouts**: Unlike marketplaces that hold merchant balances for weeks, payments process directly into your connected Stripe, PayPal, Paystack, or Mercado Pago accounts.31- **Built-in Merchant of Record for EU/UK VAT**: Automatically calculates, collects, and remits digital EU and UK VAT to tax authorities without extra merchant paperwork.32- **Tiered Pricing Structure**:33 - **Free Forever**: $0/month + 5% transaction fee (+ standard gateway processing fees).34 - **Plus**: $29/month + 2% transaction fee.35 - **Pro**: $99/month + 0% transaction fee.36- **Zero-Storage/Bandwidth Restrictions**: Generous file size allowances (up to 5GB per file, multiple files per product).3738---3940## 2. Product Setup & Monetization Models4142Payhip supports 7 distinct product types:4344### A. Digital Products & Downloads45- **File Distribution**: Upload e-books, software, audio, presets, templates, or archives up to 5GB.46- **PDF Stamping**: Protects digital books by automatically stamping buyer details (buyer email, order date) onto PDF pages to deter piracy.47- **Download Limits**: Restrict download attempts per customer (e.g., maximum 3 downloads) and set link expiry windows.48- **Variants**: Deliver different files based on options selected (e.g., EPUB vs. MOBI vs. PDF, Standard vs. Extended License).4950### B. Courses51- **Curriculum Architecture**: Sections, lessons, video hosting, downloadable resources, assignments, and quizzes.52- **Video Player**: High-performance, anti-piracy video player with adaptive bitrate streaming.53- **Drip Content**: Release lessons on specific dates or X days after enrollment.54- **Prerequisites & Certificates**: Lock advanced lessons until prior quizzes/sections are completed; award branded completion certificates.5556### C. Memberships & Subscriptions57- **Flexible Tiers**: Multiple membership levels with monthly, annual, or custom recurring intervals.58- **Content Gating**: Restrict posts, video streams, downloads, or Discord communities to active subscribers.59- **Trial Periods & Setup Fees**: Configure free trials (e.g., 7 or 14 days) or upfront initiation fees.6061### D. Software & License Keys62- **Two Generation Engines**:63 - *Autogenerated*: Payhip generates cryptographically unique keys for every order.64 - *Pre-generated*: Upload up to 10,000 keys per batch (from your custom license server, Steam, etc.).65- **License Enforcement**: Verify activations and manage seat counts via Payhip v2 API.6667### E. Physical Products68- **Inventory & SKU Management**: Track stock levels per variant (sizes, colors).69- **Shipping Rules**: Configure flat-rate, weight-based, or country-specific shipping zones.7071### F. Coaching Services72- **Client Onboarding**: Intake questionnaires and client scheduling integrations (direct sync with Calendly or Zoom).73- **Milestone Tracking**: Manage 1-on-1 consultations, homework check-ins, and session files.7475### G. Bundles & Collections76- Group multiple standalone products into a discounted bundle with single-click checkout.7778---7980## 3. Storefront Embeds & `payhip.js` SDK8182Integrate Payhip checkout into any website (WordPress, Webflow, Squarespace, Wix, Shopify, or custom static sites) using `payhip.js`.8384### Step 1: Include the Script85Add to the `<head>` of your website:86```html87<script type="text/javascript" src="https://payhip.com/payhip.js"></script>88```8990### Step 2: Global Configuration91Configure cart drawer behavior and positions:92```html93<script type="text/javascript">94 window.PayhipConfig = {95 enableCart: true,96 cart: {97 position: "top-right", // "top-right", "top-left", "bottom-left", "bottom-right"98 launcherBackground: "#111827",99 checkoutButtonBackground: "#2563eb"100 }101 };102</script>103```104105### Step 3: Embed Buttons & Triggers106107#### Modal Checkout Button:108```html109<!-- Opens seamless modal overlay -->110<a href="https://payhip.com/b/BaFxk" 111 class="payhip-buy-button" 112 data-product="BaFxk" 113 data-theme="none">114 Buy Now115</a>116```117118#### Add to Cart Button:119```html120<a href="#" 121 class="payhip-add-to-cart-button" 122 data-product="BaFxk" 123 data-theme="none">124 Add to Cart125</a>126```127128#### Open Slide-Out Cart:129```html130<button class="payhip-open-cart-button">131 View Cart (<span class="payhip-cart-count">0</span>)132</button>133```134135#### Pay What You Want (PWYW) Input:136```html137<input type="number" 138 class="payhip-pwyw" 139 data-product="BaFxk" 140 placeholder="Name your price (min $5)" 141 min="5" />142```143144### Supported Data Attributes for Buy Buttons145| Attribute | Type | Description |146|-----------|------|-------------|147| `data-product` | `string` | Unique product alphanumeric key (e.g. `BaFxk`). Can be comma-separated. |148| `data-theme` | `string` | Button theme: `"green"`, `"blue"`, `"grey"`, or `"none"` (for custom CSS). |149| `data-method` | `string` | `"overlay"` (default modal), `"fallback_window"` (popup), or `"inline"`. |150| `data-iframe-target` | `string` | CSS selector for container when `data-method="inline"`. |151| `data-success-callback` | `string` | Name of window function invoked on successful transaction. |152| `data-close-callback` | `string` | Name of window function invoked when checkout modal closes. |153| `data-success-url` | `string` | Redirect URL after successful order. |154| `data-metadata` | `string` | JSON string or encoded string passed directly to webhooks. |155| `data-subscription-plan`| `string` | Specific tier plan ID for memberships. |156| `data-target-variant` | `string` | Specific pre-selected variant key. |157158---159160## 4. Direct Checkout Links & Metadata161162Skip product landing pages and send visitors straight to checkout or bundle checkout.163164### Single Product Direct Checkout:165```166https://payhip.com/buy?link=BaFxk167```168*(If using a custom domain, use `https://store.yourdomain.com/buy?link=BaFxk`)*169170### Multi-Product Cart Checkout:171```172https://payhip.com/buy?cart_links[]=BaFxk&cart_links[]=RGsF173```174175### Checkout URL Metadata (Passthrough to Webhooks):176Attach custom tracking parameters (such as `user_id`, `referral_code`, `session_id`) that Payhip passes directly into webhook payloads:177```178https://payhip.com/buy?link=BaFxk&metadata[user_id]=usr_94821&metadata[campaign]=summer_sale179```180- **Max metadata pairs**: 20 key-value pairs.181- **Key limit**: 40 characters (forbidden characters: `[`, `]`, `<`, `>`).182- **Value limit**: 500 characters (forbidden characters: `<`, `>`).183184---185186## 5. Public API & Software License Keys187188Payhip provides a REST API for programmatic coupon management and license key verification.189190### API v2 Software License Keys191For software products, verify and manage activations securely without exposing merchant credentials.192193#### 1. Verify a License Key:194```bash195curl -X GET "https://payhip.com/api/v2/license/verify?license_key=WTKP4-66NL5-HMKQW-GFSCZ" \196 --header "product-secret-key: YOUR_PRODUCT_SECRET_KEY"197```198**Response (Success):**199```json200{201 "data": {202 "enabled": true,203 "product_link": "BaFxk",204 "license_key": "WTKP4-66NL5-HMKQW-GFSCZ",205 "buyer_email": "customer@example.com",206 "uses": 1,207 "date": "2026-03-15T10:14:00+00:00"208 }209}210```211212#### 2. Increase License Usage Count (Activation):213```bash214curl -X PUT "https://payhip.com/api/v2/license/usage" \215 --header "product-secret-key: YOUR_PRODUCT_SECRET_KEY" \216 -d "license_key=WTKP4-66NL5-HMKQW-GFSCZ"217```218219#### 3. Decrease License Usage Count (Deactivation):220```bash221curl -X PUT "https://payhip.com/api/v2/license/decrease" \222 --header "product-secret-key: YOUR_PRODUCT_SECRET_KEY" \223 -d "license_key=WTKP4-66NL5-HMKQW-GFSCZ"224```225226#### 4. Disable / Revoke a Key:227```bash228curl -X PUT "https://payhip.com/api/v2/license/disable" \229 --header "product-secret-key: YOUR_PRODUCT_SECRET_KEY" \230 -d "license_key=WTKP4-66NL5-HMKQW-GFSCZ"231```232233---234235## 6. Webhooks & Real-Time Event Handling236237Subscribe to real-time store events from **Account > Settings > Developer**.238239### Event Types2401. `paid`: Fired whenever a customer completes a purchase or recurring charge.2412. `refunded`: Fired whenever a payment is fully or partially refunded.2423. `subscription.created`: Fired when a customer signs up for a recurring plan.2434. `subscription.deleted`: Fired when a subscription is cancelled or terminated.244245### Security & Signature Verification246Every webhook request includes a `signature` property in the JSON body. Verify it by computing the SHA-256 hash of your Payhip API Key:247```248signature == hash("sha256", API_KEY)249```250> [!IMPORTANT]251> The hash is computed on the secret API key alone (`sha256(apiKey)`), not an HMAC over the payload body.252253### Webhook Delivery Rules254- Your endpoint must return HTTP status code `200`.255- If non-200 is returned, Payhip retries once an hour for up to 3 hours.256- Amounts and prices are in **cents/pennies** (e.g., `$10.00` is represented as `1000`).257258---259260## 7. Payment Gateways & Direct Payouts261262Connect one or more payment gateways under **Account > Settings > Payment Details**:2632641. **Stripe**: Credit/debit cards, Apple Pay, Google Pay, iDEAL, Giropay, Bancontact, Sofort.2652. **PayPal**: PayPal wallet, Pay in 4, PayPal Credit.2663. **Paystack**: Leading African payment provider (Nigeria, Ghana, South Africa, Kenya).2674. **Mercado Pago**: Latin American payment gateway (Brazil, Mexico, Colombia, Argentina, Chile).268269### Direct Deposit Benefit270Funds flow directly from customer to your merchant account immediately; Payhip deducts its platform fee (5% on Free, 2% on Plus, 0% on Pro) automatically at transaction time.271272---273274## 8. EU/UK VAT & Global Sales Tax275276Under **Account > Settings > Taxes**:277278### Automatic EU & UK Digital VAT279- Payhip acts as the legal **Seller/Merchant of Record** for digital goods in the EU and UK.280- It identifies customer geolocation via IP and payment billing address.281- Computes the appropriate local VAT rate (e.g., 20% UK, 19% Germany, 21% Spain).282- Collects and remits VAT directly to HMRC and EU MOSS/One Stop Shop (OSS).283284### Pricing Strategies for Tax:2851. **Add VAT on top of price** (Recommended): Customer pays `$10.00 + 20% VAT = $12.00`. Your net revenue remains unchanged.2862. **Include VAT in price**: Customer pays `$10.00` total; the tax is deducted from your earnings (`$10 / 1.20 = $8.33 net`).287288---289290## 9. Marketing, Affiliates & Growth Engines291292Payhip includes comprehensive growth tooling built right into the platform:293294- **Coupons & Promotional Codes**: Percentage or fixed discounts, expiry dates, redemption limits, or restriction to specific products.295- **Affiliate System**:296 - Run your own affiliate network with custom percentage commissions.297 - Set custom cookie duration (e.g., 30, 60, or 90 days).298 - Public or private affiliate registration pages.299- **Cross-Selling**: Offer related add-ons with a discount when a user adds a product to cart.300- **Upgrade Discounts / Upsells**: Offer a higher-tier product at checkout when viewing a lower-tier product.301- **Social Discounts**: Automatically apply a discount if the buyer tweets or shares the product URL.302- **Referral Programs**: Incentivize existing customers with cash or credit when their friends purchase.303- **Email Marketing Sync**: Seamless auto-sync of customer emails with Mailchimp, ConvertKit, ActiveCampaign, Drip, AWeber, or GetResponse (supports GDPR double opt-in).304305---306307## 10. Troubleshooting & Best Practices3083091. **Custom Domain Issues**:310 - Create a `CNAME` record pointing to `domains.payhip.com` (for subdomains like `store.example.com`).311 - For root domains (`example.com`), create an `A` record pointing to Payhip's designated IP.312 - SSL certificates generate automatically within 24 hours of DNS propagation.3132. **PayPal Checkout Blockers**:314 - Ensure the PayPal account is upgraded to a **Business Account**.315 - Verify that your PayPal email is confirmed and API permissions are granted.3163. **Webhook Failures**:317 - Ensure your server returns a fast `200 OK` response before processing asynchronous tasks.318 - Check firewall or Cloudflare rules that might block Payhip's POST requests.3194. **License Key Depletion Alert**:320 - When selling pre-generated license keys, always enable **"Limit the number of products sold"** to match your uploaded inventory so buyers aren't issued blank keys.321322---323324## References & Companion Files325326- Detailed API & Webhook Specifications: [api-webhooks.md](file:///C:/Users/Admin/.agents/skills/payhip/references/api-webhooks.md)327- Complete Embeds & JavaScript SDK Reference: [embeds-sdk.md](file:///C:/Users/Admin/.agents/skills/payhip/references/embeds-sdk.md)328- Tax & Compliance Rules: [taxes-compliance.md](file:///C:/Users/Admin/.agents/skills/payhip/references/taxes-compliance.md)329- Node.js Express Webhook Server: [webhook-server.js](file:///C:/Users/Admin/.agents/skills/payhip/examples/webhook-server.js)330- Python License Key Validator: [license-validator.py](file:///C:/Users/Admin/.agents/skills/payhip/examples/license-validator.py)