@pague-dev/sdk-node 0.2.0 → 0.2.2

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/dist/index.d.cts CHANGED
@@ -302,6 +302,8 @@ interface WebhookPayload<T extends WebhookEventType, D> {
302
302
  interface PaymentCompletedData {
303
303
  /** Transaction identifier */
304
304
  transactionId: string;
305
+ /** Environment where the transaction occurred */
306
+ environment: 'production' | 'sandbox';
305
307
  /** Payment amount */
306
308
  amount: number;
307
309
  /** Platform fees charged */
@@ -318,6 +320,8 @@ interface PaymentCompletedData {
318
320
  completedAt: string;
319
321
  /** Your external reference ID (optional) */
320
322
  externalReference?: string;
323
+ /** Custom metadata passed when creating the payment */
324
+ metadata?: Record<string, unknown>;
321
325
  }
322
326
  /**
323
327
  * Data payload for refund_completed event
@@ -327,6 +331,8 @@ interface RefundCompletedData {
327
331
  refundTransactionId: string;
328
332
  /** Original payment transaction ID that was refunded */
329
333
  originalTransactionId: string;
334
+ /** Environment where the transaction occurred */
335
+ environment: 'production' | 'sandbox';
330
336
  /** Refunded amount */
331
337
  amount: number;
332
338
  /** Fees charged for the refund */
@@ -339,6 +345,8 @@ interface RefundCompletedData {
339
345
  status: 'completed';
340
346
  /** ISO 8601 timestamp of when refund was completed */
341
347
  completedAt: string;
348
+ /** Custom metadata from the original payment */
349
+ metadata?: Record<string, unknown>;
342
350
  }
343
351
  /**
344
352
  * Data payload for withdrawal_completed event
@@ -346,6 +354,8 @@ interface RefundCompletedData {
346
354
  interface WithdrawalCompletedData {
347
355
  /** Withdrawal identifier */
348
356
  withdrawalId: string;
357
+ /** Environment where the withdrawal occurred */
358
+ environment: 'production' | 'sandbox';
349
359
  /** Withdrawal amount */
350
360
  amount: number;
351
361
  /** Fees charged for the withdrawal */
@@ -358,6 +368,8 @@ interface WithdrawalCompletedData {
358
368
  status: 'completed';
359
369
  /** ISO 8601 timestamp of when withdrawal was completed */
360
370
  completedAt: string;
371
+ /** Custom metadata from the withdrawal request */
372
+ metadata?: Record<string, unknown>;
361
373
  }
362
374
  /**
363
375
  * Data payload for withdrawal_failed event
@@ -365,6 +377,8 @@ interface WithdrawalCompletedData {
365
377
  interface WithdrawalFailedData {
366
378
  /** Withdrawal identifier */
367
379
  withdrawalId: string;
380
+ /** Environment where the withdrawal occurred */
381
+ environment: 'production' | 'sandbox';
368
382
  /** Withdrawal amount */
369
383
  amount: number;
370
384
  /** Fees that would have been charged */
@@ -379,6 +393,8 @@ interface WithdrawalFailedData {
379
393
  failedAt: string;
380
394
  /** Reason for failure (e.g., "insufficient_funds", "invalid_account") */
381
395
  failureReason: string;
396
+ /** Custom metadata from the withdrawal request */
397
+ metadata?: Record<string, unknown>;
382
398
  }
383
399
  /**
384
400
  * Payment completed webhook event
package/dist/index.d.mts CHANGED
@@ -302,6 +302,8 @@ interface WebhookPayload<T extends WebhookEventType, D> {
302
302
  interface PaymentCompletedData {
303
303
  /** Transaction identifier */
304
304
  transactionId: string;
305
+ /** Environment where the transaction occurred */
306
+ environment: 'production' | 'sandbox';
305
307
  /** Payment amount */
306
308
  amount: number;
307
309
  /** Platform fees charged */
@@ -318,6 +320,8 @@ interface PaymentCompletedData {
318
320
  completedAt: string;
319
321
  /** Your external reference ID (optional) */
320
322
  externalReference?: string;
323
+ /** Custom metadata passed when creating the payment */
324
+ metadata?: Record<string, unknown>;
321
325
  }
322
326
  /**
323
327
  * Data payload for refund_completed event
@@ -327,6 +331,8 @@ interface RefundCompletedData {
327
331
  refundTransactionId: string;
328
332
  /** Original payment transaction ID that was refunded */
329
333
  originalTransactionId: string;
334
+ /** Environment where the transaction occurred */
335
+ environment: 'production' | 'sandbox';
330
336
  /** Refunded amount */
331
337
  amount: number;
332
338
  /** Fees charged for the refund */
@@ -339,6 +345,8 @@ interface RefundCompletedData {
339
345
  status: 'completed';
340
346
  /** ISO 8601 timestamp of when refund was completed */
341
347
  completedAt: string;
348
+ /** Custom metadata from the original payment */
349
+ metadata?: Record<string, unknown>;
342
350
  }
343
351
  /**
344
352
  * Data payload for withdrawal_completed event
@@ -346,6 +354,8 @@ interface RefundCompletedData {
346
354
  interface WithdrawalCompletedData {
347
355
  /** Withdrawal identifier */
348
356
  withdrawalId: string;
357
+ /** Environment where the withdrawal occurred */
358
+ environment: 'production' | 'sandbox';
349
359
  /** Withdrawal amount */
350
360
  amount: number;
351
361
  /** Fees charged for the withdrawal */
@@ -358,6 +368,8 @@ interface WithdrawalCompletedData {
358
368
  status: 'completed';
359
369
  /** ISO 8601 timestamp of when withdrawal was completed */
360
370
  completedAt: string;
371
+ /** Custom metadata from the withdrawal request */
372
+ metadata?: Record<string, unknown>;
361
373
  }
362
374
  /**
363
375
  * Data payload for withdrawal_failed event
@@ -365,6 +377,8 @@ interface WithdrawalCompletedData {
365
377
  interface WithdrawalFailedData {
366
378
  /** Withdrawal identifier */
367
379
  withdrawalId: string;
380
+ /** Environment where the withdrawal occurred */
381
+ environment: 'production' | 'sandbox';
368
382
  /** Withdrawal amount */
369
383
  amount: number;
370
384
  /** Fees that would have been charged */
@@ -379,6 +393,8 @@ interface WithdrawalFailedData {
379
393
  failedAt: string;
380
394
  /** Reason for failure (e.g., "insufficient_funds", "invalid_account") */
381
395
  failureReason: string;
396
+ /** Custom metadata from the withdrawal request */
397
+ metadata?: Record<string, unknown>;
382
398
  }
383
399
  /**
384
400
  * Payment completed webhook event
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pague-dev/sdk-node",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Node.js SDK for the pague.dev API",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",