I want to get promotion codes with stripe node.js API: https://stripe.com/docs/api/promotion_codes/list
const stripe = require('stripe')('...');
const promotionCodes = await stripe.promotionCodes.list({
limit: 3,
});
Throws an error:
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'list' of undefined
Other API endpoints work correctly.
Does stripe has any additional conditions to work with promotion codes? I found only this info, but it doesn't answer my question: https://support.stripe.com/questions/promotion-codes