Customer Center
Expo Customer Center presentation methods, options, configuration, and related types.
The Customer Center APIs are available in the hooks package and the compatibility package beginning with Expo SDK v1.6.0. The configuration and behavior are shared across iOS and Android unless marked otherwise.
presentCustomerCenter(options?)
Presents the Customer Center and resolves when it is dismissed. It resolves immediately if another Customer Center is already presented or the native screen cannot be shown. Pass a configuration to override the provider's options.customerCenter for this presentation.
import { Button } from "react-native";
import { useSuperwall } from "expo-superwall";
function ManagePurchasesButton() {
const { presentCustomerCenter } = useSuperwall();
return (
<Button
title="Manage purchases"
onPress={() =>
void presentCustomerCenter({
onAction: (action, pathId, purchase) => {
if (action.type === "custom") {
openAccountSettings(action.identifier);
}
},
})
}
/>
);
}PresentCustomerCenterOptions
Prop
Type
dismissCustomerCenter()
Dismisses the Customer Center, if one is presented, and resolves when dismissal completes. It is available from useSuperwall() and Superwall.shared in the compatibility API.
CustomerCenterConfiguration
Pass this object as options.customerCenter to <SuperwallProvider />, or as configuration to presentCustomerCenter(). Every omitted field uses its native default. You can update the following values for a single presentation without reconfiguring the SDK.
Prop
Type
CustomerCenterScreen
Prop
Type
CustomerCenterPath
Every path can include an optional id, title, and survey. The type selects its action:
Prop
Type
CustomerCenterFeedbackSurvey
Prop
Type
Support and appearance
Prop
Type
Related types
onAction receives a CustomerCenterAction, with built-in action names or the URL/custom data below. The purchase argument is null for a screen-level action; otherwise it contains the purchase the selected path applies to.
Prop
Type
The Customer Center also emits customerCenterOpen, customerCenterClose, customerCenterAction, customerCenterSurveyResponse, and customerCenterRefundRequest. Their event fields are listed in useSuperwallEvents.
How is this guide?