Developer Resources

Build with PayKLY

The easiest way to integrate KLYCoin payments into your applications.
Built for facilitators, merchants, and developers.

TypeScript SDK
Multi-Currency
Webhook Support
Production Ready
Get Started in 30 Seconds

Quick Start Guide

Integrate crypto payments into your application with just a few lines of code

1
Install PayKLY SDK
Add the official PayKLY SDK to your project via npm, yarn, or pnpm
npm install paykly
# or
yarn add paykly
# or
pnpm add paykly
2
Initialize SDK
Set up the facilitator with your merchant credentials
import { PayKLYFacilitator } from 'paykly';

const paykly = new PayKLYFacilitator({
  facilitatorAddress: '0x742d35Cc4bF516a687E5b111a7c5f8aAbe4C5827',
  merchantId: 'your-merchant-id',
  network: 'mainnet' // or 'testnet'
});
3
Create Payment
Accept payments in KOLAY, BNB, USDT, or BUSD
const payment = await paykly.createPayment({
  amount: 50,
  currency: 'USDT',
  orderId: 'order_123',
  description: 'Product purchase',
  metadata: {
    customerId: 'user_456',
    productId: 'prod_789'
  }
});

console.log(`Payment URL: ${payment.paymentUrl}`);
Why PayKLY?

Everything You Need

A complete payment solution with all the features you need

Lightning Fast
Accept payments in seconds with optimized blockchain interactions
Bank-Grade Security
Built-in signature verification and transaction validation
Multi-Currency
Support for KOLAY, BNB, USDT, BUSD and more
Real-time Updates
Webhook integration for instant payment notifications
TypeScript First
Complete type safety and IntelliSense support
Production Ready
Used by 100+ merchants processing $1M+ monthly
API Documentation

API Reference

Complete SDK documentation for PayKLY

METHOD
createPayment()
Create a new payment request

Parameters

{
  amount: number;           // Payment amount
  currency: string;         // 'KOLAY' | 'BNB' | 'USDT' | 'BUSD'
  orderId: string;          // Unique order identifier
  description?: string;      // Payment description
  metadata?: object;         // Additional metadata
}

Returns

Promise<{
  paymentId: string;
  paymentUrl: string;
  status: 'pending' | 'completed' | 'failed';
  amount: number;
  currency: string;
}>
METHOD
getPaymentStatus()
Check the status of a payment

Usage

const status = await paykly.getPaymentStatus('payment_abc123');
console.log(status.status); // 'pending' | 'completed' | 'failed'
METHOD
verifyTransaction()
Verify a blockchain transaction

Usage

const isValid = await paykly.verifyTransaction('0x...');
if (isValid) {
  console.log('Transaction confirmed on blockchain ✅');
}
Code Examples

Integration Examples

Real-world examples for common integration scenarios

E-commerce Checkout
Process payments in your online store
async function processCheckout(cart) {
  const payment = await paykly.createPayment({
    amount: cart.total,
    currency: 'USDT',
    orderId: cart.id,
    description: `Order with ${cart.items.length} items`,
    metadata: { 
      customerId: cart.userId,
      items: cart.items.map(i => i.name)
    }
  });
  
  return { 
    paymentId: payment.paymentId,
    status: 'pending' 
  };
}
SaaS Subscription
Handle recurring payments
async function createSubscription(userId, plan) {
  const plans = {
    basic: { amount: 10 },
    pro: { amount: 25 }
  };
  
  return await paykly.createPayment({
    amount: plans[plan].amount,
    currency: 'KOLAY',
    orderId: `sub_${userId}_${Date.now()}`,
    description: `${plan} subscription`,
    metadata: { userId, plan, type: 'subscription' }
  });
}
Webhook Handler
Handle payment notifications
app.post('/webhooks/paykly', async (req, res) => {
  const event = await webhook.processWebhook(
    req.body,
    req.headers['x-paykly-signature'],
    async (event) => {
      if (event.event === 'payment.completed') {
        await fulfillOrder(event.data.orderId);
      }
    }
  );
  
  res.status(200).send('OK');
});
Payment Status Check
Poll for payment status updates
async function checkPayment(paymentId) {
  const status = await paykly.getPaymentStatus(paymentId);
  
  if (status.status === 'completed') {
    console.log('Payment successful!');
    const isValid = await paykly.verifyTransaction(
      status.transactionHash
    );
    return isValid;
  }
  
  return false;
}
Supported Currencies

Multi-Currency Support

Accept payments in multiple cryptocurrencies

KLYCoin
KOLAY
BSC
18 decimals
Binance Coin
BNB
BSC
18 decimals
Tether
USDT
BSC
18 decimals
Binance USD
BUSD
BSC
18 decimals

Ready to Build?

Start integrating PayKLY today. Get support from our team and join hundreds of developers building with KLYCoin.

WhatsApp: +905447693163

Cookie Preferences

We use cookies to improve your experience. Strictly necessary cookies are always on. Others require your consent.

See our Cookie Policy for details.