Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Aronaman's avatar

Email retrieve

i integrate stripe payment gateway and i have 1 question.

It is possible to retrieve " email" from the card info?

i am using test "4242424242424242". i got this value from the field:  country, brand, last4, exp_month,exp_year

and when i try the email field it is null; 

that means i have to create form field for email??

b/c i want to send email, after successfull transaction ;

thanks in Advance

0 likes
4 replies
automica's avatar

@aronaman you can’t get email or customer information from the card info unless you have passed to stripe at the point you create your transaction. If you want to create a customer in stripe and then attach an order to it (or set up a recurring order for your new customer) that’s well documented in stripe api.

If however you are creating an order for a logged in user you don’t need to get email details from stripe as you should have access to this in your Auth session,

Aronaman's avatar

@automica thanks for your reply

i make it more open for users aswell as guest, i will do the logic.

one more after testing , how can i prevent no more test transaction !

thanks

automica's avatar
automica
Best Answer
Level 54

@aronaman when you’ve finished your testing at stripe you just need to switch your api keys to the live keys which you can get it you toggle out of the developer mode.

1 like
srasch's avatar

If you don't want any test transactions you just have to move your Stripe account from "Testing" to "Live".

You also do not need to send emails by yourself. Stripe will handle this for you.

Check the Billings section.

1 like

Please or to participate in this conversation.