Viewports reference
A list of available viewports for Stripe Apps and how your end users see them.
A viewport specifies the page in the Dashboard where your view can appear. A viewport can provide an environment.
object that allows you to receive context on a current page’s Stripe object. For more information, see Access Stripe objects in the Dashboard.
Available viewports for your UI extension:
Viewport ID | Page | URLs | Object type | |
---|---|---|---|---|
stripe. | Payments page | dashboard. | null | |
stripe. | Payment details page | dashboard. | charge , payment_ | |
stripe. | Customers page | dashboard. | null | |
stripe. | Customer details page | dashboard. | customer | |
stripe. | Invoices page | dashboard. | null | |
stripe. | Invoice details page | dashboard. | invoice | |
stripe. | Products page | dashboard. | null | |
stripe. | Product details page | dashboard. | product | |
stripe. | Subscriptions page | dashboard. | null | |
stripe. | Subscription details page | dashboard. | subscription | |
stripe. | Payment Links page | dashboard. | null | |
stripe. | Payment Link details page | dashboard. | payment_ | |
stripe. | Dashboard homepage | dashboard. | null | |
stripe. | Balance page | dashboard. | null | |
stripe. | Billing page | dashboard. | null | |
stripe. | Reports > Overview page | dashboard. | null | |
stripe. | Revenue Recognition page | dashboard. | null | |
stripe. | Shipping Rates page | dashboard. | null | |
stripe. | Shipping Rate details page | dashboard. | shipping_ | |
stripe. | Reports > Tax page | dashboard. | null | |
stripe. | Available across all pages (For more information, see Dashboard-wide availability) | null | ||
settings | App settings page (For more information, learn how to add an app settings page.) | null |
Application availability
You can make your application available across all pages or specific to a single page in the Dashboard.
Dashboard-wide availability
If your app specifies a view for the stripe.
viewport, this view appears on every page in the Dashboard except for where you have defined page-specific views.
For example, if the ui_
field in your app’s stripe-app.
manifest is as follows:
{ "id": "com.example.app", "version": "1.2.3", "name": "Example App", "icon": "./example_icon_32.png", "permissions": [ { "permission": "customer_read", "purpose": "Receive access to the customer information" } ], "ui_extension": { "views": [ { "viewport": "stripe.dashboard.customer.detail", "component": "CustomerView" }, { "viewport": "stripe.dashboard.drawer.default", "component": "EverywhereElseView" } ] } }
“CustomerView” would appear when the application is open on the Customer details page, and “EverywhereElseView” would appear on every other page in the Dashboard.
The stripe.
view doesn’t receive objectContext
data the way that a page-specific view does. If your app needs to access information like the id
of an invoice shown on an “Invoice details” page, you need to create a view that uses the stripe.
viewport. For more information, see Page-specific availability.
Page-specific availability
Page-specific views relate to the current page the user is viewing, and allow apps to receive additional context about the page through the environment
property. For more information, see Access Stripe objects in the Dashboard.
For example, if your app has a view for the stripe.
viewport, when a user opens your app on the Product details page, that view appears in the app.
If your app doesn’t have either a page-specific view for the current page or an app-specific default view, the drawer displays a generic default view that shows the user how to access the app.
For example, if your app has two views on page-specific viewports, shown in the app manifest below:
{ "id": "com.example.app", "version": "1.2.3", "name": "Example App", "icon": "./example_icon_32.png", "permissions": [ { "permission": "customer_read", "purpose": "Receive access to the customer information" } ], "ui_extension": { "views": [ { "viewport": "stripe.dashboard.customer.detail", "component": "CustomerView" }, { "viewport": "stripe.dashboard.product.detail", "component": "ProductView" } ] } }
When the end user opens your app on the Dashboard homepage, the application displays links to the Customers and Products pages. If the user then navigates to the Customers page, the app displays a message prompting them to select a customer to see related information in your app.