AI HelpCenter | YourGPT

Find answers to your questions

Integrate Stripe, Paddle, and Razorpay with Your AI Agents
Handling Subscriptions and Payments with Stripe, Paddle, and Razorpay in Your AI Agent

This cookbook recipe shows you how to integrate subscription-based payments into your AI agents using Stripe, Paddle, and Razorpay. No need to write custom code — just download the template, configure, plug in your API credentials, test in an emulator, and go live in minutes.

payment integration

What This Recipe Covers

Each template supports the full payment lifecycle for AI agents. These intents map to user goals and handle all backend logic:

Intent Name

Description

Create Subscription

Starts a new subscription flow (e.g., "Start my subscription").

Cancel Subscription

Ends a user’s active plan (e.g., "Cancel my subscription").

Update Payment Method

Lets users update billing details (e.g., "Change my card").

Download Invoice

Sends the latest invoice (e.g., "Get my invoice").

Payment Status Webhook

Validates payment success/failure via provider webhooks.

These intents are pre-configured with the correct actions and event triggers in the downloadable templates.


📦 Download a Template

Choose the payment provider you're using. Each link leads to a prebuilt AI agent template.

Provider

Template Link

Stripe

Stripe Agent Template

Paddle

Paddle Agent Template

Razorpay

Razorpay Agent Template


🔧 Integration Instructions

Once you’ve downloaded your preferred template:

  1. Import the template into AI Studio.

  2. Add your payment credentials:

    • Stripe: STRIPE_SECRET_KEY, STRIPE_PRICE_ID, WIDGET_UID

    • Paddle: PADDLE_API_KEY, PADDLE_API_ENDPOINT

    • Razorpay: RAZORPAY_KEY_ID, RAZORPAY_SECRET_KEY, RAZORPAY_PLAN_ID

  3. Test in emulator using messages like:

    • “Start my subscription”

    • “Update my payment method”

    • “Cancel my subscription”

  4. Once verified, deploy your agent live.

💡 The detailed information about the setup is listed on each template


🧪 Tips for Testing

  • Use test card numbers provided by each platform (e.g., Stripe test cards).

  • Webhooks will log response payloads inside the agent console for debugging.

  • Try edge cases like failed payments or expired cards to see the fallback behavior.


You're done! Your AI agent is now payment-enabled. Go Live 🚀

Was this article helpful?
©2025
Powered by YourGPT