@plyaz/types 1.46.2 → 1.46.3

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.
@@ -74,6 +74,7 @@ export interface PaymentStatusResult<TMetadata extends object = object> {
74
74
  /** Additional metadata or raw provider payload */
75
75
  metadata?: TMetadata;
76
76
  }
77
+ export type WebhookDomain = 'payment' | 'subscription' | 'payout' | 'kyc' | 'product' | 'dispute';
77
78
  /**
78
79
  * Generic webhook payload structure used for parsing
79
80
  * incoming events from any payment provider.
@@ -97,16 +98,24 @@ export interface WebhookPayload {
97
98
  export interface WebhookResult<TMetadata extends object = object> {
98
99
  /** Whether the webhook was successfully processed */
99
100
  success: boolean;
101
+ domain: WebhookDomain;
100
102
  /** Event type normalized to Plyaz domain */
101
103
  eventType: string;
102
104
  /** Transaction ID this event relates to */
103
- transactionId?: string;
104
- /** Updated payment status if applicable */
105
- updatedStatus?: PAYMENT_STATUS;
105
+ refId?: string;
106
106
  /** Optional message for logging or auditing */
107
- message?: string;
108
107
  /** Raw provider webhook payload */
109
108
  providerPayload?: TMetadata;
109
+ metadata?: Partial<{
110
+ message: string;
111
+ disputeReason: string;
112
+ disputeAmount: number;
113
+ payoutAmount: number;
114
+ payoutCurrency: string;
115
+ kycStatus: string;
116
+ productId: string;
117
+ updatedStatus: PAYMENT_STATUS;
118
+ }>;
110
119
  }
111
120
  /**
112
121
  * Options for calculating transaction fees before actual processing.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plyaz/types",
3
- "version": "1.46.2",
3
+ "version": "1.46.3",
4
4
  "author": "Redeemer Pace",
5
5
  "license": "ISC",
6
6
  "description": "Provides shared TypeScript types and schema utilities for validation and parsing in the @playz ecosystem.",