Nestuge
Sign inStart for free
Back to blogProduct Guides · 6 min read

Beyond the Dashboard: the API, Webhooks & MCP Setup on Nestuge

This is the technical version of this guide — it assumes you're comfortable making HTTP requests and reading code samples. If you're a creator without a dev background and just want the plain-language walkthrough, read Let Your Store Talk to Your Other Apps instead. Nestuge gives developers three ways to connect a store to outside software: a REST API for reading and writing store data on demand, webhooks for receiving real-time event notifications, and an MCP server for letting AI agents like Claude query and act on a store with explicit, scoped permission. Here's what each is for, and the exact steps to turn it on. Quick orientation: with the Nestuge API, you call Nestuge. With Nestuge webhooks, Nestuge calls you. With Nestuge MCP, an AI calls Nestuge, scoped to whatever you've approved. All three — API keys, webhooks, and connecting an AI app — require the Plus plan. Disconnecting an already-connected app doesn't.

Temidayo MosesPublished 31 Aug 2026

This is the technical version of this guide. We assume you're comfortable making HTTP requests and reading code samples. If you're a creator without a dev background and just want the plain-language walkthrough, read this instead.

Nestuge gives developers three ways to connect a store to outside software: a REST API for reading and writing store data on demand, webhooks for receiving real-time event notifications, and an MCP server for letting AI agents like Claude query and act on a store with explicit, scoped permission. Here's what each is for, and the exact steps to turn it on.

Quick orientation: with the Nestuge API, you call Nestuge. With Nestuge webhooks, Nestuge calls you. With Nestuge MCP, an AI calls Nestuge, scoped to whatever you've approved. All three (API keys, webhooks, and connecting an AI app) require the Plus plan. Disconnecting an already-connected app doesn't.

1. The REST API

A plain HTTP API for reading your store's data into other software, or writing to it from a script instead of the dashboard.

Use case: you keep books in a separate accounting tool and don't want to re-key every sale by hand. A small nightly script pulls yesterday's transactions from Nestuge and drops them into your ledger.

Every request goes to the same base URL and is identified by a single header carrying your API key:

https://nestuge.com/api/v1

Step 1: Create a key

  1. Open Settings, then Developer and select the Keys tab. If you're not on Plus yet, this is where you'll be prompted to upgrade. The API is a Plus feature.

  2. Click Create key. Give it a name that says what it's for (e.g. accounting-sync). It is useful once you have more than one key and need to revoke just one.

  3. Tick only the permissions that script actually needs: Read products, Read members & customers, Import members & customers, Read transactions, Generate checkout links, and/or Manage webhooks.

  4. Click Create. The full key is shown exactly once. Copy it now. It looks like nk_live_1a2b3c4d5e6f7a8b.9f8e7d6c.... Paste it straight into an environment variable, never into code that gets committed.

About the nk_live_ / nk_test_ prefix: it just reflects which environment issued the key, not a sandbox toggle you choose. Either way the key carries real scopes against your real store data, so treat both the same way you'd treat a password.

Step 2: Confirm it works

Call the ping endpoint. No scopes are required for this one. It just tells you the key is alive and what it's allowed to do:

curl https://nestuge.com/api/v1/ping \
  -H "x-nestuge-api: nk_live_..."
# → { "ok": true, "brandID": "brd_...", "scopes": ["products:read", "transactions:read"] }

Step 3: Make a real call

curl https://nestuge.com/api/v1/products \
  -H "x-nestuge-api: nk_live_..."
# → {
#   "status": "ok",
#   "data": {
#     "items": [ { "id": "prod_abc", "title": "Design 101", ... } ],
#     "hasMore": false,
#     "nextCursor": null
#   }
# }

Every response follows that same shape; status, message, data. Also, every list endpoint takes limit and cursor query params for pagination, handing back hasMore / nextCursor so you know whether to keep paging.

To write instead of read, say, generating a checkout link for a customer from your own site, send a POST with the scope that grants it:

curl -X POST https://nestuge.com/api/v1/payment-links \
  -H "x-nestuge-api: nk_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "items": [{ "id": "prod_abc", "plan": "plan_std", "type": "product" }] }'

Keep in mind: requests are rate-limited per key (roughly 120/min). If you're syncing a large backlog, page through it rather than firing everything at once. And a key only ever does what its ticked scopes allow: if a call 403s, the fix is usually to add a scope to the key, not to change the request.

The full, current list of endpoints and their scopes is always at developers.nestuge.com/reference. This is the shape of the API, not the exhaustive catalog.

2. Webhooks

Instead of asking the API "did anything happen?" on a timer, tell Nestuge where to send the answer the moment it does.

Use case: you want a Slack ping in #sales the second a purchase clears, and you want a customer automatically removed from your mailing list the moment their subscription expires. Both without your server ever having to ask.

Step 1: Stand up an endpoint

You need one publicly reachable https:// URL that accepts a POST and returns a 2xx status quickly. Do the actual work (writing to a database, calling Slack) after you've acknowledged the request, a slow endpoint looks the same as a failing one.

Step 2: Register it

  1. Go to Settings, then Developer, Webhooks and click Add endpoint.

  2. Paste your URL (it must start with https://) and tick the events you want to receive.

  3. Add an optional description so you can tell endpoints apart later, then save.

  4. The signing secret is shown once, in the form whsec_.... Copy it into an environment variable immediately. Nestuge doesn't store it in a way it can show you again.

You can do the same thing from code with webhooks:write scope on an API key:

curl -X POST https://nestuge.com/api/v1/webhooks \
  -H "x-nestuge-api: nk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/hooks/nestuge",
    "events": ["transaction.succeeded", "subscription.expired"],
    "description": "sales-slack-bot"
  }'

Step 3: Verify every payload

Every delivery carries three headers alongside a JSON body: X-Nestuge-Signature (an HMAC-SHA256 of the exact raw request body, keyed by your signing secret), X-Nestuge-Event, and X-Nestuge-Delivery. Recompute the signature yourself before trusting the payload:

const crypto = require('crypto');
function verify(rawBody, signatureHeader, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(rawBody) // the raw, unparsed bytes — not JSON.stringify(req.body)
    .digest('hex');
  const received = signatureHeader.replace('sha256=', '');
  return crypto.timingSafeEqual(
    Buffer.from(expected), Buffer.from(received)
  );
}

The most common mistake: verify against the raw request body, byte for byte. If your framework parses JSON before your handler sees it and you re-serialize it to check the signature, whitespace or key-ordering differences will make a genuine delivery look forged.

Step 4: Test it, then trust the delivery log

Back in Settings, then Developer - Webhooks, each endpoint has a Send test menu. Pick an event and a realistic sample payload fires through the real pipeline, so you can build your handler before a genuine sale happens.

Below the endpoints table, the deliveries panel shows every attempt with its status, response code, and response body, and a Resend button. If your endpoint returns anything other than 2xx, Nestuge retries automatically: up to 5 attempts with exponential backoff (roughly 1 minute, doubling, capped at 30 minutes) before giving up and marking the delivery failed.

3. MCP for AI agents

Connect your store to Claude (or any MCP-compatible client) so you can ask it things and hand it real tasks, no API key to generate or paste.

Use case: instead of opening the dashboard, you ask Claude "how did sales do this week compared to last?" or "draft a 20%-off email to everyone who bought the course but hasn't opened the community hub yet", and it does the lookup and writes the draft for you, inside your own conversation.

MCP (Model Context Protocol) is a standard that lets an AI client discover and call a set of tools. Nestuge runs one MCP server per store at a single fixed address, and authenticates the connection with OAuth rather than a key you copy in, you approve exactly what the AI can see and do from a consent screen, the same way you'd approve a "Sign in with Google" request.

MCP server URL:

https://nestuge.com/api/mcp

Connecting Claude

  1. Make sure your store is on the Plus plan. Connecting an app is gated the same way API keys and webhooks are.

  2. In Claude, go to Settings, then Connectors, Add custom connector.

  3. Paste in https://nestuge.com/api/mcp as the URL. Leave Client ID and Client Secret empty, Claude registers itself with Nestuge automatically the first time you connect.

  4. Click Connect. You'll be sent to a Nestuge sign-in / consent screen in your browser, log in if you aren't already.

  5. Read the permissions screen. It lists exactly what you're about to grant, in plain language (e.g. "See your orders, payments, customers and contact lists"), and which store to connect if you run more than one. Untick anything you don't want to allow yet. You can always come back and grant more later by reconnecting.

  6. Approve. You're returned to Claude, already connected. Then try asking it something simple first, like your sales for the current month.

Connecting a different MCP client

Any MCP-aware tool that supports OAuth-based connectors can use the same URL. Tools that instead expect a static config file typically look like this, using a Nestuge OAuth access token as a bearer credential:

{
  "mcpServers": {
    "nestuge": {
      "url": "https://nestuge.com/api/mcp",
      "headers": { "Authorization": "Bearer <access token>" }
    }
  }
}

Revoking access

Go to Settings → Developer → Apps. Every connected app is listed with the permissions you granted it and when — click Disconnect and it stops immediately. Unlike connecting, disconnecting isn't gated behind Plus, so you can always cut access even on a downgraded account.

Ready to get started? Upgrade to Nestuge Plus today

Frequently asked questions

Does Nestuge have a public API?

Yes. The Nestuge REST API is available on the Plus plan at https://nestuge.com/api/v1, authenticated with an API key in the x-nestuge-api header. Keys are created under Settings → Developer → Keys and can be scoped to read products, read or import customers, read transactions, generate checkout links, or manage webhooks.

What events can Nestuge webhooks send?

Eight event types across three families: transactions (transaction.succeeded, transaction.failed), payouts (payout.settled), subscriptions (subscription.renewed, subscription.expired, subscription.completed), and membership (member.joined, member.removed).

How do I verify a Nestuge webhook signature?

Each delivery includes an X-Nestuge-Signature header formatted as sha256=<hex digest>. Recompute an HMAC-SHA256 of the raw, unparsed request body using your endpoint's signing secret (whsec_...), then compare it to the header with a timing-safe comparison before trusting the payload.

What is the Nestuge MCP server URL?

https://nestuge.com/api/mcp. It authenticates over OAuth 2.1 rather than an API key — in an MCP client like Claude, add it as a custom connector, leave the client ID and secret blank, and approve the permissions on the consent screen that follows.

Can an AI agent connected via MCP withdraw money from my Nestuge account?

No. There is no payout or withdrawal endpoint exposed to agents. An MCP-connected agent can read data it's been granted access to and create drafts (products, emails, coupons) for you to review, but it can never move money out of the account.

The full endpoint reference, request/response schemas, and live examples for everything above live at developers.nestuge.com/reference.


Temidayo Moses

Product Marketing Manager

Keep reading

All posts
Product Guides · 3 min read

Services Is Live! Get Booked and Paid for Client Work on Nestuge

Services is live on Nestuge. Designers, editors, coaches, consultants and every creator who does client work can now list packages, agree on terms and get paid in milestones, all from the storefront link they already share. No more chasing deals and payments in the DMs.

Grace Malik5 Nov 2026
Guest Interview · 7 min read

She Built a Career in Graphic Design. Then AI Changed the Game. Miracle Okon on Starting Again, Selling Better and Crossing $10K

Miracle Edet Okon was a graphic designer. Someone who had spent years building a reputation around a skill she had deliberately gotten good at. Through The Excellent Creatives Academy, she had trained more than 1,600 people in graphic design. Then AI started changing the creative industry. And for Miracle, the first reaction wasn't excitement. It was fear. So when we sat down to talk about how she eventually crossed $10,000 on Nestuge, we wanted to go further than the number and understand what happens when someone who is already good at something suddenly has to become a beginner again.

Grace Malik13 Oct 2026
Tips and Tricks · 5 min read

From Audience to Sales: How to Build a Sales Funnel That Converts

Having an audience doesn’t automatically mean having sales. After having an audience, the next step is building a system that helps turn attention into paying customers. This blog breaks down how to create a sales funnel that builds trust, guides your customers towards a purchase, recovers abandoned sales, and keeps them engaged after they buy.

Grace Malik6 Oct 2026

Join 50k+ creators growing with Nestuge

  • 14 days free trial
  • Personalized onboarding
  • Access to all features
Get started for free
Nestuge

Monetize your expertise. Go from idea to income.

Need help?support@nestuge.com
© 2026 Nestuge Inc. All rights reserved.