
Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 13, 2022 09:53 AM
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?
1 Reply 1

Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 13, 2022 10:01 AM
FYI, found the fix (use response.json()
) in another thread: Having trouble with Fetch in scripting block - #3 by kuovonne
Here’s a version that works:
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);
let responseJson = response.json();
console.log(responseJson);
Reply
