Setup Name on Card and Billing Address for stripe payment/subscription in Membership pro


How do I Setup Name on Card and Billing Address for stripe payment/subscription in Membership pro



  • Adam Czajczyk
    • Support Gorilla

    Hello Manoj,

    I hope you’re well today and thank you for your question!

    Payment gateways in Membership 2 Pro plugin are implemented according to their official guidelines so there’s no option to add/remove parts of payment forms other than options available on dashboard’s “Membership 2 -> Settings -> Payments” page.

    When enabled, Stripe renders it own form and we do not have any impact on it as it’s provided by Stripe’s API.

    If I’m missing something in your question, please let me know and elaborate a bit more on it and I’ll be happy to assist you.

    Best regards,


  • Milan
    • WordPress Wizard

    Hello @templemis,

    I hope you are well today and sorry for being late here. :slight_smile:

    I am sorry but I am not getting your point completely. :slight_frown: So let's first clear confusion. :slight_smile: Below is little explanation which I think will be able to explain situation very well.

    #1) You want to customized PopUp box showed to use when they decide to pay with stripe.

    #2) And you want to add these fields into it.

    Right ? Please advice on this.



  • Douglas
    • Design Lord, Child of Thor

    I believe I have a very similar question:

    On many checkout forms it is common for the cardholder to enter their name as it appears on the card. This might also be referred to as the “Billing Name”. Often times, and in the case of the site on which I’m using Membership 2, a member’s employer will be paying the membership charges using the company credit card. Naturally, the company credit card is going to have a different “Billing Name” than the actual user registered on the site. Often a “Billing Address” is required as well. It appears that the Membership 2 Pro/Stripe integration passes the WordPress user name to Stripe as the “Billing Name” or “Cardholder Name”. Also, it doesn’t ask for a “Billing Address” whatsoever.

    As seen in the attachments above, the only fields that the Stripe checkout method is asking for are:

    – Card number

    – Expiration date

    – CVC

    – In the example screenshot above, the “Billing Name” collected is “”

    Is it possible to customize this so that a different “Billing Name” or “Cardholder Name” as well as a “Billing Address” are collected at checkout?

    While reading through the Stripe docs at, it appears that Stripe fully supports this, or at least some of this, but Membership 2 is choosing to send the WordPress username as the “Billing Name” and has elected to NOT ask for a “Billing Address”, or even a card ZIP code for that matter.

    According to Stripe, I feel that, at a minimum, the Membership 2/Stripe integration should be asking for the associated ZIP code of the card being used. According to the Stripe documentation:

    Although optional, we highly recommend also having Checkout collect the user’s ZIP code as address and ZIP code verifications help reduce fraud. Simply add data-zip-code=”true” to the above and make use of Radar’s built-in rules to decline payments that fail verification.

    So, WPMUDEV, how do you respond? Can we, at a minimum, ask for the ZIP code? Can we ask whether maybe the person paying for the membership is not the same person that will use the membnership (in the case of a business paying for their employee) and therefore ask if the “Billing Name” is different from the name of the user?

  • Dimitris
    • Support Star

    Hey there Douglas,

    hope you’re doing good and don’t mind chiming in!

    I just escalated this request to our Second Level Support team to check if there’s an easy way to implement this. Please spare them some time and we’ll let you know as soon as possible about any development. :slight_smile:

    I really can’t promise if this is going to be implemented though, so we may end up forwarding this to the Features & Feedback section.

    Warm regards,


  • Lindeni Mahlalela
    • Recruit

    Hello TempleMIS and Douglas,

    I hope you are doing great today and I am sorry for the delayed response from our end. I went through the documentation of stripe and also went through the Membership 2 plugin's source code and have found the right solution for this.

    It is possible to collect the customer's billing details (name, address, city, zip code and country) in Membership 2 by adding a custom mu plugin that will hook to the Stripe gateway form filter like so:

    add_filter('ms_gateway_stripe_form_details', 'callback_function');

    The variables to be used are defined and controlled by Stripe and the resulting form also is controlled by Stripe. The stripe checkout documentation has details on what data you can collect.

    The following code can be used, you can paste it in your theme's functions.php file or create a new file and upload it to 'wp-content/mu-plugins' folder on your website or WordPress install, if the folder does not exist you should just create it.

    function m2_stripe_billing_info( $stripe_data ) {
    $stripe_data['billing-address'] = 'true';
    return $stripe_data;
    add_filter('ms_gateway_stripe_form_details', 'm2_stripe_billing_info', 10, 1 );

    I have tested by creating a file in 'wp-content/mu-plugins/membership-enable-stripe-shipping.php' and pasted the above code, including the opening PHP tag so it becomes like:

    function m2_stripe_billing_info( $stripe_data ) {
    //and the rest of the code

    After doing this, I tested the Stripe payment form. The should now be converted into a step by step wizard which should first present a billing form to collect the customer's billing info, clicking "Payment Info" after filling the form will move to the "Card Details" form. The form will now look like this:

    Please note that the Membership 2 plugin has no control over the form design as it is defined by Strip's API, what the code does is to enable or disable field sets that should be displayed on the form. Also the wizard style in the payment form is also defined and controlled by Stripe and we have no control over that.

    I hope that helps and if there is anything else we can help with, just let us know and we will be happy to assist. Please enjoy the rest of your day.



Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.