Docs & Support

Learn about all the Formidable features and get support from our amazing customer success team.

Developer DocumentationAdd-on HooksStripe
frm_stripe_payment_method_types

frm_stripe_payment_method_types

Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.

Use this filter to adjust the attributes of the payment method types in Stripe.

Usage

add_filter('frm_stripe_payment_method_types', 'change_payment_method_type');

Formidable Forms makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.

Parameters

  • $payment_method_types

Examples

Add US Bank Account

add_filter('frm_stripe_payment_method_types', 'add_us_bank_account');
function add_us_bank_account( $payment_method_types ) {
	$payment_method_types = array( 'card', 'link', 'us_bank_account' );
	return $payment_method_types;
}

Add Euro payments

Use this code example to add support for SOFORT, iDEAL, and Bancontact one time payments when using euros. Note: Subscriptions are currently not supported.

add_filter('frm_stripe_payment_method_types', 'add_sofort_ideal_bancontact');
function add_sofort_ideal_bancontact( $payment_method_types ) {
	$payment_method_types = array( 'sofort', 'ideal', 'bancontact' );
	return $payment_method_types;
}

Add WeChat Pay

Use this code example where the only payment method type is WeChat Pay for a form with 5 as its ID.

add_filter('frm_stripe_payment_method_types', 'add_wechat_pay', 10, 2);
function add_wechat_pay( $payment_method_types, $args ) {
	$form_id        = $args['form_id'];
	$target_form_id = 5; // Change 5 to the ID of your form
	if ( $target_form_id === $form_id ) {
		$payment_method_types[] = 'wechat_pay';
	}
	return $payment_method_types;
}

Filter payment method

Use this code example to map the form with ID 75 to use affirm as its only payment method and form ID 76 to use card, link, and klarna.

add_filter('frm_stripe_payment_method_types', 'filter_stripe_payment_method', 10, 2);
function filter_stripe_payment_method( $payment_method_types, $args ) {
	$map     = array(
		75 => array( 'affirm' ),
        76 => array( 'card', 'link', 'klarna' ),
	);
	$form_id = $args['form_id'];

	if ( isset( $map[ $form_id ] ) ) {
		$payment_method_types = $map[ $form_id ];
	}

	return $payment_method_types;
}
Was this article helpful? *

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

In this article

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright © 2025 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Complete your purchase
    Special offer unlocked.
    Get 55% OFF!
    Complete Purchase
    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms