-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2beac91
commit d3cf05d
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,30 @@ | ||
export interface StripeEmbeddedCheckoutOptions { | ||
/** | ||
* The client secret of the [Checkout Session](https://stripe.com/docs/api/checkout/sessions). | ||
*/ | ||
clientSecret: string; | ||
/** | ||
* onComplete is called when the Checkout Session completes successfully. | ||
* You can use it to unmount Embedded Checkout and render a custom success UI. | ||
*/ | ||
onComplete?: () => void; | ||
} | ||
|
||
export interface StripeEmbeddedCheckout { | ||
/** | ||
* The `embeddedCheckout.mount` method attaches your Embedded Checkout to the DOM. | ||
* `mount` accepts either a CSS Selector (e.g., `'#checkout'`) or a DOM element. | ||
*/ | ||
mount(location: string | HTMLElement): void; | ||
/** | ||
* Unmounts Embedded Checkout from the DOM. | ||
* Call `embeddedCheckout.mount` to re-attach it to the DOM. | ||
*/ | ||
unmount(): void; | ||
/** | ||
* Removes Embedded Checkout from the DOM and destroys it. | ||
* Once destroyed it not be re-mounted to the DOM. | ||
* Use this if you want to create a new Embedded Checkout instance. | ||
*/ | ||
destroy(): void; | ||
} |