• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Payments Plugin for Stripe

Stripe payment plugins for your WordPress site

  • Home
  • Documentation
  • Addons
  • Login
    • Sign In
    • Edit Profile
    • Terms & Conditions
    • My Downloads
    • License Key
  • Support
    • Support Forum
    • Forum Search
    • Forum Login
    • Forum Registration
    • Email Support for Customers
  • Contact Us
  • Show Search
Hide Search
You are here: Home / Topics / Prefill email on payment OR send custom email to Stripe

[Resolved] Prefill email on payment OR send custom email to Stripe

· ·

Home › Forums › Stripe Payments Plugin › Prefill email on payment OR send custom email to Stripe

  • This topic has 7 replies, 2 voices, and was last updated 2 days, 21 hours ago by mariuselz.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • May 3, 2025 at 7:04 pm #5483
    mariuselz
    Participant

    Hello,

    I am having an issue and I was wondering if there is a way to send/prefill the email to payment form or to Stripe when creating a subscription.

    My flow:
    1. User goes to https://mywebsite.com/asp-payment-box/?product_id=1350
    2. Fills in the details and presses Pay, or pays with Apple/Google Pay. Then the data is sent to Stripe for purchasing the subscription.
    3. I catch the payment in my API with an action (asp_stripe_payment_completed)
    4. In my API, I update my DB based on Stripe payment email (because I am able to see the Stripe object in the asp_stripe_payment_completed callback)

    My problem:
    In my DB, the user is “[email protected]”
    In Stripe, especially if user pays by Apple/Google Pay, the email can be different (for example “[email protected]”)
    This causes an issue in my DB updating, my code will look for “[email protected]” and it will not update the correct user ([email protected])

    Looking forward for any ideas. Much appreciated, thank you!

    Best,
    Marius

    • This topic was modified 5 months ago by mariuselz.
    • This topic was modified 5 months ago by mariuselz.
    • This topic was modified 5 months ago by mariuselz.
    May 4, 2025 at 5:00 am #5493
    Admin
    Keymaster

    Hi, the use case you described will require custom code development. We’ve sent you an email with more details, please reply to that email.

    May 14, 2025 at 1:06 pm #5539
    Admin
    Keymaster

    We’ve created an example addon that demonstrates how to capture a custom piece of information via a query parameter on the payment page and pass it to the Stripe API as metadata. Sharing it here in case it’s helpful:

    https://github.com/Arsenal21/stripe-payments-enhancements/tree/master/asp-custom-reference-data-collector

    July 29, 2025 at 4:11 pm #5603
    mariuselz
    Participant

    Hi, thank you for this information.

    Does it work with the “email” as well? I am asking because I’m aware this field might be sensitive, maybe it cannot be overwritten?

    Looking forward to your reply, thank you!

    Best,
    Marius

    July 31, 2025 at 7:47 am #5604
    Admin
    Keymaster

    The earlier example in this thread talks about sending the data to Stripe as as metadata (additional data).

    If you want to pre-fill the standard email field’s data when the page is loaded, you can try the following example to see if that can work for your scenario:

    https://github.com/Arsenal21/stripe-payments-enhancements/blob/master/asp-prefill-customer-name-and-email/asp-prefill-customer-name-and-email.php

    September 30, 2025 at 6:26 pm #5634
    mariuselz
    Participant

    Thank you, this is working. Use $_GET[’email’] to get the email dynamically from the url.

    I have tested and it seems the subscription is created on this particular email, in Stripe. Even if the transaction is done via Apple Pay (no email to fill in). Which is perfect!

    • This reply was modified 3 days, 2 hours ago by mariuselz.
    September 30, 2025 at 6:33 pm #5636
    mariuselz
    Participant

    Update: it was working on Apple Pay if I open a Stripe window from my API.
    But it is not working if I prefill S-Plugins form and then pay with Apple Pay.

    • This reply was modified 3 days, 1 hour ago by mariuselz.
    September 30, 2025 at 10:53 pm #5638
    mariuselz
    Participant

    So after 4-5h of trying a lot of things, I solved this by sending the App email as metadata on subscription purchase. Then in my API (on payment complete event), I am waiting for Customer to be updated with the metadata, then update the Customer email (payment one, original) with App email from metadata. Then I proceed to update my DB. Not ideal, but works. Maybe it helps someone

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Log In

Primary Sidebar

Featured Addons and Extensions

  • Subscription Payments Addon
  • Additional Custom Fields
  • Secure Downloads Addon
  • Apple Pay, Google Pay, Afterpay

Addon Bundle

Stripe Payments Addon Bundle

A Simple & Lightweight Plugin

Our Philosophy with the Plugin

Support Links

  • Support Forum
  • Support Contact

Search

Copyright © 2025 | Stripe Plugins | A member of the Tips and Tricks HQ family.