Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 81 additions & 2 deletions types/stripe-js/elements-group.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1404,15 +1404,94 @@ export interface CustomPaymentMethod {
/**
* Additional options to configure the Custom Payment Method.
*/
options: {
options?: {
/**
* The payment form type.
*/
type: 'static';
type: 'static' | 'embedded';

/**
* Display additional information about the payment method, max 100 characters.
*/
subtitle?: string;

/**
* Requires beta access:
* Contact [Stripe support](https://support.stripe.com/) for more information.
*
* Options for the embedded Custom Payment Method. Required for type: 'embedded'.
*/
embedded?: {
/**
* Function for rendering custom content in the Custom Payment Method form, called on mount.
*/
handleRender: (container: HTMLDivElement) => void;

/**
* Function for cleaning up the Custom Payment Method form, called when the Custom Payment Method is removed and on unmount.
*/
handleDestroy?: () => void;
};
};

/**
* Additional options to configure the Custom Payment Method in the Payment Element. Alias for `options`.
*/
payment?: {
/**
* The payment form type.
*/
type: 'static' | 'embedded';

/**
* Display additional information about the payment method, max 100 characters.
*/
subtitle?: string;

/**
* Requires beta access:
* Contact [Stripe support](https://support.stripe.com/) for more information.
*
* Options for the embedded Custom Payment Method. Required for type: 'embedded'.
*/
embedded?: {
/**
* Function for rendering custom content in the Custom Payment Method form, called on mount.
*/
handleRender: (container: HTMLDivElement) => void;

/**
* Function for cleaning up the Custom Payment Method form, called when the Custom Payment Method is removed and on unmount.
*/
handleDestroy?: () => void;
};
};

/**
* Requires beta access:
* Contact [Stripe support](https://support.stripe.com/) for more information.
*
* Additional options to configure the Custom Payment Method in the Express Checkout Element.
*/
expressCheckout?: {
/**
* The payment button type.
*/
type: 'embedded';

/**
* Options for the embedded Custom Payment Method.
*/
embedded: {
/**
* Function for rendering custom content in the Custom Payment Method button, called on mount.
*/
handleRender: (container: HTMLDivElement) => void;

/**
* Function for cleaning up the Custom Payment Method button, called when the Custom Payment Method is removed and on unmount.
*/
handleDestroy?: () => void;
};
};
}
1 change: 1 addition & 0 deletions types/stripe-js/elements/express-checkout.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ export interface StripeExpressCheckoutElementAvailablePaymentMethodsChangeEvent
paypal?: {available: boolean};
amazonPay?: {available: boolean};
klarna?: {available: boolean};
[customPaymentMethodId: string]: {available: boolean} | undefined;
}
| undefined;
}
Loading