#shaharyarilyas

1 messages · Page 1 of 1 (latest)

fiery mangoBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

quartz current
#

also how to create add one-time item to invoice

steady hazel
#

Did you click on Add one-time item and follow the steps to create an item?

quartz current
#
      {
        currency: CURRENCY,
        customer: "cus_P0Zl2JvoBlSQ2f",
        days_until_due: 30,
        collection_method: "send_invoice",
        metadata: { user_id: _id, account_id },
      },
      {
        stripeAccount: account_id,
      }
    );

    const amountInCents = payload.product.amount * 100;
    const product = await stripe.products.create(
      {
        name: payload.product.name,
        description: payload?.product?.description || null,
         default_price_data: {
           unit_amount: amountInCents,
           currency: CURRENCY,
         },
      },
      {
        stripeAccount: account_id,
      }
    );

    const invoiceItem = await stripe.invoiceItems.create(
      {
        customer: "cus_P0Zl2JvoBlSQ2f",
        price: product.default_price,
        invoice: invoice.id,
        quantity: 1,
        currency: CURRENCY,
      },
      {
        stripeAccount: account_id,
      }
    );```
quartz current
steady hazel
#

What is the issue with the code here?

quartz current
steady hazel
#

Are you integrating with API or Dashboard? I'm confused. You should only use one of them for invoicing

quartz current
steady hazel