#amfpaulo_api
1 messages ยท Page 1 of 1 (latest)
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.
- amfpaulo_api, 21 hours ago, 87 messages
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1268930071012446384
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
What's the invoice id where you see this
This is my invoice code
My code failed so I did not get the invoice Id, but I can , I'll do right now, just a second
I just got another error now: Must provide customer or from_invoice.
I am creaing a FromInvoice empty
What is the way I should create a invoice that has no customer
I altered the code like that:
if (!string.IsNullOrEmpty(request.CustomerId) && !request.CustomerId.Equals("walk-in"))
options.Customer = request.CustomerId;
else
options.FromInvoice = new InvoiceFromInvoiceOptions
{
};
What should I fill on the InvoiceFromInvoiceOptions object ?
Ya, this is not making sense, I do not want to clone a invoice, I just want to sell to with out having a Customer on the invoice ?
Am I going to need to create a generic customer in order to create a invoice for walk in sales ?
Do you have the invoice id?
you said:
when the invoice has no client from my understanding I need to return the Invoice Intent to the front end to collect the payment however invoice.PaymentIntent.Id and invoice.PaymentIntent.ClientSecret are null
So I just want to look at that
Customer id isn't required to create an invoice afaik
yes, informing a customer, this is my invoice id: in_1PjMAYDn6CAQGXZnFPtv0YY9
but this one I informed a customer
If I do not inform a customer I get the error: Must provide customer or from_invoice.
Ah ok yeah I'm wrong
So you'll need to do this then
Cool, no problem , I have this down, now, knowing that I need to return the Intent secret to the front end to collect payment
however the invoic intent is null
are these the correct filed to retrieve a intent from a invoice ?
Payment intent is expandable: https://docs.stripe.com/api/invoices/object#invoice_object-payment_intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So you need to expand it to get id and client secret
What do you mean about that
In the doc
What didn't you understand?
how to expand Intent
You need to pass the expand param with payment_intent in the array
ok, I waslooking wrong link
Certain params don't come expanded in our api
payemnt_intent on the invoice is one of them
Still not making sense to me
That's why it has "expandable" next to it in the api ref
So you need to expand it when retrieving or creating the invoice if you want to access payment intent id
Did you really read this doc...
Could you help me or not ? I already read the docs,
example
a example solf my problem and your problem
I got similar situation to expand another parameter to set defaul payument method to a client
the way of doing was not straight forward , even the suport person took a while to help me
I am stuck in the same situation again , but different
Expand = new List<string> { "payment_intent" }, goes in your invoice create options
Expansion works the same for all our endpoints
So if you've done it before, it's the same process
that is what I am telling you, I did , I added this line to my invoice create options and the objct in my last screenshot still null
because for sure there are a deep opject somewhere
Hi there ๐ jumping in as my teammate needs to step away soon. Please bear with me a moment while I catch up on the context here.
this is what I did
I'm still catching up, but based on the last couple messages that is expected. The Payment Intent for an Invoice is not created at Invoice creation, it's created when you finalize the Invoice. So it's expected that payment_intent is null after Invoice creation and you won't be able to expand the field.
I just was
The problem is that you aren't using expand in your finalization request, when the Payment Intent is created. I think.
Ok, lets start over
the previous guy guide me to the wrong direction for sure
he told me to expand the Intent during my invoice creation, which is wrong, correct ?
This guide walks through the full process:
https://docs.stripe.com/invoicing/integration?method=elements
I am not using stripe elements, but I think I got it what I need to do
Just tell me if I am correct more over I'll test pretty quick
Intead expanding during invoice creation like the other guy tood me to do
should I expand using invoice finalize option correct ?
Yup, but why do you need the client secret of the intent if you aren't using Elements?
I may be forgetting about a flow, but offhand that doesn't sound right.
I am using stripe terminal M2
I need to collect the payment on my front end using the terminal
By the way, this works, when I finilized the invoice, which returns to me another instance of the same invoice that was created before, this instance has the Payment Intent
Aahh, terminal! I was forgetting about a flow ๐
terminal has litle to no docs, however the API is so good that I got sctuck just 3 times so far
One more question just to make sure what the other support person told is correct: Invoice has to have a client, no way to create a invoice with out client correct ?
If I want to create invoice for a walk-in* sale I need a generic customer to attach to the invoice, is this correct?
*not a recurrent customer and customer do not want have anything on file
Not sure I'm grasping what you're asking, what is "client" referring to in this context?
Ah, client = customer, yup
Sorry
You have to have a Customer created for the Invoice
Customer
No worries, just wanted to make sure we were aligned before I answered wrong ๐
Ok, Is having a generic customer a viable or may be only option if I want to have a invoice ?
That's largely a business decision that is up to you. Technically I'm not thinking of any problems that would cause offhand, but I'm not sure if it would be confusing for your operational flows to have all of those grouped under one customer record or not.
Got it. My system will anyways control invoices , etc, however my idea of always having invoice is to facilitate find problem or frauds if they arrised, so I can easily match my system invoice with stripe invoice and find out if it was a walkin sale or a customer sale, also I can keep track of discounts, etc
Anyways, I think I can take from here, I'll now try collect the payment, I believe this will not fails, if does, I'll contact you guys again. I appreciate your help and to other guy help. You guys are awesome, I never ever have a gatway integration work that was so easy and have good support, even Terminal not having great docs