Integrate PayKLY into your platform with our simple API
npm install @paykly/sdk
# or
yarn add @paykly/sdkimport { PayKLY } from '@paykly/sdk';
const payKLY = new PayKLY({
apiKey: 'your-api-key',
network: 'bsc' // or 'polygon'
});
// Initialize payment
const payment = await payKLY.createPayment({
amount: '100.00',
currency: 'USD',
description: 'Product purchase'
});POST /api/x402/charge instead.Deprecated Endpoint
This endpoint is no longer available. For creating payments, use the x402 protocol endpoint:
POST /api/x402/charge
{
"payer": "0x...",
"merchant": "0x...",
"asset": "USDT",
"amount": 100.00,
"metadata": {
"description": "Product purchase"
}
}paymentId can be:
{
"paymentId": "uuid-here",
"transactionHash": "0x...",
"walletAddress": "0x...",
"amount": 100.00,
"currency": "USD",
"status": "completed",
"tokensPurchased": "1000.00",
"paymentMethod": "BNB",
"phase": 1,
"bonusPercentage": 10,
"completedAt": "2024-01-01T12:00:00Z",
"email": "user@example.com"
}Note: This endpoint queries the purchases table. For x402 payments not yet recorded in the database, check the x402 service or blockchain directly.
Full documentation and SDK packages coming soon. For now, contact us at dev@klycoin.io for integration support.
We use cookies to improve your experience. Strictly necessary cookies are always on. Others require your consent.
See our Cookie Policy for details.