I am using google cloud functions to execute the node.js code which creates a payment-intent and passes the client-secret to the client (i.e browser) in this case. However when a payment is completed i am getting ip address of google's server which are most likely hosting the code of google cloud functions.
I need to pass the ip address of the browser somehow so that client who is making the payment's ip address is visible and not the ip address of google's server. I tried looking into stripe's documentation but cannot find any way on how to achieve this. Note: It is recommended to create payment intent on server side and not on client side by stripe.
The reason you're seeing your server's ip address is likely that you are creating the PaymentMethod
server-side. This means your server gets that raw card details which puts you in the highest scope for PCI compliance, SAQ D.
The IP address here should instead come from the browser where you would collect card details securely via Stripe.js client-side. The idea is that you would be using Elements, collect their card details and then create a PaymentMethod
(or a Token for legacy integrations) and then use that id server-side to confirm a PaymentIntent
or create a Charge
.
If you have to pass raw card details server-side, you should talk to Stripe's support team instead to discuss your integration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With