#maze260_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1285722721845645436
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- maze260_api, 24 minutes ago, 3 messages
Hello again! You can break out the details into separate line items on the Invoice.
Yep, we close idle threads. We're focused on realtime support here on Discord. If you would prefer async support you should reach out to Stripe support: https://support.stripe.com/contact/email
I have never actually seen a Stripe invoice. I have only tested. But my interest is in the construction of a paymentIntent which features miscellaneous details.
That's not possible Payment Intents do not have that level of detail.
No probs. I prefer Discord for making enquiries. Thank you.
Payment Intents have a single total amount with no context, as they're low-level payment objects.
Invoices are high-level objects that do have line items with descriptions, amount breakdowns, etc.
Okay, I see. So, I should redesign working with Invoices instead. That's clear, thank you.
Yep!
Is there anything else I would need to know about working with Invoices - is there a tutorial or an intro to Stripe invoices please?
I am working with NodeJS
Yep, we have a ton of documentation here: https://docs.stripe.com/invoicing
Cool, thank you. I shall have a look through : )
To be clear, I can work with invoices to take a payment?
The situation is a prompt to make a payment, where a customer would add their card details into a smartphone application. Just in case this matters.
Ah, sorry for the delay, got pulled away.
No worries.
Can you tell me a bit more about your workflow? This is where you're initially saving payment info ahead of time, right?
Ideally, the same paymentIntent, but drafting a corresponding invoice listing all details.
I can tell you ... What would you like to know please?
Tell me, from the customer's perspective, the ideal flow you want to build for them.
Each customer is ready to buy and then Stripe handles the payment process, and it is a request of card details, and, these are entered at the time of making the payment - never before.
Ah, okay. In that case the easiest thing to do would be to create an Invoice an then send them to the Invoice's hosted Invoice payment page: https://docs.stripe.com/invoicing/hosted-invoice-page
If I were to do that, what would that mean please?
Is that like designing the invoice for sending out after payments and then selecting the specific invoice?
Would you prefer to do this in code or via the Dashboard? Like, do you need to automate this, or are these infrequent custom Invoices you create by hand each time?
I'd like to code these with NodeJS within a server
Okay, I recommend you run through this quickstart to get a feel for how Invoices work via the API: https://docs.stripe.com/invoicing/integration/quickstart
Invoices create their own Payment Intents.
You don't typically need to interact directly with those Payment Intents, but you can.
Can the PI's invoice be overridden?
No.
Okay.
Why would you want to override it?
So, what's the flow that you are directing me to create please? Will it cover taking the card payment via a smartphone app?
Override it with an invoice that lists further details, or edit it to add further details.
The flow is basically 1) create an Invoice 2) have the customer pay the Invoice (in this case via the hosted payment page, but you can also build your own payment page/UI for this if you want).
I think you're focused too much on Payment Intents and not focused enough on Invoices. When using Invoices, you usually don't need to think about the underlying Payment Intents at all, you mostly deal with the Invoices themselves.
You might need to think about the underlying Payment Intents depending on how you end up building your integration, but I wouldn't worry about it until you get to that point.
I am unsure about the hosted page you have mentioned. I just need something that will take a card payment quickly in an app.
The quickest way would be to load the hosted payment page inside your app in a web view.
That's the quickest/easiest to build I mean.
Okay, I will look into that.
It's a shame that a simple amendment of a paymentIntent is not possible.
It is only one/two pieces of data to add
You mean adding the line item details?
Yes
Payment Intents just aren't designed to do that job. They're low-level objects concerned only with the raw payment and the final total amount.
It's a lot of work for just one small difference.
Is there anything else that can work instead of an invoice?
Let's back up a bit. I'm not sure I understand why it's a lot of work? Can you provide more details there?
It seems there's an entire operation to get an invoice system working. For example, the card payment prompt is probably not going to work now. So then I need to figure out some new stuff, complicated probably. It took me a long time to get the paymentIntent working.
What is "the card payment prompt"?
That's when the user clicks to pay and then Stripe prompts them to enter their card details.
That's all handled for you on the hosted Invoice payment page.
What is that hosted invoice page?
Every Invoice has a Stripe-hosted payment page. It's explained in the docs I linked above: https://docs.stripe.com/invoicing/hosted-invoice-page
You can get the URL for it from the Invoice object: https://docs.stripe.com/api/invoices/object#invoice_object-hosted_invoice_url
Okay, I just googled and it looks the same as before but with more.
Can it be drafted from the API?
I really think the Invoice approach is going to be easier for you than the Payment Intent approach. You create an Invoice via the API. You get the Invoice's hosted payment page URL. You send your customer there. They pay it. You don't need to worry about building payment UIs, handling card input, etc.
So create the invoice and then a link for the hosted page is created, right?
Okay, I'll try that next. Seems straight forward ... The payment is to be taken immediately.
Yep.
So, user clicks to make a payment, the Stripe API is called, the invoice is generated, and then the user can enter their card details, right?
Okay good. I will look into it and get back to you if there any difficult obstacles.
Will do.
Thank you : )
Happy to help!