#GastonLifschitz
1 messages · Page 1 of 1 (latest)
Hello 👋
My understanding was that we did support expand on all API endpoints.
What are you seeing in the response? Also can you share the code?
Yes of course
try {
return (
await stripe.subscriptions.search({
query: `status:'canceled' AND metadata['deviceId']:'${mac}' AND metadata['userId']:'${userId}'`,
expand: ['default_payment_method'],
})
)?.data[0]
} catch (err) {
logger.warn(`Stripe error: ${err.message || err}`)
return
}
That's my code
without expand it works fine
Otherwise, it returns null
Have you tried expanding data.default_payment_method?