﻿# UPIDrop — AI Integration Prompts (Single Copy-Paste Master Prompts)

This document contains ready-to-use master prompts that you can paste directly into **Claude Code**, **Cursor Composer / Chat**, **Google Antigravity**, **Codex**, or **OpenCode** to instantly integrate UPIDrop into any web, mobile, or e-commerce project.

---

## 1. Single Prompt for Cursor / Claude Code / Antigravity (Any Website)

```text
Integrate UPIDrop Zero-Fee UPI Payment Gateway into this website.
- Public Key: pk_live_YOUR_PUBLIC_KEY
- Base API URL: https://upidrop-pg.upidrop-payment-gateway.workers.dev
- Checkout SDK: https://upidrop-pg.pages.dev/sdk/upidrop.js
- API Documentation: https://upidrop-pg.pages.dev/api-docs.md

Implementation Requirements:
1. When user clicks "Buy Now" or "Pay with UPI", either:
   - Call the UPIDrop Universal Widget: UPIDrop.checkout({ amount: <ORDER_AMOUNT>, description: '<ORDER_NAME>', onSuccess: (res) => handleSuccess(res) })
   - OR create an order via POST https://upidrop-pg.upidrop-payment-gateway.workers.dev/api/v1/orders and redirect to https://upidrop-pg.pages.dev/pay.html?orderId=<ORDER_ID>
2. After the customer pays in their UPI App and submits the 12-digit UTR, mark the order status as pending_verification.
3. Provide a webhook listener to handle "order.paid" events from UPIDrop.
```

---

## 2. Single Prompt for Next.js / React Web App

```text
Create a UPI Payment Checkout component using UPIDrop for Next.js (App Router / Pages Router).
- Public Key: pk_live_YOUR_PUBLIC_KEY
- API Base: https://upidrop-pg.upidrop-payment-gateway.workers.dev

Requirements:
1. Create a server action or API route /api/checkout/upi that calls UPIDrop POST /api/v1/orders with header X-API-Key.
2. Return the orderId and upiDeepLink to the client.
3. On mobile devices, show 1-click buttons for GPay (tez://), PhonePe (phonepe://), and Paytm (paytmmp://).
4. On desktop, render a QR code using the upiDeepLink.
5. Provide a 12-digit UTR submission modal calling POST /api/v1/orders/:id/utr.
6. Poll /api/v1/orders/:id/public every 3 seconds until status is 'paid'.
```

---

## 3. Single Prompt for React Native / Expo Mobile App

```text
Implement a UPI Payment Screen in React Native / Expo using UPIDrop.
- API Base: https://upidrop-pg.upidrop-payment-gateway.workers.dev
- Public Key: pk_live_YOUR_PUBLIC_KEY

Requirements:
1. Fetch order details from UPIDrop API using POST /api/v1/orders.
2. Use Linking.openURL(order.upiDeepLink) to open installed UPI apps (Google Pay, PhonePe, Paytm, CRED).
3. Display a 12-digit UTR input form when user returns from UPI app.
4. Submit UTR to POST /api/v1/orders/:id/utr and poll order status until completed.
```

---

## 4. Single Prompt for Flutter Mobile App

```text
Create a Flutter UPI Payment screen with UPIDrop integration.
- Base URL: https://upidrop-pg.upidrop-payment-gateway.workers.dev
- Public Key: pk_live_YOUR_PUBLIC_KEY

Requirements:
1. Create order with http POST to /api/v1/orders with header X-API-Key.
2. Launch deep link with url_launcher package using launchUrl(Uri.parse(upiDeepLink)).
3. Provide a sleek TextField for entering the 12-digit UTR number.
4. Submit UTR to POST /api/v1/orders/{orderId}/utr and show animated payment success screen.
```
