A static IP address for a Firebase Cloud Function is required to be whitelisted by a third party

168 views Asked by At

I am integrating PhonePe payment into my mobile application. To facilitate this integration, I've created a Firebase Cloud Function using Node.js. This function internally calls PhonePe's pay API. However, PhonePe requires a static IP address for the request origin, which they use for whitelisting purposes.

To address this requirement, I've set up a static IP address (External) using Cloud NAT, VPC Network, Cloud Router, and VPC connector. Subsequently, I passed the VPC connector to the runWith() method of the Firebase Cloud Function like this: { vpcConnector: 'myconnector', vpcConnectorEgressSettings: 'ALL_TRAFFIC'}. After deploying the function, I shared the static IP address with PhonePe for whitelisting.

However, I encountered an issue where the payment request to PhonePe failed. Upon contacting PhonePe's support, they informed me that they were receiving the request from IP addresses other than the shared IP address.

How can I resolve this problem?

0

There are 0 answers