Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Toast component for Stripe Apps


Dashboard only

Toast component for Stripe Apps Dashboard only

Inform users of temporary status.

SDK version

To add the Toast component to your app:

React.useEffect(() => {
 showToast('Changes saved', {type: 'success'});
}, []);

Render a toast at the bottom of your view to inform the user about the status of an action. For example, a toast can show a user whether an API call succeeded or failed.

The showToast() function takes two arguments, a message and options. The function is defined as follows:

type ToastType = "success" | "caution" | "pending" | undefined;
type ToastOptions = { type?: ToastType; action?: string; onAction: () => void; }
const showToast: (message: string, options?: ToastOptions) => Promise<{
 update: (updateMessage: string, updateOptions?: ToastOptions) => void;
 dismiss: () => void;
}>;

Toast messages can’t exceed 30 characters in length or be empty. If a message is too long or empty, the console logs an error.

Unless they’re of type pending, toasts dismiss automatically.

Is PendingHas ActionTimeout
falsefalse4s
falsetrue6s
truefalseNone
truetrueNone

Toasts can also prompt the user to take an action. Clicking the action button automatically dismisses the toast.

See also

Last verified 2026-09-24

Is this helpful?