I’m trying to use an Airtable Automation script to lookup a customer ID in the Stripe API. My fetch call is returning a 200 but the data object is empty in the Airtable script even though the same call has a valid JSON response via curl in terminal.
Here’s the full script code:
let Stripe_API = 'YOUR_STRIPE_API_KEY';
let Stripe_URL = 'https://api.stripe.com/v1/customers/cus_MQGV6PEdpS1RWJ';
let options = {
method: 'GET',
headers: {
'Authorization': 'Bearer ' + Stripe_API
}
};
console.log(options);
let response = await fetch(Stripe_URL, options);
console.log(response);
Does anyone have ideas about why Airtable isn’t recognizing the full response from the Stripe API?