Allow customisation of frontend payment options

Created on 10 September 2025, about 2 months ago

Problem/Motivation

At the moment there's not a good way to customise the options passed to the client-side elements.create('payment') call.

It's sometimes useful to be able to do this to set various options that Stripe describe: https://docs.stripe.com/js/elements_object/create_payment_element#paymen...

At the moment, the appearance settings are passed in in the AJAX enabled form case, but that's not even a valid option for Stripe's API.

Proposed resolution

Introduce a new setting in the webform UI that'll allow setting a YAML collection of settings to pass in, and then pass them from the server side to the client side.

Remaining tasks

Prepare and review a MR.

User interface changes

An additional settings section in the webform component.

API changes

An additional element passed in the drupalSettings collection, and additional settings on the webform element, neither of which really count as API.

Data model changes

The additional settings on the webform element.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom steven jones

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024