#Mahesh K

1 messages · Page 1 of 1 (latest)

lean sedgeBOT
pale ore
#

Hello alex

#

i am getting the above error while creating an invoice in the stripe

#

and the following is the code that i written to create an invoice in stripe

#

async function createInvoice(obj, accountID, amountTotal) {

let modified_obj = {
customer: obj.p_stripe_id,
amount : amountTotal * 100,
collection_method: 'send_invoice',
currency: 'usd',
customer_email : obj.contact_email,
application_fee_amount : 500
}

let invoice = await stripe.invoices.create(modified_obj, { stripeAccount: accountID })
return invoice
}

rugged fable
#

can you share the request id?

pale ore
#

ok

#

just a sec

#

req_Wm3fCNAqUoTC6C

rugged fable
#

there's no such parameter customer_email and amount

#

you shouldn't be passing in those two parameters

pale ore
#

suggest me a way to pass this values

#

yes i have read the above document. in that they are adding the invoice items to a draft invoice.

#

but here we have more than 100 items

rugged fable
pale ore
pale ore
#

customer_email parameter is having

rugged fable
pale ore
#

ok

#

thank you alex

pale ore
#

const price = await stripe.prices.create({
unit_amount: 2000,
currency: 'usd',
});

#

will it generate the charge??

rugged fable
#

Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. It doesn't generate a charge by itself

pale ore
#

can you tell me, how to create a total price

#

instead of each items price

rugged fable
pale ore
#

here product id is required field

#

what can i show there

rugged fable
#

you need to have already created a product

pale ore
#

then there is no way to add the amount for an invoice while creating it??

#

am i correct?

rugged fable
#

you can add the amount to the invoice item when creating an invoice item

pale ore
#

ok alex

lean sedgeBOT
pale ore
#

Invalid timestamp: must be an integer Unix timestamp in the future.

#

i am getting the following error

#

while creating an invoice