diff --git a/CHANGELOG.md b/CHANGELOG.md index 751afd3df..b620ec21a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## Unreleased +**Features** + +- `CustomerSheet` is now generally available! + - If you were using `CustomerSheetBeta`, change that to `CustomerSheet`. + - If you were using `CustomerSheetBeta.CustomerSheet`, change that to `CustomerSheet.Component` + ## 0.39.0 - 2024-10-15 **Features** diff --git a/example/src/screens/CustomerSheetScreen.tsx b/example/src/screens/CustomerSheetScreen.tsx index 26c17b784..44c60f336 100644 --- a/example/src/screens/CustomerSheetScreen.tsx +++ b/example/src/screens/CustomerSheetScreen.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Alert, Image, StyleSheet, Switch, Text, View } from 'react-native'; -import { CustomerSheetBeta } from '@stripe/stripe-react-native'; +import { CustomerSheet } from '@stripe/stripe-react-native'; import { PaymentSheet } from '@stripe/stripe-react-native'; import Button from '../components/Button'; import PaymentScreen from '../components/PaymentScreen'; @@ -64,7 +64,7 @@ export default function CustomerSheetScreen() { address: address, }; - const { error } = await CustomerSheetBeta.initialize({ + const { error } = await CustomerSheet.initialize({ setupIntentClientSecret, customerEphemeralKeySecret, customerId, @@ -87,7 +87,7 @@ export default function CustomerSheetScreen() { error: retrievalError, paymentOption, paymentMethod, - } = await CustomerSheetBeta.retrievePaymentOptionSelection(); + } = await CustomerSheet.retrievePaymentOptionSelection(); if (retrievalError) { Alert.alert(retrievalError.code, retrievalError.localizedMessage); } @@ -107,7 +107,7 @@ export default function CustomerSheetScreen() { setCustomerSheetVisible(true); } else { const { error, paymentOption, paymentMethod } = - await CustomerSheetBeta.present(); + await CustomerSheet.present(); if (error) { Alert.alert(error.code, error.localizedMessage); } @@ -136,7 +136,7 @@ export default function CustomerSheetScreen() { }} /> {useComponent && customerAdapter && ( -