gembapay 1.1.1 → 1.3.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.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # GembaPay
2
2
 
3
- **Unified payment gateway for crypto, cards, and PayPal.**
3
+ **Unified payment gateway for cards and PayPal.**
4
4
 
5
- Accept ETH, BNB, POL, USDC, USDT, credit cards (via Stripe), and PayPal through a single API. Non-custodial crypto payments — funds go directly to your wallet via smart contract.
5
+ Accept credit cards (via Stripe) and PayPal through a single API. Funds settle directly into the merchant's own connected account — GembaPay never holds your money.
6
6
 
7
7
  [![npm](https://img.shields.io/npm/v/gembapay)](https://www.npmjs.com/package/gembapay)
8
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
@@ -11,11 +11,10 @@ Accept ETH, BNB, POL, USDC, USDT, credit cards (via Stripe), and PayPal through
11
11
 
12
12
  ## Features
13
13
 
14
- - **One API, three payment methods** — Crypto, Stripe (cards/Apple Pay/Google Pay), PayPal
15
- - **Non-custodial crypto** — Payments route directly to your wallet via smart contracts
16
- - **86+ currencies** — Price in any fiat currency, settle in crypto or fiat
17
- - **Multi-chain** — Ethereum, BNB Smart Chain, Polygon
18
- - **Test mode built-in** — Testnets + sandbox environments for development
14
+ - **One API, two payment methods** — Stripe (cards/Apple Pay/Google Pay) and PayPal
15
+ - **Direct settlement** — Payments route straight into your own Stripe or PayPal account
16
+ - **51+ currencies** — Price in any supported currency
17
+ - **Test mode built-in** — Stripe and PayPal sandbox environments for development
19
18
  - **TypeScript support** — Full type definitions included
20
19
  - **Zero dependencies** — Uses only Node.js built-in modules
21
20
 
@@ -46,7 +45,7 @@ console.log(payment.paymentUrl);
46
45
  // → https://payment.gembapay.com/checkout/3f9c1e7a-2b4d-4c8e-9f10-a2b3c4d5e6f7
47
46
 
48
47
  console.log(payment.allowedMethods);
49
- // → ['crypto', 'stripe', 'paypal']
48
+ // → ['stripe', 'paypal']
50
49
  ```
51
50
 
52
51
  ## Usage
@@ -72,7 +71,7 @@ res.redirect(payment.paymentUrl);
72
71
  const status = await gembapay.getPaymentStatus('ORDER-456');
73
72
 
74
73
  console.log(status.status); // 'completed'
75
- console.log(status.network); // 'bsc', 'stripe', 'paypal', etc.
74
+ console.log(status.network); // 'stripe', 'paypal'
76
75
  ```
77
76
 
78
77
  ### Webhook Verification
@@ -133,7 +132,6 @@ Use test API keys (`gembapay_test_...`) for development. Test mode automatically
133
132
 
134
133
  | Method | Test Environment |
135
134
  |--------|-----------------|
136
- | Crypto | Sepolia, BSC Testnet, Polygon Amoy |
137
135
  | Stripe | Test cards (`4242 4242 4242 4242`) |
138
136
  | PayPal | Sandbox accounts |
139
137
 
@@ -212,7 +210,6 @@ app.listen(3000);
212
210
 
213
211
  | Method | Fee |
214
212
  |--------|-----|
215
- | Crypto (ETH, BNB, POL, USDC, USDT) | 1% |
216
213
  | Stripe (Cards, Apple Pay, Google Pay) | 1% + €0.20 + Stripe fees |
217
214
  | PayPal (Balance, Bank, Pay Later) | 1% + €0.20 + PayPal fees |
218
215
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gembapay",
3
- "version": "1.1.1",
4
- "description": "GembaPay — Unified payment gateway for crypto (ETH, BNB, POL, USDC, USDT), Stripe, and PayPal. Non-custodial payments.",
3
+ "version": "1.3.0",
4
+ "description": "GembaPay \u2014 unified payment gateway for Stripe card payments and PayPal. Funds settle directly to the merchant.",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
7
7
  "files": [
@@ -16,39 +16,26 @@
16
16
  "keywords": [
17
17
  "payments",
18
18
  "payment-gateway",
19
- "crypto",
20
- "crypto-payments",
21
- "cryptocurrency",
22
- "bitcoin",
23
- "ethereum",
24
- "eth",
25
- "bnb",
26
- "polygon",
27
- "matic",
28
- "usdc",
29
- "usdt",
30
- "stablecoin",
31
19
  "stripe",
32
20
  "paypal",
21
+ "card-payments",
22
+ "credit-card",
33
23
  "fiat-payments",
34
- "non-custodial",
35
- "web3",
36
- "blockchain",
37
- "smart-contract",
38
- "defi",
39
24
  "payment-processing",
40
25
  "checkout",
26
+ "unified-checkout",
41
27
  "ecommerce",
42
28
  "gateway",
43
- "protocol",
44
- "crypto-protocol",
45
29
  "merchant",
46
- "accept-crypto",
47
30
  "accept-payments",
48
- "unified-checkout",
49
- "multi-chain",
31
+ "payment-links",
32
+ "qr-payments",
33
+ "subscriptions",
34
+ "recurring-billing",
50
35
  "apple-pay",
51
- "google-pay"
36
+ "google-pay",
37
+ "webhooks",
38
+ "sdk"
52
39
  ],
53
40
  "author": {
54
41
  "name": "GEMBA EOOD",
package/src/index.d.ts CHANGED
@@ -15,7 +15,7 @@ declare module 'gembapay' {
15
15
  orderId: string;
16
16
  /** Payment amount */
17
17
  amount: number;
18
- /** Currency code — 86+ supported (default: 'USD') */
18
+ /** Currency code — 51+ supported (default: 'USD') */
19
19
  currency?: string;
20
20
  /** Payment description */
21
21
  description?: string;
@@ -28,7 +28,7 @@ declare module 'gembapay' {
28
28
  amountUsd: string;
29
29
  amountOriginal: number;
30
30
  currencyOriginal: string;
31
- allowedMethods: ('crypto' | 'stripe' | 'paypal')[];
31
+ allowedMethods: ('stripe' | 'paypal')[];
32
32
  expiresAt: string;
33
33
  }
34
34
 
@@ -36,25 +36,30 @@ declare module 'gembapay' {
36
36
  orderId: string;
37
37
  status: 'pending' | 'processing' | 'confirmed' | 'completed' | 'failed' | 'expired';
38
38
  amountUsd: string;
39
- network: 'ethereum' | 'bsc' | 'polygon' | 'sepolia' | 'bscTestnet' | 'amoy' | 'stripe' | 'paypal';
40
- paymentProvider: 'crypto' | 'stripe' | 'paypal';
39
+ network: 'stripe' | 'paypal';
40
+ paymentProvider: 'stripe' | 'paypal';
41
41
  payment?: {
42
- txHash?: string;
42
+ reference?: string;
43
43
  tokenSymbol?: string;
44
44
  tokenAmount?: string;
45
45
  };
46
46
  }
47
47
 
48
+ /** Stripe may add other values over time - treat unknown ones like 'card'. */
49
+ export type PaymentMethod = 'card' | 'apple_pay' | 'google_pay' | 'link' | (string & {});
50
+
48
51
  export interface WebhookEvent {
49
52
  event: 'payment.completed' | 'payment.failed';
50
53
  testMode?: boolean;
51
54
  payment: {
52
55
  orderId: string;
53
- txHash?: string;
56
+ reference?: string;
54
57
  network: string;
55
58
  usdAmount: number;
56
59
  tokenAmount?: string;
57
60
  paymentProvider?: string;
61
+ /** How the customer paid. null for PayPal and payments recorded before 2026-10-21. */
62
+ paymentMethod?: PaymentMethod | null;
58
63
  };
59
64
  timestamp: string;
60
65
  }
package/src/index.js CHANGED
@@ -43,7 +43,7 @@ class GembaPay {
43
43
  * @param {Object} params
44
44
  * @param {string} params.orderId - Your unique order identifier
45
45
  * @param {number} params.amount - Payment amount
46
- * @param {string} [params.currency='USD'] - Currency code (86+ supported)
46
+ * @param {string} [params.currency='USD'] - Currency code (51+ supported)
47
47
  * @param {string} [params.description] - Payment description
48
48
  * @returns {Promise<Object>} Payment request with paymentUrl
49
49
  */