Okay
  Public Ticket #2371618
Stripe customer informations
Closed

Comments

  • Ludo started the conversation

    Hi there,

    So I managed to do my test booking on my event with Stripe, which was seamless.

    However, I cannot see any of the Customer details in the Stripe Dashboard, only the fee I've charged.

    Payment confirmation emails via Stripe are therefore not sent to the customer.

    Really frustrating. Is there any easy fix for this?

  • [deleted] replied

    Hello Ludo, 

    Thank you for your purchase. 

    We added a possibility of sending metaData and description to Stripe from Amelia in one of the latest updates of Amelia, but you need to enable this in your database. 

    Please open your database, find and open the wp_options table and find the option name amelia_settings there. You need to edit it. You will see a setting payments.stripe in it. You need to set the description parameter enabled to true in the database and also if you want metadata to be sent you need to set the metaData parameter enabled to true as well. Like here : 

    "description":{"enabled":true,"appointment":"%customer_full_name% has booked %service_name% at %appointment_date_time%","event":"%customer_full_name% has booked %event_name% at %event_start_date_time%"},"metaData":{"enabled":true,"appointment":{"user":"%customer_full_name%","email":"%customer_email%","phone":"%customer_phone%"},"event":{"user":"%customer_full_name%","email":"%customer_email%","phone":"%customer_phone%"}}

    Then you can copy/paste any placeholder to the appointment and event parameters that you want to be sent to Stripe from Amelia (the placeholders that you can find in Amelia -> Notifications). We put above some placeholders as an example. 

    If you have any further questions or concerns about this let me know.


  •   Ludo replied privately
  •   [deleted] replied privately
  • Ludo replied

    Hi Marija,

    thanks for all.

    Regards

  • [deleted] replied

    You are welcome, Ludo. 

    If you have any other questions or concerns feel free to open a new ticket and we will gladly help. 

  •  1
    Mark replied

    Hi,

    I'm trying to get this to work correctly and I'm stuggling.

    Can I just confirm how this data is used? 

    I have the 'description' working and its passing the data as expected but when I try to add metadata (as suggested below) the checkout fails to appear on the checkout page. All I am trying to do is pass the customers first name and the last name and email address to stripe to fill in the correct detail on the customer detail as marked in red on the attached screengrab.

    Any help much appreciated.

    Mark


  • [deleted] replied

    Hello Mark, 

    Metadata are sent, but there isn't a possibility to create a customer (have information about them) in Stripe with these data that are sent from Amelia, unfortunately. And the other option for sending data sends them as a description, like you mentioned. 

    If you have any other questions or concerns feel free to open a new ticket and we will gladly help. 

  •  1
    Mark replied

    Hi Marija,

    Thank you for the reply.

    Please confirm that you are telling me I can't pass an email address of a customer to Stripe so I can generate an receipt? Surley this must be possible as Amelia is collecting the data needed at checkout?

    I've seen this post asking the smae issue - https://tmsplugins.ticksy.com//ticket/2225351/

    Can you let me know how this was resolved?

  • [deleted] replied

    You are welcome, Mark. 

    Unfortunately, there isn't a possibility to create a customer in Stripe with the Amelia's data sent. You will have information about the appointment in the description so you can use it if you need it for something else in Stripe. 


  •  1
    Mark replied

    Hi Marija,

    OK, I will look at a workaround but this surley must be added in an update asap. This means I have to manually send recipts for payments after every booking using the Stripe dashboard rather than it automatically being sent to every customer.

    Many Thanks

    Mark

  • [deleted] replied

    You are welcome, Mark. 

    I understand your use case, but unfortunately, that can't be achieved with the Stripe integration in Amelia. 

    If you have any other questions or concerns feel free to open a new ticket and we will gladly help. 

  • Leilani replied

    Hi Marija,

    I'm having the same issue. I was able to add the description to Stripe but it seems like the email collected at checkout is not being passed to Stripe. Is there a reason for this and is there any possibility of having this resolved, such as the solution for the description/meta?

    Thanks,

    Leilani

  • [deleted] replied

    Hello Leilani, 

    There isn't a possibility for creating a Stripe customer from Amelia, unfortunately. The data from Amelia can be sent only as description to Stripe. It is in our list for future updates to check if this could be modified and implemented somehow in the integration, but it isn't possible for now.

    If you have any other questions or concerns feel free to open a new ticket and we will gladly help.

  • Leilani replied

    Thanks Marija,

    Please add this as feature request. I need to send receipts to people and this means I will have to do it manually each time.

    Thanks,

    Leilani

  • [deleted] replied

    You are welcome, Leilani. 

    Of course, I will add your vote for this feature request in our list. 

    If you have any other questions or concerns feel free to open a new ticket and we will gladly help.

  •  3
    Simon Hume replied

    It is possible to do receipts, one of the Amelia staff sent me a code snippet of how to add it in the payment code. Was working great for me!

  • [deleted] replied

    Hello Simon, 

    I was the one working on the ticket with you, and as I recall you asked us to help out with the code that you wanted to change to achieve this , so you suggested adding one line of code and we helped a bit. It is a custom work/change of code and we can't guarantee it will work. Like I mentioned bellow, it can't be done with the plugin's built-in feature.

    You can share the changes you made to achieve this if you want, of course, so other users can try it out if they want. 

    This was your ticket regarding this matter

    https://tmsplugins.ticksy.com/ticket/2225351/

  • Leilani replied

    Simon,

    Would you mind sharing how you did this?

    Thanks,

    Leilani

  • Leilani replied

    Marija,

    Do you have this code that you can share with me?

    Leilani

  • [deleted] replied

    Hello Leilani,

    Unfortunately, no. But I can send you the changes mentioned in the ticket if you want to try it out. 

    So, they wanted and asked about adding one line of code to this file (the last line in the code bellow):

    ''

     the StripeService.php, we'd just need to add one line which would hopefully fix that issue. I just don't know how you'd get the email address from the booking form.

    if ($data['paymentMethodId']) { 
                $intent = PaymentIntent::create([
                    'payment_method'     => $data['paymentMethodId'],
                    'amount'             => $data['amount'],                 'currency'           => $this->settingsService->getCategorySettings('payments')['currency'],                 'confirmation_method' => 'manual',
                    'confirm'            => true,                 'metadata'           => $data['info'],                 'receipt_email'       => 'insert email address here'
                ]);         }

    ''

    and we suggested this:

    ''

    This variable, $data['info'], has that data, so it should be: 

    'receipt_email' => $data['info']['email']

    But, you would need to change the method that use StripeService.php. In the attachment you will find what you need to change in the file Application/Services/Payment/PaymentApplicationService.php

    ''

    I am not sure if they added/changed anything more or what they did exactly with this, but if you want and know how you can try these changes out. Please note that this was some time ago, so maybe there are some modifications in the plugin's code. 


  •  2
    Hannah Streek replied

    I'm having this same issue a year later... UPDATE YOUR PLUGIN TO SOLVE THE PROBLEMS OF YOUR CUSTOMERS. Stripe says it's not on them to figure out how to pass on the customer's email address for automatic receipts. If you've had several customers tell you this is an issue, tell them when you plan on fixing it.

  • mustapha replied

    Same issue for me? Why does it feel like this plugin is extremely bare bones and requires users to do literally everything??

  • [deleted] replied

    Hi Hannah , Mustapha, 

    The only way to send information to Stripe from Amelia with the current integration is as description or metadata. With the current integration it isn't possible to create Stripe users automatically from Amelia, unfortunately. At the moment , we can't tell for sure if and when this integration could be modified , as we have many requests from our users, and the most requested ones are in the top of our to-do list. We do have this feature request in our list and I will add your votes to it, but please suggest this here or vote if there is such request there, and if possible, it can be considered for implementation in the future. Thank you.

    If you have any other questions or concerns feel free to open a new ticket , and we will gladly help out.

  • Gabriel replied

    Resurrecting an old thread because I modified this myself and have it working.

    I first assumed the metadata option was actual stripe payment intent parameters but it is a separate metadata meaning you cannot directly pass parameters e.g. receipt_email.

    So I fixed it/modified it. If you go to StripeService.php within the Amelia plugin, on about line 49 you should see an if statement along the lines of:

    if ($data['metaData']) {
        $stripeData['metadata'] = $data['metaData'];
    }
    

    I simply changed this if statement to:

    if ($data['metaData']) {
        $stripeData = array_merge($stripeData, $data['metaData']);
    }

    That's a quick and simple fix. Now the metadata from the settings page is directly passed as parameters rather than as metadata attached to a payment intent.

    You now just need to go to payment settings in amelia, go to stripe and add metadata, the name is receipt_email and then for the value put in %customer_email%

  • [deleted] replied

    Hi Gabriel, 

    Thank you for sharing your solution with other users! 

    If you have any other questions or concerns feel free to open a new ticket and we will gladly help.

  •  1
    ojasya thakur replied

    Hey there

    Greetings!

    Can you please tell me what is the location of the file , where  we have to do the edits suggested by Gabriel Denys

  • [deleted] replied

    Hello ojasya thakur,

    Sure, the file Gabriel Denys mentioned, StripeService.php, is at location /ameliabooking/src/Infrastructure/Services/Payment/

    Please note that this isn't tested by us and not part of the plugin, so we can't help you with that change any further, unfortunately.

    If you have any other questions or issues feel free to open a new ticket and we will gladly help out.


  •  1
    Joe DePaemelaere replied

    You can also edit the stripe payment intent parameters from your theme's functions.php file. Fortunately the developers put in a hook before the payment intent is sent to Stripe. No need to edit the plugin files directly, which you will lose the next time the plugin is updated. In your functions.php file, add the following filter and function and add whatever code you want:

    add_filter( 'amelia_before_stripe_payment', 'edit_amelia_before_stripe_payment');

    function edit_amelia_before_stripe_payment($stripeData) {

        $stripeData['receipt_email'] = $stripeData['metadata']['receipt_email'];
        $stripeData['description'] = $stripeData['metadata']['customer_name'].' - '.$stripeData['metadata']['package_name'];

        return $stripeData;
    }

    For my Stripe MetaData, I added three values (receipt_email, customer_name and package_name). In the function above, I can then grab the receipt_email from the metadata array and append this value to $stripeData with the key 'receipt_email'. This will send the customer's email as part of the transaction and trigger Stripe to send an email invoice to the customer.

    I also take the customer_name and package_name from the metadata and use those values to create a better description - one that we can understand when viewing payments in our Stripe account. This description is also something that our customers can see in the now sent email receipt from Stripe.

    As a booking system, I agree that not sending a clear description and recipient's email for each transaction is not OK. It should also be able to send complete customer data to Stripe, and allow for recurring transactions.

  •  2,572
    Aleksandar replied

    Hello Joe

    Thank you for sharing this workaround with everyone. We have forwarded the ticket to our developers, and asked them if they could prioritize the "Customer" data to be sent to Stripe. They'll look into it for one of our future updates.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables