Estoy implementando Stripe para React Native y estoy tratando de enviar el ID de customerId a mi Cloud Function usando POST, pero cuando ejecuto el código, regresa en el archivo console.log undefined
Función en la nube (Firebase)
exports.addCardForExistingCustomer = functions.https.onRequest(async (request, response) => { let id = await request.body.customer_id response.send({ result: id }) });Lado del cliente
const fetchPaymentSheetParams = async () => { const response = await fetch(`${API_URL}`, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ customer_id: customerId }) }); const { result } = await response.json(); console.log(result) };