#crispycodes

1 messages · Page 1 of 1 (latest)

swift trellisBOT
opal prism
#

hello! how can I help?

storm basin
#

Hi.

#

I am trying to create this invoice without a customer object but I receive this error

#

StripeInvalidRequestError: Must provide customer or from_invoice.

#

Yesterday an agent told me the customer object is optional

opal prism
#

gimme a while to take a look at this

opal prism
#

i think there may be a slight misunderstanding of that parameter. When it says optional, what it really means is that it's conditional. For example, if you try to create an invoice when using from_invoice [0] you wouldn't need to provide the customer

https://stripe.com/docs/api/invoices/create#create_invoice-from_invoice

#

is there a reason why you're not providing the customer id though?

storm basin
#

I need to be able to create this invoice and get a link for the user to pay at

opal prism
swift trellisBOT
storm basin
#

I would rather not have to setup a whole checkout site just for this invoicing.

pseudo sandal
#

Hi @storm basin I'm taking over thread

storm basin
pseudo sandal
storm basin
#

Ok perfect so just double checking, I can input:

  • a price at the time of payment link creation
  • once the payment link is created, it will return a response with the link
  • I don't need a customer object?
#

Is there no way to input a price in there without creating that price plan?

pseudo sandal
#

No way

storm basin
#

just putting in feedback, the docs should really be updated for the invoice creation

pseudo sandal
#

Which part? I can pass along the feedback if you share with me the details

storm basin
#

Here ^, it says that providing the customer object is optional in the api docs, then in the quickstart for invocing it says its required