Webhooks
OnlyFans webhooks, signed and retried
Point an endpoint at your server and pick the events you want. Each delivery is signed with the Standard Webhooks scheme, so any of its libraries can check it, and a failed delivery is retried with backoff.
import { Webhook } from "standardwebhooks"
const wh = new Webhook(process.env.BFL_WEBHOOK_SECRET!) // whsec_...
export async function POST(req: Request) {
const body = await req.text()
let event
try {
event = wh.verify(body, Object.fromEntries(req.headers))
} catch {
return new Response("Bad signature", { status: 400 })
}
if (event.type === "action.pending") {
// Ping the team: a write is waiting for approval
}
return new Response(null, { status: 204 })
}Webhooks
What OnlyFans webhooks send
Fan activity
message.received when a fan writes, subscriber.new when a fan subscribes or comes back, and transaction.created for every new sale.
Account health
account.connected, account.status_changed and account.removed, plus link.failed when a creator does not finish linking.
Approvals
action.pending when a write is waiting, then action.executed, action.rejected or action.failed with the outcome.
Signed deliveries
webhook-id, webhook-timestamp and webhook-signature headers with a whsec_ secret. Verify before you trust the body.
Retries
A failed delivery is retried with backoff, then marked failed. The schedule is in the docs.
Replay and live view
See every event on the Live events page, and replay any delivery from the dashboard after you fix your endpoint.
FAQ
Frequently asked questions
Does OnlyFans have webhooks?
Not for developers. BetterFans Link sends them for the accounts linked to your workspace: new messages, new transactions, new subscribers, account status changes and the life of every write you ask for.
How do I verify a BetterFans Link webhook?
Deliveries follow the Standard Webhooks spec. Pass the raw body and the webhook-id, webhook-timestamp and webhook-signature headers to a Standard Webhooks library with your whsec_ secret. If verification fails, reject the request.
What happens if my endpoint is down?
Each delivery waits up to 15 seconds for a 2xx answer, then retries with backoff. An endpoint that fails every delivery for 5 days is disabled, and you can turn it back on and replay deliveries from the dashboard.
Do test mode events use the same webhooks?
Every event carries mode, live or test, so one endpoint can handle both and tell them apart. Test mode events come from sandbox creators and simulated actions.
Related
Related features
GET STARTED
Build it in test mode today.
Sign up, make a test key and work against sandbox creators. Link a real account when your flow is ready.
Questions first? Write to hello@betterfans.link.