Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support additional buttons stacked in WalletHeaderView for PaymentSheet #3087

Open
virginiacook opened this issue Nov 22, 2023 · 4 comments
Labels
kind:improvement triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@virginiacook
Copy link

virginiacook commented Nov 22, 2023

Is your feature request related to a problem? Please describe.

We would like to be able to support custom buttons below the primary payment buttons on the WalletHeaderView of the PaymentSheet. I am attaching a screenshot of what this would look like. These buttons would just be passed and stacked, and the associated actions would be handled by the view controller that is presenting the PaymentSheet.

Describe the solution you'd like

  • Add a new property to the PaymentSheet.Configurationpublic var additionalButtons: [UIButton] = []
  • Pass and store those additional buttons from the configuration in the WalletHeaderView initializer
  • Append the contents of the additional buttons array in the buildAndPinStackView function in the WalletHeaderView after conditionally adding the payWithLinkButton

The buttons would be completely setup and controller by the view controller that is presenting the PaymentSheet.

Alternatively this could just be an optional UIView passed from the configuration to the WalletHeaderView that would be stacked underneath those buttons.

Additional context

Simulator Screenshot - iPhone 15 Pro - 2023-11-22 at 13 37 31

@yuki-stripe
Copy link
Collaborator

Thank you for the feature request @virginiacook! To help us understand the use case, what would your app's additional buttons do? Are there other payment methods you'd like to support?

@virginiacook
Copy link
Author

Thank you for your response @yuki-stripe! We would like to support additional payment methods (such as internal credits + other external payment methods that are not yet integrated with Stripe that our account manager mentioned Stripe is working on to support at some point).

We would actually prefer a generic UIView that is stacked below the top buttons on the wallet header view (vs. an array of full-width buttons) so we can have greater control of the configuration of the subview's layout and could add labels/additional images if needed.

I believe other customers will also benefit greatly from this increased flexibility within the PaymentSheet.

Please let me know if I can answer any additional questions and thank you again!

@yuki-stripe
Copy link
Collaborator

Thanks for the extra details! We don't have immediate plans to support something like that, but we are exploring other ways to make PaymentSheet more flexible. I've raised your use case with the team. We might reach out to you for more feedback or to participate in a pilot program.

In the mean time, have you looked at PaymentSheet.FlowController? It's not very well documented but may be a better fit for your use case. In this integration you'd put a button in your checkout screen (the "Payment method" row in the left-hand side of screenshot) that opens our UI (right-hand side of screenshot). Your checkout screen would also own the buy button, so you could stack other buttons with it.

image

@yuki-stripe yuki-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Nov 29, 2023
@sfriedman-stripe
Copy link
Collaborator

Hi @virginiacook, wanted to check back in and see if this solves your use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:improvement triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

No branches or pull requests

3 participants