Main server-side Hadawi SDK client.

Initialise once (e.g. at app startup) and reuse across requests.

import { HadawiClient } from '@hadawi/sdk';

const hadawi = new HadawiClient({
apiKey: process.env.HADAWI_API_KEY!,
mode: 'live', // or 'dev'
webhookSecret: process.env.HADAWI_WEBHOOK_SECRET,
});

Constructors

Properties

Constructors

Properties

intents: IntentsModule

Create and inspect checkout intents.

orders: OrdersModule

List, view, and update orders once they are funded.

webhooks: WebhooksModule

Verify and parse incoming webhook events from Hadawi.