• Resolved msakibu

    (@msakibu)


    So far, only the customer emails and invoice URL is sent to Stripe when a payment is made. I’d like to send the customer name and phone number to stripe as well. Where can I enable this?

    • This topic was modified 1 year, 1 month ago by msakibu.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Brian Mutende

    (@picocodes)

    Hi @msakibu,

    The name/phone details are added to a customer the first time the customer is created.

    This code snippet allows you to add it to all payments.

    function getpaid_example_add_customer_name( $args ) {
    
    			if ( empty( $args['metadata']['invoice_id'] ) ) {
    				return $args;
    			}
    
    			$invoice = new WPInv_Invoice( $args['metadata']['invoice_id'] );
    
    			$args['metadata'] = array_merge( $args['metadata'], $invoice->get_user_info() );
    			return $args;
    		}
    		add_filter( 'getpaid_stripe_payment_intent_args', 'getpaid_example_add_customer_name', 10, 3 );
    		add_filter( 'getpaid_stripe_setup_intent_args', 'getpaid_example_add_customer_name', 10, 3 );
    Thread Starter msakibu

    (@msakibu)

    Hi! Thanks for the response

    1. Where do I add this code? I tried using a snippet plugin but it didn’t work. I’m also not technical, but I can follow instructions if they point me to the right place.
    2. I use this to accept 1-time payments from customers so I don’t have a separate step where I create customers. Customers are created when they try to make payments
    3. Also, the code snippet you shared only has names in it, I need something similar for phone numbers as well.

    Thank you

    Plugin Author Stiofan

    (@stiofansisland)

    Hi @msakibu,

    1. Please use the “Code Snippets” plugin to add this code https://www.ads-software.com/plugins/code-snippets/
    2. ok
    3. The snippet should pass all data to stripe.

    If you need further assistance please open a ticket here with the subject “FAO Stiofan” https://wpgetpaid.com/support/

    Thanks,

    Stiofan

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sending customer name and phone number to stripe’ is closed to new replies.