#crispycodes
1 messages · Page 1 of 1 (latest)
hello! how can I help?
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
gimme a while to take a look at this
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
is there a reason why you're not providing the customer id though?
Basically In my app flow, I do not capture the users email/information.
I need to be able to create this invoice and get a link for the user to pay at
i don't think one off invoices is going to work for you if you don't want to create a customer. I think you should consider using Checkout Sessions instead where you don't need to specify a Customer id : https://stripe.com/docs/payments/accept-a-payment
Ok then, is there any API for No-code payment links?
https://stripe.com/au/payments/payment-links
I would rather not have to setup a whole checkout site just for this invoicing.
Hi @storm basin I'm taking over thread
Sure thanks
https://stripe.com/docs/api/payment_links/payment_links#payment_links these are the APIs for payment links
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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?
I see here I need to provide the ID of the price plan, https://stripe.com/docs/api/payment_links/payment_links/create#create_payment_link-line_items-price
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Is there no way to input a price in there without creating that price plan?
No way
Ok
just putting in feedback, the docs should really be updated for the invoice creation
Which part? I can pass along the feedback if you share with me the details
.
Here ^, it says that providing the customer object is optional in the api docs, then in the quickstart for invocing it says its required