@paynl/payparts-types 1.4.0-alpha.96 → 1.29.0-alpha.5

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.
@@ -53,6 +53,7 @@ export interface PaymentMethodContext {
53
53
  returnUrl: string;
54
54
  threeDs?: ThreeDsData;
55
55
  transaction?: TransactionData;
56
+ orderStatus?: OrderPaymentStatus;
56
57
  }) => void;
57
58
  onPartialPaid?: (data: PartialPaymentEventData) => void;
58
59
  onInfoUpdated?: (data: InfoUpdatedEvent['data']) => void;
@@ -178,6 +179,7 @@ export interface PaymentInfo {
178
179
  authorizedAmount: AmountDto;
179
180
  status: string;
180
181
  }
182
+ export type ExpressButtonsLayout = 'vertical' | 'horizontal';
181
183
  export interface CheckoutConfig {
182
184
  sessionToken?: string;
183
185
  sessionId?: string;
@@ -207,6 +209,10 @@ export interface CheckoutConfig {
207
209
  };
208
210
  customer?: CustomerInfo;
209
211
  order?: OrderInfo;
212
+ lastUsedMethodId?: number;
213
+ lastUsedSubMethodId?: number;
214
+ lastUsedBankAccountNumber?: string;
215
+ lastUsedEnabled?: boolean;
210
216
  payments?: SessionPaymentInfo[];
211
217
  capturedAmount?: AmountDto;
212
218
  authorizedAmount?: AmountDto;
@@ -220,6 +226,12 @@ export interface CheckoutConfig {
220
226
  * 'new_tab' - open the payment URL in a new tab
221
227
  */
222
228
  methodLinkMode?: 'new_tab' | 'same_page';
229
+ /**
230
+ * Layout for the express checkout buttons.
231
+ * 'vertical' (default) - buttons stacked on top of each other
232
+ * 'horizontal' - buttons side by side in a single row
233
+ */
234
+ expressButtonsLayout?: ExpressButtonsLayout;
223
235
  debugMode?: boolean;
224
236
  /**
225
237
  * Payment method tags to exclude from display (e.g., ['PM_10', 'PM_11']).
@@ -257,6 +269,7 @@ export interface PaymentSuccessEventData {
257
269
  returnUrl?: string;
258
270
  threeDs?: ThreeDsData;
259
271
  transaction?: TransactionData;
272
+ orderStatus?: OrderPaymentStatus;
260
273
  }
261
274
  export interface PartialPaymentEventData {
262
275
  orderId: string;
@@ -365,7 +378,7 @@ export interface PaymentStatusInfo {
365
378
  export interface PaymentSuccessEvent {
366
379
  orderId: string;
367
380
  returnUrl: string;
368
- paymentStatus?: PaymentStatusInfo;
381
+ paymentStatus: OrderPaymentStatus | undefined;
369
382
  resolve: () => void;
370
383
  reject: (error: Error) => void;
371
384
  }
@@ -642,10 +655,20 @@ export interface InitOptions {
642
655
  * 'new_tab' - open the payment URL in a new tab
643
656
  */
644
657
  methodLinkMode?: 'new_tab' | 'same_page';
658
+ /**
659
+ * Layout for the express checkout buttons.
660
+ * 'vertical' (default) - buttons stacked on top of each other
661
+ * 'horizontal' - buttons side by side in a single row
662
+ */
663
+ expressButtonsLayout?: ExpressButtonsLayout;
645
664
  /**
646
665
  * Debug mode - shows disabled/hidden payment methods with min/max amounts.
647
666
  */
648
667
  debugMode?: boolean;
668
+ /**
669
+ * When enabled, the customer's last used payment method is promoted to the top of the list.
670
+ */
671
+ lastUsedEnabled?: boolean;
649
672
  /**
650
673
  * Custom translations to override or extend default translations.
651
674
  */
@@ -1,5 +1,5 @@
1
1
  import { PayPartsSDK } from '../../src/core/types';
2
- export type { CheckoutConfig, CheckoutOption, PaymentMethod, PaymentMethodOption, CountrySequence, CheckoutSequence, PaymentInfo, SessionPaymentInfo, OrderPaymentInfo, CheckoutState, CheckoutEventType, CheckoutEvent, InitialisingEventData, ReadyEventData, StateChangeEventData, PaymentSubmitEventData, PaymentErrorEventData, PaymentSuccessEventData, PartialPaymentEventData, ThreeDsData, TransactionData, MountOptions, MountEventHandlers, MountResult, Checkout, PaymentComponent, CheckoutEventHandlers, PaymentMethodContext, PaymentSubmitEvent, PaymentSuccessEvent, PaymentErrorEvent, FieldError, CheckoutReadyEvent, InitOptions, ShippingUpdatedEvent, InfoUpdatedEvent, PartialPaymentEvent, ApplePayOptions, ApplePayShippingMethod, ApplePayLineItem, ApplePayShippingContact, PayPalOptions, CustomerInfo, AddressInfo, OrderInfo, OrderProduct, AmountDto, MerchantInfo, LocationInfo, PayPartsSDK, } from '../../src/core/types';
2
+ export type { CheckoutConfig, CheckoutOption, PaymentMethod, PaymentMethodOption, CountrySequence, CheckoutSequence, PaymentInfo, SessionPaymentInfo, OrderPaymentInfo, CheckoutState, CheckoutEventType, CheckoutEvent, InitialisingEventData, ReadyEventData, StateChangeEventData, PaymentSubmitEventData, PaymentErrorEventData, PaymentSuccessEventData, PartialPaymentEventData, ThreeDsData, TransactionData, MountOptions, MountEventHandlers, MountResult, Checkout, PaymentComponent, CheckoutEventHandlers, PaymentMethodContext, PaymentSubmitEvent, PaymentSuccessEvent, PaymentErrorEvent, FieldError, CheckoutReadyEvent, InitOptions, ShippingUpdatedEvent, InfoUpdatedEvent, PartialPaymentEvent, ApplePayOptions, ApplePayShippingMethod, ApplePayLineItem, ApplePayShippingContact, PayPalOptions, ExpressButtonsLayout, CustomerInfo, AddressInfo, OrderInfo, OrderProduct, AmountDto, MerchantInfo, LocationInfo, PayPartsSDK, } from '../../src/core/types';
3
3
  export type { PaymentOutcome, PaymentStatusInfo } from '../../src/core/payment-status';
4
4
  export type { ApiErrorResponse, ApiFieldError } from '../../src/core/errors/api-error-response';
5
5
  export type { PaymentError } from '../../src/core/errors/PaymentError';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paynl/payparts-types",
3
- "version": "1.4.0-alpha.96",
3
+ "version": "1.29.0-alpha.5",
4
4
  "description": "TypeScript type definitions for the PayParts payment SDK",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",