#AT
1 messages ยท Page 1 of 1 (latest)
hello! if you reach out to Stripe Support - https://support.stripe.com/contact, they'll be able to advise you on that!
If I am taking payment online, via API/SDK., here is my flow :
- create pay method
- create customer + associate w/ payment method from step 1
- create invoice item + associate with product id
- create invoice item
- create & confirm payment intent
is my workflow accurate?
I want to be able to see if I can get reports after sale, on my account and get intended insight for sales by product - one way or the other
the workflow looks correct. if I understand your question correctly, you're looking to check the sales by Product on the Stripe Dashboard right? Support will be able to better answer your question about where you can check that via the Dashboard. Those of us on this channel don't interact with the Dashboard much. There's no way to get the sales by product via API. You'll have to calculate yourself if you want it
Ok. Thanks. Follow up question.
How do I create invoice line item object instead invoice item?
As an alternate, could I create checkout session?
Did you mean how do you create an Invoice Line Item?
You can't create an Invoice Line Item, Invoice Items represent the component lines of an invoice. An invoice item is added to an invoice by creating or updating it with an invoice field, at which point it will be included as an invoice line item within invoice.lines.
yes, you can create a Checkout Session instead
I tried checkout session. It does not seem to serve my needs.
Let me create an invoice item and add it to an inoiuce
- invoice
https://stripe.com/docs/api/invoices/object - how do I pass invoice item id with invoice when creating it? I am not sure if I see a parameter for it. I do however, do see invoice line items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
๐ taking over here
You can simply create an Invoice for that Customer. It will pick up the created Invoice Item
Hello! Thanks for joining. ๐
That is what I thought. So, I created an invoice item successfully. And then, sent this request: https://stripe.com/docs/api/invoices/create. It failed with an error.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
"error": {
"code": "invoice_no_customer_line_items",
"doc_url": "https://stripe.com/docs/error-codes/invoice-no-customer-line-items",
"message": "Nothing to invoice for customer",
"param": "customer",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_CxxXscSaubN89W?t=1679285303",
"type": "invalid_request_error"
}
}```
Can you share the request that created the Invoice Item? req_xxx
I do not see it in the response. How do I find it?
I do have invoice item id though. I am in test mode, for what it's worth.
You have your requests log at https://dashboard.stripe.com/test/logs. But okie Invoice Item Id is good too, please provide it!
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
ii_1MnZ2qDI89yB3EcwGoW4Me3B
req_WRhSkBSWYFPLU5
gime a few mins. brb
You created this Invoice Item for cus_NYfkliaWFaXcBz
while the error is on the request req_CxxXscSaubN89W which targets cus_MyMpHamO5EXstT
I am also having trouble finalizing an invoice. https://dashboard.stripe.com/test/logs/req_hnPZlpIedhdHEB?t=1679286578
Could you see its error message? It says that Customer has no card to be charged
That is bizarre. I have 2 credit cards and one default card to the customer.
You would want to have one setup as invoice_settings.default_payment_method to be automatically used