SDKs & Client Libraries

Official SDKs for integrating Inkress into your applications.

@inkress/storefront-sdk

Stable

The official client-side SDK for building custom checkout experiences and storefronts.

Installation

1npm install @inkress/storefront-sdk

Usage

Initialize the SDK with your public key to start accepting payments.

1import { InkressStorefront } from '@inkress/storefront-sdk';
2
3const inkress = new InkressStorefront({
4 publicKey: 'pk_test_...',
5 environment: 'sandbox' // or 'production'
6});
7
8// Create a payment intent
9const payment = await inkress.payments.create({
10 amount: 1000, // 0.00
11 currency: 'JMD',
12 description: 'Order #123'
13});

@inkress/admin-sdk

Stable

The official server-side SDK for managing your Inkress account, orders, and webhooks.

Installation

1npm install @inkress/admin-sdk

Usage

Initialize the SDK with your secret key. Never expose this key on the client side.

1import { InkressAdmin } from '@inkress/admin-sdk';
2
3const inkress = new InkressAdmin({
4 secretKey: process.env.INKRESS_SECRET_KEY
5});
6
7// List recent orders
8const orders = await inkress.orders.list({
9 limit: 10,
10 status: 'paid'
11});
12
13// Refund a payment
14await inkress.payments.refund('pay_123', {
15 reason: 'requested_by_customer'
16});