KiraPay API Integration Prompt

Use this prompt with AI tools like Claude, ChatGPT, Bolt, or Lovable to integrate KiraPay payment links into your website.

Please comeback here and rate this page, how well this Promt worked for you.


Copy and Paste This Prompt:

I want to integrate KiraPay payment API into my website. Here are the complete API details:

BASE URL: https://kirapay-api.holatech.app/api

AUTHENTICATION:
- Add header: "x-api-key" with my API key value
- My API key: [YOUR_API_KEY_HERE]

AVAILABLE ENDPOINTS:

1. CREATE PAYMENT LINK
   - Endpoint: POST /link/generate
   - Requires: x-api-key header
   - Request Body (JSON):
     {
       "price": 10,
       "currency": "USDC",
       "receiver": "0xYourWalletAddress",
       "name": "Payment description",
       "redirectUrl": "https://yoursite.com/success" (optional)
     }
   - Response:
     {
       "message": "success message",
       "data": {
         "url": "https://payment-link-url"
       }
     }

2. GET ALL PAYMENT LINKS
   - Endpoint: GET /link?page=1&limit=10
   - Requires: x-api-key header
   - Response:
     {
       "message": "success message",
       "data": {
         "links": [array of payment link objects],
         "total": 100,
         "page": 1,
         "totalPages": 10
       }
     }

3. GET PAYMENT LINK BY CODE
   - Endpoint: GET /link/{code}
   - No authentication required (public)
   - Response:
     {
       "message": "success message",
       "data": {
         "_id": "link id",
         "code": "unique code",
         "price": 10,
         "name": "payment name",
         "url": "payment url",
         "receiver": "wallet address",
         "createdAt": "timestamp"
       }
     }

4. GET TRANSACTIONS
   - Endpoint: GET /wallet/transactions
   - Requires: x-api-key header
   - Response:
     {
       "message": "success message",
       "data": {
         "transactions": [array of transaction objects],
         "total": 50
       }
     }
   - Each transaction object contains:
     {
       "_id": "transaction id",
       "transaction_hash": "blockchain hash",
       "status": "PENDING" | "COMPLETED" | "FAILED" | "CANCELLED",
       "amount": 10,
       "createdAt": "timestamp"
     }

TYPESCRIPT INTERFACES (if using TypeScript):

interface CreateLinkRequest {
  currency: string;
  receiver: string;
  price: number;
  name: string;
  redirectUrl?: string;
}

interface CreateLinkResponse {
  message: string;
  data: {
    url: string;
  };
}

interface PaymentLink {
  _id: string;
  code: string;
  price: number;
  name: string;
  url: string;
  receiver: string;
  createdAt: string;
}

interface GetLinksResponse {
  message: string;
  data: {
    links: PaymentLink[];
    total: number;
    page: number;
    totalPages: number;
  };
}

interface Transaction {
  _id: string;
  transaction_hash: string;
  status: "PENDING" | "COMPLETED" | "FAILED" | "CANCELLED";
  amount: number;
  createdAt: string;
}

interface GetTransactionsResponse {
  message: string;
  data: {
    transactions: Transaction[];
    total: number;
  };
}

WHAT I NEED:
1. Create a simple payment page with a button to create payment links
2. When button is clicked, call the CREATE PAYMENT LINK endpoint
3. Display the generated payment URL to users
4. Make the UI clean and responsive with modern styling
5. Handle errors gracefully with user-friendly messages

Please implement this integration in my project.

Last updated

Was this helpful?