API Reference

PayKLY API Reference

Complete REST API documentation for integrating PayKLY payments

Quick Start

Base URL
https://api.paykly.com/v1

Authentication

API Key
All API requests require authentication using your API key

Header Format:

Authorization: Bearer YOUR_API_KEY

Get your API key from the dashboard

Endpoints

POST
/payments
Create a new payment request

Request Body:

{
  "amount": 100.00,
  "currency": "KLY",
  "merchant_id": "your_merchant_id",
  "description": "Payment for order #123",
  "callback_url": "https://yoursite.com/callback"
}

Response:

{
  "id": "pay_123456",
  "status": "pending",
  "payment_url": "https://paykly.com/pay/pay_123456",
  "expires_at": "2025-01-01T12:00:00Z"
}
GET
/payments/:id
Get payment status

Response:

{
  "id": "pay_123456",
  "status": "completed",
  "amount": 100.00,
  "currency": "KLY",
  "transaction_hash": "0x...",
  "created_at": "2025-01-01T10:00:00Z",
  "completed_at": "2025-01-01T10:05:00Z"
}
GET
/payments
List all payments

Query Parameters:

  • limit - Number of results (default: 20)
  • offset - Pagination offset
  • status - Filter by status (pending, completed, failed)

Webhooks

Payment Events
Receive real-time notifications when payment status changes

Event Types:

  • payment.pending - Payment created
  • payment.completed - Payment successful
  • payment.failed - Payment failed
  • payment.expired - Payment expired

Webhook Payload:

{
  "event": "payment.completed",
  "data": {
    "id": "pay_123456",
    "status": "completed",
    "amount": 100.00,
    "currency": "KLY"
  },
  "timestamp": "2025-01-01T10:05:00Z"
}

Error Handling

Error Response Format
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "The provided amount is invalid",
    "details": {}
  }
}
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.