Maven Central: com.kkhay:kkhayv1.0.4Java 11, 17, 21 & Spring Boot
Java & Kotlin SDK
The official Java, Kotlin, and Spring Boot SDK for K Khay Gateway. Features thread-safe HTTP clients, compile-time type safety, and timing-safe webhook verification for enterprise backends.
1. Installation
Maven & Gradle
$mvn dependency:get -Dartifact=com.kkhay:kkhay:1.0.4
2. Invoice Creation Example (Java)
PaymentService.java
import com.kkhay.KkhayClient;import com.kkhay.models.Invoice;import com.kkhay.models.CreateInvoiceRequest; public class PaymentService { public static void main(String[] args) { KkhayClient client = new KkhayClient(System.getenv("KKHAY_API_KEY")); CreateInvoiceRequest request = CreateInvoiceRequest.builder() .amount(100.00) .currency("USD") .payNetwork("bsc") .payToken("USDT") .orderId("JAVA-INV-4001") .title("Database Enterprise Cluster") .customerEmail("billing@corp.com") .build(); Invoice invoice = client.createInvoice(request); System.out.println("Invoice ID: " + invoice.getId()); System.out.println("Checkout URL: " + invoice.getHostedUrl()); }}