stripe get promotion codes in node.js

479 Views Asked by At

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

0

There are 0 best solutions below