#
SDK Reference
Official client libraries for integrating HivePay into your applications.
#
Available SDKs
#
TypeScript SDK
The official TypeScript SDK provides a fully typed, promise-based API for interacting with HivePay.
#
Features
- Full TypeScript support with comprehensive type definitions
- Promise-based API with async/await
- Native async iterators for pagination
- Built-in webhook verification
- Custom error types for easy error handling
- Zero dependencies (uses native fetch)
- Tree-shakeable ESM module
- Works in Node.js 18+ and modern browsers
#
Quick Start
import { HivePay } from '@hivepay/client';
const hivepay = new HivePay({ apiKey: 'sk_live_xxx' });
// Create a payment
const payment = await hivepay.payments.create({
amount: '10500',
currency: 'HBD',
description: 'Order #123'
});
// Redirect to checkout
window.location.href = payment.checkoutUrl;
const { HivePay } = require('@hivepay/client');
const hivepay = new HivePay({ apiKey: 'sk_live_xxx' });
const payment = await hivepay.payments.create({
amount: '10500',
currency: 'HBD',
description: 'Order #123'
});
#
SDK Guides
#
Requirements
#
TypeScript SDK
#
Secure Context (Webhooks)
Webhook verification requires a secure context (HTTPS or localhost).