Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.fype.dev/llms.txt

Use this file to discover all available pages before exploring further.

10-Minute Setup Guide (AI-Powered)

This guide is for those who want to move fast. By using an AI Agent and Fype, you can have a working payment flow in under 10 minutes.

Minute 0-2: Preparation

  1. Sign up: Create an account at dashboard.fype.dev.
  2. Get Keys: Copy your fype_test_ key from Developers > API Keys.
  3. Open your AI Tool: Open Cursor, Gemini, or your preferred AI coding assistant.

Minute 2-5: The “God-Tier” Prompt

Copy and paste the following prompt into your AI assistant. Replace the bracketed text with your info.
I want to integrate Fype payments into my [Framework, e.g., Next.js/Python FastAPI] app. 
1. Install the official Fype [Node.js/Python] SDK.
2. Create a server-side route that accepts a 'price' and 'orderId', and calls `fype.payments.create`. 
3. Use `fype_test_your_key` for authentication.
4. Redirect the user to the `checkout_url` returned by Fype.
5. Create a success page at `/success` and a cancel page at `/cancel`.
6. On the success page, display the Fype Payment ID from the URL using the placeholder {PAYMENT_ID}.

Minute 5-8: Integration & Vibe Check

  1. Run the Code: Let the AI generate the files. Click “Apply” or copy the code into your project.
  2. Start your Server: Run npm run dev or python main.py.
  3. Vibe Check: Click your payment button. If you see the Fype Checkout page, you are 90% done.

Minute 8-10: Webhook Automation

Now, ask the AI to handle the back-end confirmation:
Now, create a webhook listener at `/api/webhooks/fype`. 
1. Use the Fype SDK to verify the signature with the secret `whsec_your_test_secret`.
2. When a `payment.succeeded` event is received, print 'ORDER_PAID' to the console and the Payment ID.
3. Return a 200 OK status.

Final Step: Verify

  1. Use the Simulator on the checkout page to succeed.
  2. Check your terminal/console. Do you see ORDER_PAID?
  3. Congratulations! You have a fully functional, decoupled payment system integrated in 10 minutes.

Why this is faster than other gateways:

  • No UI to build: Fype provides the hosted checkout.
  • No Gateway-specific SDKs: You don’t need to learn Razorpay or Stripe; just Fype.
  • AI-Optimized: Our API schema is so clean that AI agents almost never make mistakes during integration.