Accept USDC payments. No signup required.
Your paywall link:
Widget snippet (add to your page):
Add this widget to every premium article on your site. Users who subscribe will have access to all of them!
Copy this code to each premium page:
How it works:
Complete guide to paywalls, subscriptions, and API integration
Our REST API works with any CMS. Generate a key, POST content, embed the widget.
const res = await fetch('/api/v1/paywalls', { method: 'POST', headers: { 'X-API-Key': key }, body: JSON.stringify({ title: 'Premium Article', priceUSD: 2.99, embedContent: html }) });
If your file requires authentication (private S3 bucket, API-protected endpoint), you can add a custom header:
Authorization: Bearer your-tokenX-API-Key: your-api-keyAuthorization: Basic base64encoded⚠️ The auth header is encrypted in the paywall URL. Only our server can decrypt it to fetch your file.
Before paying, buyers can verify the file exists:
Perfect for premium articles, tutorials, or any HTML content:
After creating an embed paywall, you get a snippet like this:
<script src="https://paywalled.xyz/widget.js"></script>
<div class="wallify-paywall"
data-slug="YOUR_SLUG"
data-title="Premium Article"
data-price="2.99">
</div>
The widget replaces itself with the paywall UI, and then with content after payment.
When a user subscribes, they receive a token like sub_abc123...
Two-step process:
When viewing any paywalled article:
Your API key is bound to your wallet - all paywalls pay to that wallet:
curl -X POST https://paywalled.xyz/api/v1/generate-key \
-H "Content-Type: application/json" \
-d '{"walletAddress": "0xYourWallet..."}'
# Response:
{
"success": true,
"apiKey": "YOUR_API_KEY",
"walletAddress": "0xyourwallet..."
}
curl -X POST https://paywalled.xyz/api/v1/paywalls \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Premium Article",
"priceUSD": 2.99,
"embedContent": "<h1>Your premium content</h1><p>HTML here...</p>"
}'
# Response:
{
"success": true,
"slug": "abc123...",
"paywallUrl": "https://paywalled.xyz/pay/abc123",
"widgetSnippet": "<script src='https://paywalled.xyz/widget.js'></script>..."
}
Add this to your theme's functions.php:
// Step 1: Add the Wallify widget script to your header
add_action('wp_head', function() {
echo '<script src="https://paywalled.xyz/widget.js"></script>';
});
// Step 2: Create a shortcode for paywalled content
function wallify_paywall_shortcode($atts, $content = null) {
$atts = shortcode_atts([
'title' => get_the_title(),
'price' => '2.99',
], $atts);
// Your API key (store securely, e.g., in wp-config.php)
$api_key = defined('WALLIFY_API_KEY') ? WALLIFY_API_KEY : '';
if (empty($api_key)) {
return '<p>Wallify not configured</p>';
}
// Create paywall via API
$response = wp_remote_post('https://paywalled.xyz/api/v1/paywalls', [
'headers' => [
'X-API-Key' => $api_key,
'Content-Type' => 'application/json',
],
'body' => json_encode([
'title' => $atts['title'],
'priceUSD' => floatval($atts['price']),
'embedContent' => do_shortcode($content),
]),
]);
if (is_wp_error($response)) {
return '<p>Error creating paywall</p>';
}
$result = json_decode(wp_remote_retrieve_body($response), true);
if (!isset($result['slug'])) {
return '<p>Error: ' . ($result['error'] ?? 'Unknown') . '</p>';
}
// Return the widget div
return sprintf(
'<div class="wallify-paywall" data-slug="%s" data-title="%s" data-price="%s"></div>',
esc_attr($result['slug']),
esc_attr($atts['title']),
esc_attr($atts['price'])
);
}
add_shortcode('wallify', 'wallify_paywall_shortcode');
[wallify price="4.99" title="Premium Guide"] <h2>This is premium content</h2> <p>Only visible after payment...</p> [/wallify]
define('WALLIFY_API_KEY', 'your-api-key-here');
https://paywalled.xyz/api/v1/generate-key
Generate an API key for your wallet
{"walletAddress": "0x..."}
https://paywalled.xyz/api/v1/paywalls
Create a new paywall (requires X-API-Key header)
{"title": "...", "priceUSD": 2.99, "embedContent": "<html>..."}
https://paywalled.xyz/api/paywall-info/:slug
Get paywall metadata (title, price, publisher)
https://paywalled.xyz/api/subscribe/verify
Verify a subscription token
{"slug": "...", "token": "sub_..."}