Repository navigation
feat: add checkoutButton title to PaymentSheetConfiguration - #63
Merged
Merged
Conversation
The native SDKs already support a custom checkout button title
(iOS AWXUIContext.Configuration.checkoutButton.title, Android
PaymentElementConfiguration.CheckoutButton), but the React Native
wrapper only passed `layout`. presentEntirePaymentFlow now accepts
`checkoutButton: { title }` and forwards it on both platforms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
weiping-awx
approved these changes
Oct 19, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The native SDKs already support a custom checkout button title on the payment sheet, but the React Native wrapper only forwards
layout, so RN apps can't use it:AWXUIContext.Configuration.checkoutButton.titlePaymentElementConfiguration.PaymentSheet(checkoutButton = CheckoutButton(title))This adds an optional
checkoutButton: { title }toPaymentSheetConfigurationand forwards it on both platforms:When
checkoutButtonortitleis omitted, behavior is unchanged (the SDK default "Pay" / "Confirm").Use case: show the amount the customer is about to pay on a one-off payment sheet, as suggested by the Airwallex team.
Changes
src/types/PaymentSheetConfiguration.ts: new optionalcheckoutButton?: CheckoutButtonConfiguration({ title?: string }).ios/AWXUIContextConfiguration+Extensions.swift: readscheckoutButton.titleintocheckoutButton.title.android/.../PaymentSheetConfigurationConverter.kt: passesCheckoutButton(title)intoPaymentSheet(defaultCheckoutButton()otherwise).README.md: documents the configuration object.example/src/App.tsx: new "PresentEntirePaymentFlow (custom button)" entry.src/__tests__/index.test.tsx: type-level test for the new option.Testing
yarn typecheck,yarn lint,yarn test: pass.🤖 Generated with Claude Code