@bates-solutions/stripe API Reference - v2.2.1
    Preparing search index...

    Class ProductsService

    Products service wrapping Stripe Products.

    const product = await stripe.products.create({
    name: 'Sourdough loaf',
    metadata: { supplierSku: 'SD-001' },
    });
    await stripe.products.update(product.id, { description: 'Baked daily' });
    await stripe.products.archive(product.id);
    Index
    • Archive a product (active: false). Stripe keeps archived products so past payments still reference them, but they can no longer be bought. Restore one with update(id, { active: true }).

      Parameters

      • productId: string
      • Optionaloptions: { idempotencyKey?: string }

      Returns Promise<Product>

      When productId is missing

    • Update a product. Only the fields you pass are changed.

      Parameters

      Returns Promise<Product>

      When productId is missing, or name is given but blank

      await stripe.products.update('prod_123', {
      name: 'Sourdough loaf (large)',
      metadata: { supplierSku: 'SD-002' },
      });