Sendclap
Take card and crypto payments for a creator: look up a creator page, create and check a checkout, and with an API key read stats, payments, members and license keys. Flat 1% fee.
託管 MCP 伺服器
npx add-mcp 'https://sendclap.com/mcp'可安裝到 Claude Code、Codex、Cursor 等客戶端
文件
Sendclap API
Use the API to sell from your own site or app. You can create checkouts from your backend, find out when they are paid, and manage license keys inside the software you ship.
Base URL https://sendclap.com/api/v1
Requests and responses are JSON. Amounts are in US dollars, so 29 means $29.00. The SDKs for JavaScript, Python, Go, Rust,.NET, Swift and PHP wrap all of it.
SDKs
Official libraries wrap everything on this page, so you don't have to write the HTTP calls yourself. Each one has a license client you can ship inside your app (it needs no API key) and an API client for your server. The errors in each have the same codes, and the list calls follow pages for you.
Install
npm install sendclap
Check a license key in your app
import { LicenseClient, NetworkError, instanceName } from 'sendclap'
const licenses = new LicenseClient()
try {
const r = await licenses.validate(key, await instanceName())
if (!r.valid) lockApp(r.status) // "not_found", "disabled" (refunded or disputed) or "not_activated"
} catch (e) {
if (!(e instanceof NetworkError)) throw e // offline: allow a grace period
}
Use the API on your server
import { ApiClient } from 'sendclap'
const sendclap = new ApiClient(process.env.SENDCLAP_API_KEY)
const checkout = await sendclap.createCheckout({ type: 'product', product_id: 1, email: 'buyer@example.com' })
for await (const p of sendclap.allPayments({ status: 'paid' })) console.log(p.id, p.amount)
JavaScript on npm · README and full reference
Install
pip install sendclap
Check a license key in your app
from sendclap import LicenseClient, NetworkError, instance_name
try:
r = LicenseClient().validate(key, instance_name())
if not r.valid:
lock_app(r.status) # "not_found", "disabled" (refunded or disputed) or "not_activated"
except NetworkError:
pass # offline: allow a grace period
Use the API on your server
from sendclap import ApiClient
api = ApiClient("sc_your_key")
checkout = api.create_checkout("product", product_id=1, email="buyer@example.com")
for p in api.all_payments(status="paid"):
print(p["id"], p["amount"])
Python on PyPI · README and full reference
Install
go get github.com/backmeupplz/sendclap-sdk/go
Check a license key in your app
lc := sendclap.NewLicenseClient()
name, _ := sendclap.InstanceName()
v, err := lc.Validate(ctx, key, name)
switch {
case errors.Is(err, sendclap.ErrNetwork): // offline: allow a grace period
case err != nil: return err
case !v.Valid: lockApp(v.Status) // StatusNotFound, StatusDisabled or StatusNotActivated
}
Use the API on your server
api := sendclap.NewAPIClient(os.Getenv("SENDCLAP_API_KEY"))
c, err := api.CreateCheckout(ctx, sendclap.CheckoutParams{Type: "product", ProductID: 1, Email: "buyer@example.com"})
for p, err := range api.AllPayments(ctx, sendclap.PaymentFilter{Status: "paid"}) {
if err != nil { return err }
fmt.Println(p.ID, p.Amount)
}
Go on pkg.go.dev · README and full reference
Install
cargo add sendclap
Check a license key in your app
use sendclap::{Error, LicenseClient, ValidationStatus};
let name = sendclap::instance_name().unwrap_or_else(|| "my-app".into());
match LicenseClient::new().validate(&key, Some(&name)) {
Ok(v) if v.status != ValidationStatus::Active => lock_app(v.status), // NotFound, Disabled or NotActivated
Ok(_) => {}
Err(Error::Network(_)) => {} // offline: allow a grace period
Err(e) => return Err(e.into()),
}
Use the API on your server
use sendclap::{ApiClient, PaymentFilter};
let api = ApiClient::new(&std::env::var("SENDCLAP_API_KEY")?);
let filter = PaymentFilter { status: Some("paid".into()), ..Default::default() };
for payment in api.all_payments(&filter) {
println!("{}", payment?.amount);
}
Rust on crates.io · README and full reference
Install
dotnet add package Sendclap
Check a license key in your app
using Sendclap;
try {
var r = await new LicenseClient().ValidateAsync(key, LicenseClient.InstanceName());
if (!r.Valid) LockApp(r.Status); // NotFound, Disabled (refunded or disputed) or NotActivated
} catch (SendclapNetworkException) {
// offline: allow a grace period
}
Use the API on your server
var api = new ApiClient(Environment.GetEnvironmentVariable("SENDCLAP_API_KEY"));
var checkout = await api.CreateCheckoutAsync(new CheckoutParams { Type = "product", ProductId = 1, Email = "buyer@example.com" });
await foreach (var p in api.AllPaymentsAsync(status: "paid"))
Console.WriteLine($"{p.Id} {p.Amount}");
.NET on NuGet · README and full reference
Install
.package(url: "https://github.com/backmeupplz/sendclap-sdk", from: "0.5.0")
Check a license key in your app
import Sendclap
do {
let r = try await LicenseClient().validate(licenseKey: key, instanceId: LicenseClient.instanceName())
if !r.valid { lockApp(r.status) } // .notFound, .disabled (refunded or disputed) or .notActivated
} catch {
// offline: allow a grace period
}
Use the API on your server
let api = APIClient(apiKey: ProcessInfo.processInfo.environment["SENDCLAP_API_KEY"])
let checkout = try await api.createCheckout(CheckoutParams(type: "product", productId: 1, email: "buyer@example.com"))
for try await p in api.allPayments(status: "paid") { print(p.id, p.amount) }
Swift on GitHub · README and full reference
Install
composer require sendclap/sendclap
Check a license key in your app
use Sendclap\{LicenseClient, NetworkException};
try {
$r = (new LicenseClient())->validate($key, LicenseClient::instanceName());
if (!$r->valid) lockApp($r->status); // "not_found", "disabled" (refunded or disputed) or "not_activated"
} catch (NetworkException) {
// offline: allow a grace period
}
Use the API on your server
use Sendclap\ApiClient;
$api = new ApiClient(getenv('SENDCLAP_API_KEY'));
$checkout = $api->createCheckout(['type' => 'product', 'product_id' => 1, 'email' => 'buyer@example.com']);
foreach ($api->allPayments(['status' => 'paid']) as $p) echo $p['id'], ' ', $p['amount'], "\n";
PHP on Packagist · README and full reference
Never put your API key in an app you ship to customers. The license client is the part made for that. The source is on GitHub, under the MIT license.
For AI agents
Sendclap is built so that software can pay creators as easily as people can. There are three ways in, and none of them needs a browser.
| Field | Type | Description |
|---|---|---|
x402 | pay | An agent with a wallet requests a URL, receives the price, and pays in USDC on Base in the same HTTP exchange. No account and no API key. |
MCP | tools | Connect an assistant to https://sendclap.com/mcp to look up creators, start checkouts and read your own payments. |
REST | data | Plain JSON endpoints for everything a creator can see in the dashboard. |
A machine-readable summary of the whole product lives at /llms.txt.
Pay with x402
GET https://sendclap.com/x402/{handle}/tip?amount=5
GET https://sendclap.com/x402/{handle}/products/{id}?email=…
GET https://sendclap.com/x402/{handle}/memberships/{id}?email=…
x402 is the open standard that puts payments on HTTP status 402. Request one of these URLs and the server answers 402 Payment Required with the price in a PAYMENT-REQUIRED header. Your client signs a USDC transfer for that amount and repeats the request with a PAYMENT-SIGNATURE header. The USDC moves straight from your wallet to the creator's, and the reply carries the result and a PAYMENT-RESPONSE header with the transaction.
| Field | Type | Description |
|---|---|---|
amount | number | Tip amount in US dollars, from 1 to 10000. Defaults to the creator's suggested tip. |
email | string | Where to send the receipt. Required for products and memberships, because that is where the purchase is delivered and who the membership belongs to. |
period | string | Memberships only, optional: month or year. It must match the tier's own interval. |
message | string | An optional note that appears on the creator's page with the tip. |
1 · Ask for the price
curl -i "https://sendclap.com/x402/demo/tip?amount=1"
Response · 402
HTTP/2 402
payment-required: eyJ4NDAyVmVyc2lvbiI6Mi…
{
"x402Version": 2,
"error": "PAYMENT-SIGNATURE header is required",
"resource": { "url": "https://sendclap.com/x402/demo/tip?amount=1", "description": "A $1 tip for Ada Builds", "mimeType": "application/json" },
"accepts": [{
"scheme": "exact", "network": "eip155:8453", "amount": "1000000",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"payTo": "0x…the creator's split address", "maxTimeoutSeconds": 120,
"extra": { "name": "USD Coin", "version": "2" }
}]
}
2 · Pay and repeat, with any x402 client
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch"
import { ExactEvmScheme } from "@x402/evm"
import { privateKeyToAccount } from "viem/accounts"
const account = privateKeyToAccount(process.env.AGENT_KEY)
const pay = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: "eip155:*", client: new ExactEvmScheme(account) }],
})
const res = await pay("https://sendclap.com/x402/demo/tip?amount=1")
console.log(await res.json())
Response · 200
{
"paid": true, "amount": 1, "currency": "usd", "to": "demo",
"payer": "0x…", "transaction": "0x…", "network": "eip155:8453",
"message": "Thank you from Ada Builds!"
}
The official client refuses any payment above $1 unless you raise its spendControls.maxAmountPerPayment, which is a sensible guard to keep on an agent.
Buying a product the same way returns its license_key and download_url in the reply. Paying for a membership buys one period of the tier (a month or a year) for that email and returns active_until, plus license_key when the tier includes one. x402 can't take recurring payments, so the membership doesn't renew by itself: pay again to extend it, and the new period starts when the current one ends rather than from today. Payments over x402 use the exact scheme with USDC on Base, and they cost the same flat 1% as everything else. The payTo address is the creator's own split address, a small public contract that forwards 99% to the creator's wallet and 1% to Sendclap and can do nothing else. A creator needs a wallet address in their settings to be payable this way, and looking up a creator tells you whether they are.
MCP server
POST https://sendclap.com/mcp
The Model Context Protocol server gives an AI assistant Sendclap as a set of tools. It speaks MCP over HTTP and keeps no session. Without a key, an assistant can look up any creator and start a checkout for someone to pay. With a creator's API key it can also answer questions about that creator's payments, members, license keys and disputes.
Add it to an MCP client
{
"mcpServers": {
"sendclap": {
"type": "http",
"url": "https://sendclap.com/mcp",
"headers": { "Authorization": "Bearer sc_your_key" }
}
}
}
| Field | Type | Description |
|---|---|---|
get_creator | public | Look up a Sendclap page: who the creator is, their membership tiers and products with prices, and every way to pay them, including an x402 URL for the tip, each product and each membership tier that an agent can pay directly with USDC. |
create_checkout | public | Start a payment to a creator and get a checkout URL for a person to open and pay. Use type "tip" with an amount in US dollars, "product" with a product_id, or "membership" with a tier_id and the payer's email. A subscription product (one with an interval) also needs the email. |
get_checkout | public | Check whether a checkout created with create_checkout has been paid. |
get_stats | needs key | Your earnings on Sendclap: payments and income for the last 30 days and all time, active members, monthly recurring income and open disputes. |
list_payments | needs key | Your most recent payments, newest first. Filter by status (paid, disputed, lost, refunded), type (tip, product, membership) or customer email. Returns { data, has_more, next }; pass next as after for the following page. |
get_payment | needs key | One payment in full: what was sold, the purchase IP and device, any dispute, and the customer's activity log that serves as dispute evidence. |
list_members | needs key | Your members with their tier, status and when their current period ends. Returns { data, has_more, next }; pass next as after for the following page. |
list_licenses | needs key | License keys you have issued, with how many devices each is activated on. Optionally only for one customer email. Returns { data, has_more, next }; pass next as after for the following page. |
list_disputes | needs key | Card disputes on your payments, with their status and the date to respond by. Returns { data, has_more, next }; pass next as after for the following page. |
Authentication
Create an API key on your dashboard and send it as a bearer token with every checkout request. The key is shown once, and creating a new one stops the old one from working, so keep it on your server and out of client-side code.
Header
Authorization: Bearer sc_your_key
The license endpoints need no key, which lets you call them straight from the app your customers run.
Create a checkout
POST /checkouts
Creates a checkout and returns a url. Send your customer to that address to pay, and they will land on a thank-you page when they finish.
| Field | Type | Description |
|---|---|---|
type | string | What is being paid for: tip, product or membership. Required. |
amount | number | The tip amount in US dollars, from 1 to 10000. Required for a tip. |
product_id | number | The product to sell. Required for a product. A subscription product (one with an interval) starts a subscription, so its checkout comes back with type: "membership". |
tier_id | number | The membership tier to join. Required for a membership. |
email | string | The customer's email, used for the receipt and delivery. Required for a membership and a subscription product. |
method | string | card, which is the default, or crypto. |
message | string | An optional note from the customer, up to 500 characters. |
Telegram Wallet. When the creator has added a TON address, the crypto checkout page also lets the customer pay in USDT on TON from Telegram Wallet or any TON wallet, with the same 1% fee. TON can't take recurring payments, so a membership paid that way buys one period and is extended by paying again. payment_methods.ton in the creator lookup says whether a creator takes it.
Request
curl https://sendclap.com/api/v1/checkouts \
-H "Authorization: Bearer sc_your_key" \
-H "Content-Type: application/json" \
-d '{"type": "product", "product_id": 1, "email": "buyer@example.com"}'
Response · 201
{
"id": "0x4f1c…",
"status": "pending",
"type": "product",
"amount": 29,
"currency": "usd",
"method": "card",
"email": "buyer@example.com",
"url": "https://sendclap.com/checkout/0x4f1c…",
"paid_at": null
}
Retrieve a checkout
GET /checkouts/{id}
Returns the checkout with the same url as when it was created. Its status is pending until the payment goes through and paid afterwards, with paid_at set to when the payment arrived, so you can poll this endpoint before you deliver an order.
Request
curl https://sendclap.com/api/v1/checkouts/0x4f1c… \
-H "Authorization: Bearer sc_your_key"
Response · 200
{
"id": "0x4f1c…",
"status": "paid",
"type": "product",
"amount": 29,
"currency": "usd",
"method": "card",
"email": "buyer@example.com",
"url": "https://sendclap.com/checkout/0x4f1c…",
"paid_at": "2026-11-13T18:04:11.000Z"
}
Your data
Everything in your dashboard is also available as JSON. These endpoints need your API key and only ever return your own data.
| Field | Type | Description |
|---|---|---|
GET /me | Your earnings for the last 30 days and all time, active members, monthly recurring income and open disputes. | |
GET /payments | list | Your payments. Filter with status, type and email. 50 per page unless you set limit. |
GET /payments/{id} | One payment with the purchase IP and device, any dispute, and the customer's full activity log. | |
GET /members | list | Your members with tier, status and the end of their current period. |
GET /licenses | list | License keys you issued, how many devices each is activated on, and when subscription keys expire. Filter with email. |
GET /disputes | list | Card disputes with their status and the date to respond by. |
GET /products | Your products with prices and checkout links. | |
GET /memberships | Your membership tiers. |
Lists come newest first, up to limit items at a time (50 unless you ask for another number, at most 500), as { data, has_more, next }. When has_more is true, send next back as after to get the following page.
Request
curl "https://sendclap.com/api/v1/payments?status=paid&limit=1" \
-H "Authorization: Bearer sc_your_key"
Response · 200
{
"data": [
{
"id": 42, "type": "product", "method": "card", "status": "paid",
"amount": 29, "fee": 0.29, "currency": "usd",
"email": "buyer@example.com", "message": null,
"reference": "pi:pi_3Q…", "test": false,
"created_at": "2026-11-13T18:04:11.000Z"
}
],
"has_more": true,
"next": 42
}
Next page
curl "https://sendclap.com/api/v1/payments?status=paid&limit=1&after=42" \
-H "Authorization: Bearer sc_your_key"
Look up a creator
GET /creators/{handle}
Public and needs no key. It returns who the creator is, what they offer and every way to pay them, including the x402 URLs when they can be paid by an agent.
Request
curl https://sendclap.com/api/v1/creators/demo
Response · 200
{
"handle": "demo", "name": "Ada Builds", "bio": "I make open-source tools…",
"url": "https://sendclap.com/demo",
"payment_methods": { "card": true, "crypto": true, "ton": false, "x402": true },
"tip": { "suggested": 5, "currency": "usd", "page": "https://sendclap.com/demo",
"x402": "https://sendclap.com/x402/demo/tip?amount=5" },
"memberships": [{ "id": 1, "name": "Supporter", "price": 5, "interval": "month", "license_product_id": null,
"x402": "https://sendclap.com/x402/demo/memberships/1", … }],
"products": [{ "id": 1, "name": "Pro license", "price": 29, "interval": null,
"page": "https://sendclap.com/demo/buy/1",
"x402": "https://sendclap.com/x402/demo/products/1", … }]
}
Farcaster
Farcaster clients (Quilcast uses this) can let anyone tip or join anyone on Farcaster in USDC on Base, by fid, with no sign-up. Everyone gets three monthly tiers: Fan $3, Supporter $10 and Patron $25. The first checkout for a fid makes their Sendclap page, paid to their primary verified Ethereum address.
GET /farcaster/{fid}
Public. Returns the fid's tiers, the people who support them and the people they support (active memberships and tips, one row per fid).
Response · 200
{
"fid": 3, "page": "https://sendclap.com/dwr", "contract": "0x3aFF4fa297B7aa8D009281e348E5312d8e93ef9b",
"tiers": [{ "name": "Fan", "price": 3, "interval": "month", … }, …],
"supporters": [{ "fid": 1356, "tier": "Supporter", "monthly_cents": 1000, "tips_cents": 500,
"since": 1763164800, "sub_id": 12, "wallet": "0x…" }],
"supporting": []
}
POST /farcaster/{fid}/checkouts
Signed by the payer: send x-fid, x-key (one of their Farcaster app keys, 0x-hex), x-ts (milliseconds) and x-sig, the hex Ed25519 signature of sendclap-checkout:{x-fid}:{x-ts}:{body}. The body is {"type":"tip","amount":5} or {"type":"membership","tier":"Fan"}. The reply has the order id, contract, usdc, the recipient to, the amount in USDC units and, for memberships, the period in seconds. From the payer's wallet, approve the contract for the amount (a membership renews from that allowance), call pay(to, amount, id) or subscribe(to, amount, period, id), then POST /api/v1/orders/{id}/confirm with {"hash":"0x…"} so it shows at once. A membership is canceled with cancel(sub_id) from the paying wallet.
POST /farcaster/{fid}/claim
Signed the same way by the fid itself (sendclap-claim:{fid}:{x-ts}:{body}), with {"email":"you@example.com"}. Sendclap emails a link that makes the page theirs: they log in with that email from then on and edit the page, tiers and payout wallet, and Sendclap stops copying their Farcaster profile into it. claimed in the lookup says whether that happened.
Activate a license
POST /licenses/activate
Products can issue a license key with each purchase. Activating a key registers one device against it, and each key allows the number of devices you set on the product. Activating the same device twice counts once.
Subscriptions. A product can be billed every week, month or year instead of once (its interval), and a membership tier can include a product's license key. Either way each subscriber gets one key, and it works only while the subscription is paid. Its expires_at says until when; a renewal moves it forward, and there are 3 days of grace for late renewals unless the member canceled. A member who rejoins later gets the same key back. A key bought outright has expires_at: null and never expires. Activating an expired key answers 403 with the code license_expired.
| Field | Type | Description |
|---|---|---|
license_key | string | The key your customer received with their purchase. |
instance_id | string | A name for the device or installation that you choose, such as a machine id. Required. instance_name is accepted as another name for it. |
Request
curl https://sendclap.com/api/v1/licenses/activate \
-H "Content-Type: application/json" \
-d '{"license_key": "ABCDE-FGHJK-LMNPQ-RSTUV", "instance_id": "ada-laptop"}'
Response · 200
{
"activated": true,
"instance_id": "ada-laptop",
"license": {"key": "ABCDE-FGHJK-LMNPQ-RSTUV", "activations": 1, "max_activations": 3, "expires_at": null},
"product": {"id": 1, "name": "Pro license"}
}
Validate a license
POST /licenses/validate
Checks a key when your app starts. It always answers 200 with valid and a status, so your app only has to look at one field:
| Field | Type | Description |
|---|---|---|
active | valid | The key works. With an instance_id, that device is activated on it. |
not_activated | not valid | The key works, but the instance_id you sent isn't activated on it yet. Activate it first. |
disabled | not valid | The key exists, but its payment was refunded or disputed. |
expired | not valid | A subscription key whose membership is no longer paid. It works again as soon as the member pays. |
not_found | not valid | There is no such key. |
| Field | Type | Description |
|---|---|---|
license_key | string | The key your customer received with their purchase. |
instance_id | string | The device to check. Optional. instance_name is accepted as another name for it. |
Request
curl https://sendclap.com/api/v1/licenses/validate \
-H "Content-Type: application/json" \
-d '{"license_key": "ABCDE-FGHJK-LMNPQ-RSTUV", "instance_id": "ada-laptop"}'
Response · 200
{
"valid": true,
"status": "active",
"license": {"key": "ABCDE-FGHJK-LMNPQ-RSTUV", "activations": 1, "max_activations": 3, "expires_at": null},
"product": {"id": 1, "name": "Pro license"}
}
Activate and deactivate answer an unknown key with 404 and the code license_not_found, and a refunded or disputed one with 403 and license_disabled.
Deactivate a license
POST /licenses/deactivate
Releases a device, which frees one activation for the customer to use on another machine. A device that isn't activated on the key answers 404 with the code instance_not_found.
| Field | Type | Description |
|---|---|---|
license_key | string | The key your customer received with their purchase. |
instance_id | string | The device to release. Required. instance_name is accepted as another name for it. |
Request
curl https://sendclap.com/api/v1/licenses/deactivate \
-H "Content-Type: application/json" \
-d '{"license_key": "ABCDE-FGHJK-LMNPQ-RSTUV", "instance_id": "ada-laptop"}'
Response · 200
{
"deactivated": true,
"license": {"key": "ABCDE-FGHJK-LMNPQ-RSTUV", "activations": 0, "max_activations": 3, "expires_at": null},
"product": {"id": 1, "name": "Pro license"}
}
Errors
Errors use standard HTTP status codes and come with a JSON body: error explains what went wrong for a person, and code is a stable name for your code to check. This holds for every path under /api/v1 and /x402, unknown ones included, and MCP tool errors carry the same codes. The one error with more in it is activation_limit, which also includes the license and product so you can show how many devices are in use.
Error body
{"error": "product not found", "code": "not_found"}
| Code | Status | Meaning |
|---|---|---|
bad_request | 400 | The request is missing a field or has an invalid value. |
method_unavailable | 400 | The creator can't take payments by that method yet. |
invalid_api_key | 401 | The API key is missing or no longer valid. |
license_disabled | 403 | The license key exists, but its payment was refunded or disputed. |
not_found | 404 | The checkout, payment, product, tier, creator or endpoint doesn't exist. |
license_not_found | 404 | There is no such license key. |
instance_not_found | 404 | The device isn't activated on this license key. |
activation_limit | 409 | The license key has used all of its activations. |
not_payable | 409 | The creator has no wallet yet, so they can't be paid over x402. |
too_large | 413 | The request body is too large. |
internal_error | 500 | Something broke on our side. Try again in a minute. |