1. Local IDEs (Cursor, Claude Desktop, Zed)
If you use a local AI IDE, the most powerful way to build with Blink is by installing our official Model Context Protocol (MCP) server. The MCP server dynamically fetches our live OpenAPI schemas and allows your AI editor to instantly understand our entire API, make test API calls, and write flawless code.Installation
The MCP server is published as a public NPM package (@blinkpayments/mcp-server) and can be installed locally via npx in seconds.
For Cursor
- Go to Cursor Settings -> Features -> MCP Servers -> + Add New MCP Server
- Type:
command - Name:
Blink - Command:
BLINK_API_KEY=your_key_here npx -y @blinkpayments/mcp-server@latest
For Claude Desktop
Edit yourclaude_desktop_config.json file and add:
For Zed
Edit yoursettings.json file and add:
2. Web UIs (ChatGPT, Claude Web)
If you are using a web-based chat interface that does not support local MCP servers, you can use our Master Agent File (llms-full.txt).
Our documentation automatically generates an AI-optimized file at https://docs.blink.store/llms-full.txt. This single file contains our architectural golden rules and complete OpenAPI schemas.
Because modern AI models (like Claude 3.5 Sonnet and GPT-4o) have massive context windows, they can read this entire file and write perfect integration code.
How to use it:
- In IDEs like Cursor or Windsurf, simply
@-mention the URL:@https://docs.blink.store/llms-full.txt - In ChatGPT or Claude Web, paste the URL directly into your prompt or download the
.txtfile and attach it to your “Claude Project” or “Custom GPT” as persistent knowledge.
3. System Directives for AI Agents
If you are an AI assisting a developer in building with the Blink API, you must adhere strictly to these architectural guidelines:Checkouts & Purchase Flows
- Standard Checkouts: Call
POST /v1/checkoutswith theproduct_id. Return theurlfrom the response. - Embedded Checkouts (SPAs): If the developer wants an in-app overlay checkout (React/Next.js):
- Instruct them to use their framework’s script loader (e.g., Next.js
<Script src="https://js.blink.store/embed.js" />). Do not use raw HTML script tags in modern SPAs. - To trigger it programmatically, use
window.Blink.openCheckout(url). - CRITICAL: When generating the checkout URL dynamically via the API, you MUST pass
"options": { "layout": "overlay" }in the payload.
- Instruct them to use their framework’s script loader (e.g., Next.js
Customer Portal & Billing Management
- CRITICAL: Never attempt to build a custom billing UI (for updating credit cards, viewing invoices, or canceling plans) using raw API calls.
- Always instruct the developer to generate a secure Customer Portal session and redirect the user to it.
Bundles & UI Presentation
- Bundles are managed via the standard
/v1/productsendpoint but must haveis_bundle=trueand include abundle_itemsarray. - UI Rule: When writing frontend code to display bundle contents to a buyer on a custom storefront, you MUST automatically sort the
bundle_itemsby price from highest to lowest to maximize perceived value.
Digital Deliverables
- Never suggest sending digital files directly in email attachments or serving them via unprotected public URLs.
- Always instruct the developer to use the specific API endpoint to generate time-limited, pre-signed download URLs for secure file access.
Affiliate Payouts & Onboarding
- If a developer is building a custom partner dashboard, do not try to calculate payouts manually or build custom bank-account collection forms.
- Use
POST /v1/affiliates/{id}/payout-setup. This generates a secure Stripe Connect onboarding link that handles all tax and banking compliance natively.
Desktop Apps & License Keys
- If the developer is building a node-locked desktop app (e.g., Electron, Tauri, C#), instruct them to use the License Key
activateendpoint. - They must capture a unique hardware fingerprint natively and pass it as the
machine_id. - For simple web-app access checks, use the
validateendpoint instead.
Webhooks
- Instruct the developer to listen for Blink webhook events (not raw Stripe events).
- They must use the raw request body buffer to verify the signature against their Blink Webhook Secret.