Make Your First Request

Once you’ve created your account and generated an API key, you can start making requests to KiraPay. This guide will walk you through creating your first payment link using the API.


1. Prerequisites

  • A KiraPay Merchant account

  • An API key

  • curl or a REST client like Postman


2. Authentication

All API requests require authentication via the header:

x-api-key: YOUR_API_KEY

Replace YOUR_API_KEY with the key from your dashboard.


Request Example (cURL)

curl -X POST "https://kirapay-api.holatech.app/api/link/generate" \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "currency": "USDC",
    "receiver": "0x8356D265646a397b2Dacf0e05A4973E7676597f4",
    "price": 10,
    "name": "Rent",
    "redirectUrl": "https://www.kira-pay.com"
  }'

Request Example (Node.js)

import axios from "axios";

async function createPaymentLink() {
  const response = await axios.post(
    "https://kirapay-api.holatech.app/api/link/generate",
    {
      currency: "USDC",
      receiver: "0x8356D265646a397b2Dacf0e05A4973E7676597f4",
      price: 10,
      name: "Rent",
      redirectUrl: "https://www.kira-pay.com"
    },
    {
      headers: {
        "x-api-key": process.env.KIRAPAY_API_KEY!,
        "Content-Type": "application/json"
      }
    }
  );

  console.log(response.data);
}

createPaymentLink();

Success Response

{
  "message": "success",
  "data": {
    "url":"https://kirapay-api.holatech.app/{paymentId}"
  },
  "code": 201
}

The url can be shared with your user to complete the payment.

Last updated

Was this helpful?