@snexon/payoniq-lite 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,60 @@
1
+ export interface PayoniqClientOptions {
2
+ apiKey: string;
3
+ apiSecret?: string;
4
+ baseUrl?: string;
5
+ }
6
+ export interface CreateSessionOptions {
7
+ amount: number;
8
+ currency?: "BDT" | "USD" | "INR" | string;
9
+ orderId: string;
10
+ method?: string;
11
+ customerName?: string;
12
+ customerEmail?: string;
13
+ customerPhone?: string;
14
+ successUrl?: string;
15
+ cancelUrl?: string;
16
+ metadata?: Record<string, any>;
17
+ expiryMinutes?: number;
18
+ }
19
+ export interface PaymentSession {
20
+ id: string;
21
+ orderHash: string;
22
+ orderId: string;
23
+ amount: number;
24
+ currency: string;
25
+ status: "PENDING" | "PAID" | "EXPIRED" | "FAILED";
26
+ method?: string;
27
+ checkoutUrl: string;
28
+ expiresAt: string;
29
+ createdAt: string;
30
+ metadata?: Record<string, any>;
31
+ }
32
+ export interface WebhookEvent<T = any> {
33
+ event: "payment.settled" | "payment.failed" | "payment.expired" | string;
34
+ timestamp: number;
35
+ data: T;
36
+ }
37
+ export declare class PayoniqError extends Error {
38
+ code?: string;
39
+ status?: number;
40
+ constructor(message: string, code?: string, status?: number);
41
+ }
42
+ export declare class PayoniqClient {
43
+ readonly apiKey: string;
44
+ readonly apiSecret?: string;
45
+ readonly baseUrl: string;
46
+ readonly sessions: {
47
+ create: (options: CreateSessionOptions) => Promise<PaymentSession>;
48
+ get: (orderHash: string) => Promise<PaymentSession>;
49
+ };
50
+ readonly webhooks: {
51
+ verifySignature: (rawBody: string | Buffer, signatureHeader: string, toleranceSec?: number) => boolean;
52
+ constructEvent: <T = any>(rawBody: string | Buffer, signatureHeader: string) => WebhookEvent<T>;
53
+ };
54
+ constructor(options: PayoniqClientOptions);
55
+ /**
56
+ * Internal request helper
57
+ */
58
+ private request;
59
+ }
60
+ //# sourceMapp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AAG,gBAAgB,GAAG,iBAAiB,GAAG,MAAM,CAAC;IACzE,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,CAAC,CAAC;CACT;AAED,qBAAa,YAAa,SAAQ,KAAK;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;gBAEX,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;CAM5D;AAED,qBAAa,aAAa;IACxB,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnC,SAAgB,OAAO,EAAE,MAAM,CAAC;IAEhC,SAAgB,QAAQ,EAAE;QACxB,MAAM,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;QACnE,GAAG,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;KACrD,CAAC;IAEF,SAAgB,QAAQ,EAAE;QACxB,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC;QACvG,cAAc,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC,CAAC;KACjG,CAAC;gBAEU,OAAO,EAAE,oBAAoB;IA6IzC;;OAEG;YACW,OAAO;CA0BtB"}
package/dist/index.js ADDED
@@ -0,0 +1,166 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PayoniqClient = exports.PayoniqError = void 0;
7
+ const crypto_1 = __importDefault(require("crypto"));
8
+ class PayoniqError extends Error {
9
+ code;
10
+ status;
11
+ constructor(message, code, status) {
12
+ super(message);
13
+ this.name = "PayoniqError";
14
+ this.code = code;
15
+ this.status = status;
16
+ }
17
+ }
18
+ exports.PayoniqError = PayoniqError;
19
+ class PayoniqClient {
20
+ apiKey;
21
+ apiSecret;
22
+ baseUrl;
23
+ sessions;
24
+ webhooks;
25
+ constructor(options) {
26
+ if (!options.apiKey) {
27
+ throw new PayoniqError("apiKey is required to initialize PayoniqClient", "MISSING_API_KEY");
28
+ }
29
+ this.apiKey = options.apiKey;
30
+ this.apiSecret = options.apiSecret;
31
+ this.baseUrl = (options.baseUrl || "http://localhost:4000").replace(/\/+$/, "");
32
+ this.sessions = {
33
+ create: async (opts) => {
34
+ const res = await this.request("/api/v1/sessions/create", {
35
+ method: "POST",
36
+ body: JSON.stringify({
37
+ amount: opts.amount,
38
+ currency: opts.currency || "BDT",
39
+ orderId: opts.orderId,
40
+ method: opts.method || "ANY",
41
+ customerName: opts.customerName,
42
+ customerEmail: opts.customerEmail,
43
+ customerPhone: opts.customerPhone,
44
+ successUrl: opts.successUrl,
45
+ cancelUrl: opts.cancelUrl,
46
+ metadata: opts.metadata,
47
+ expiryMinutes: opts.expiryMinutes || 15,
48
+ }),
49
+ });
50
+ if (!res.data) {
51
+ throw new PayoniqError("Session creation returned empty response", "MALFORMED_RESPONSE");
52
+ }
53
+ const sess = res.data;
54
+ const checkoutHost = this.baseUrl.includes(":4000")
55
+ ? this.baseUrl.replace(":4000", ":5173")
56
+ : this.baseUrl;
57
+ return {
58
+ id: sess.id,
59
+ orderHash: sess.orderHash,
60
+ orderId: sess.orderId,
61
+ amount: sess.amount,
62
+ currency: sess.currency,
63
+ status: sess.status,
64
+ method: sess.method,
65
+ checkoutUrl: `${checkoutHost}/${sess.orderHash}`,
66
+ expiresAt: sess.expiresAt,
67
+ createdAt: sess.createdAt,
68
+ metadata: sess.metadata,
69
+ };
70
+ },
71
+ get: async (orderHash) => {
72
+ const res = await this.request(`/api/v1/sessions/${encodeURIComponent(orderHash)}`, {
73
+ method: "GET",
74
+ });
75
+ if (!res.data) {
76
+ throw new PayoniqError("Session not found", "NOT_FOUND", 404);
77
+ }
78
+ const sess = res.data;
79
+ const checkoutHost = this.baseUrl.includes(":4000")
80
+ ? this.baseUrl.replace(":4000", ":5173")
81
+ : this.baseUrl;
82
+ return {
83
+ id: sess.id,
84
+ orderHash: sess.orderHash,
85
+ orderId: sess.orderId,
86
+ amount: sess.amount,
87
+ currency: sess.currency,
88
+ status: sess.status,
89
+ method: sess.method,
90
+ checkoutUrl: `${checkoutHost}/${sess.orderHash}`,
91
+ expiresAt: sess.expiresAt,
92
+ createdAt: sess.createdAt,
93
+ metadata: sess.metadata,
94
+ };
95
+ },
96
+ };
97
+ this.webhooks = {
98
+ verifySignature: (rawBody, signatureHeader, toleranceSec = 300) => {
99
+ if (!this.apiSecret) {
100
+ throw new PayoniqError("apiSecret must be configured to verify webhook signatures", "MISSING_API_SECRET");
101
+ }
102
+ if (!signatureHeader)
103
+ return false;
104
+ // Signature Header format: t=1700000000,v1=abcdef...
105
+ const parts = signatureHeader.split(",").reduce((acc, part) => {
106
+ const [k, v] = part.split("=");
107
+ if (k && v)
108
+ acc[k.trim()] = v.trim();
109
+ return acc;
110
+ }, {});
111
+ const timestampStr = parts["t"];
112
+ const signature = parts["v1"];
113
+ if (!timestampStr || !signature)
114
+ return false;
115
+ const timestamp = parseInt(timestampStr, 10);
116
+ const nowSec = Math.floor(Date.now() / 1000);
117
+ if (toleranceSec > 0 && Math.abs(nowSec - timestamp) > toleranceSec) {
118
+ return false; // Replay attack detected
119
+ }
120
+ const bodyStr = typeof rawBody === "string" ? rawBody : rawBody.toString("utf-8");
121
+ const payloadToSign = `${timestamp}.${bodyStr}`;
122
+ const expectedSignature = crypto_1.default
123
+ .createHmac("sha256", this.apiSecret)
124
+ .update(payloadToSign)
125
+ .digest("hex");
126
+ try {
127
+ return crypto_1.default.timingSafeEqual(Buffer.from(signature, "hex"), Buffer.from(expectedSignature, "hex"));
128
+ }
129
+ catch {
130
+ return false;
131
+ }
132
+ },
133
+ constructEvent: (rawBody, signatureHeader) => {
134
+ const isValid = this.webhooks.verifySignature(rawBody, signatureHeader);
135
+ if (!isValid) {
136
+ throw new PayoniqError("Invalid webhook signature or expired timestamp", "INVALID_SIGNATURE", 400);
137
+ }
138
+ const bodyStr = typeof rawBody === "string" ? rawBody : rawBody.toString("utf-8");
139
+ return JSON.parse(bodyStr);
140
+ },
141
+ };
142
+ }
143
+ /**
144
+ * Internal request helper
145
+ */
146
+ async request(path, init) {
147
+ const url = `${this.baseUrl}${path}`;
148
+ const headers = {
149
+ "Content-Type": "application/json",
150
+ "x-api-key": this.apiKey,
151
+ ...(this.apiSecret ? { "x-api-secret": this.apiSecret } : {}),
152
+ ...init?.headers,
153
+ };
154
+ const res = await fetch(url, {
155
+ ...init,
156
+ headers,
157
+ });
158
+ const json = await res.json().catch(() => null);
159
+ if (!res.ok) {
160
+ throw new PayoniqError(json?.message || `Request failed with status ${res.status}`, json?.error || "REQUEST_FAILED", res.status);
161
+ }
162
+ return json;
163
+ }
164
+ }
165
+ exports.PayoniqClient = PayoniqClient;
166
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AA0C5B,MAAa,YAAa,SAAQ,KAAK;IAC9B,IAAI,CAAU;IACd,MAAM,CAAU;IAEvB,YAAY,OAAe,EAAE,IAAa,EAAE,MAAe;QACzD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAVD,oCAUC;AAED,MAAa,aAAa;IACR,MAAM,CAAS;IACf,SAAS,CAAU;IACnB,OAAO,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AAM,CACX,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAzLD,sCAyLC"}
package/package.json CHANGED
@@ -1,6 +1,35 @@
1
1
  {
2
2
  "name": "@snexon/payoniq-lite",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Official TypeScript & Node.js SDK for Payoniq Gateway by Snexon",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "scripts": {
14
+ "build": "tsc",
15
+ "prepublishOnly": "npm run build"
16
+ },
17
+ "keywords": [
18
+ "payoniq",
19
+ "payonic",
20
+ "snexon",
21
+ "payments",
22
+ "bkash",
23
+ "nagad",
24
+ "rocket",
25
+ "upay",
26
+ "crypto",
27
+ "gateway",
28
+ "sdk"
29
+ ],
30
+ "author": "Snexon",
31
+ "license": "MIT",
32
+ "devDependencies": {
33
+ "typescript": "^5.6.3"
34
+ }
35
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.