#maze260_api

1 messages ¡ Page 1 of 1 (latest)

reef hawkBOT
#

👋 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.

wind basalt
#

Hello again! You can break out the details into separate line items on the Invoice.

lethal zealot
#

Hi

#

I was stopped from writing on the other thread.

wind basalt
lethal zealot
#

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.

wind basalt
#

That's not possible Payment Intents do not have that level of detail.

lethal zealot
#

No probs. I prefer Discord for making enquiries. Thank you.

wind basalt
#

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.

lethal zealot
#

Okay, I see. So, I should redesign working with Invoices instead. That's clear, thank you.

wind basalt
#

Yep!

lethal zealot
#

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

wind basalt
lethal zealot
#

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.

wind basalt
#

Ah, sorry for the delay, got pulled away.

lethal zealot
#

No worries.

wind basalt
#

Can you tell me a bit more about your workflow? This is where you're initially saving payment info ahead of time, right?

lethal zealot
#

Ideally, the same paymentIntent, but drafting a corresponding invoice listing all details.

#

I can tell you ... What would you like to know please?

wind basalt
#

Tell me, from the customer's perspective, the ideal flow you want to build for them.

lethal zealot
#

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.

wind basalt
lethal zealot
#

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?

wind basalt
#

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?

lethal zealot
#

I'd like to code these with NodeJS within a server

wind basalt
lethal zealot
#

OKay, shall do, thank you.

#

Can an invoice be added to a paymentIntent at all?

wind basalt
#

Invoices create their own Payment Intents.

#

You don't typically need to interact directly with those Payment Intents, but you can.

lethal zealot
#

Can the PI's invoice be overridden?

wind basalt
#

No.

lethal zealot
#

Okay.

wind basalt
#

Why would you want to override it?

lethal zealot
#

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.

wind basalt
#

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.

lethal zealot
#

I am unsure about the hosted page you have mentioned. I just need something that will take a card payment quickly in an app.

wind basalt
#

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.

lethal zealot
#

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

wind basalt
#

You mean adding the line item details?

lethal zealot
#

Yes

wind basalt
#

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.

lethal zealot
#

It's a lot of work for just one small difference.

#

Is there anything else that can work instead of an invoice?

wind basalt
#

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?

lethal zealot
#

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.

wind basalt
#

What is "the card payment prompt"?

lethal zealot
#

That's when the user clicks to pay and then Stripe prompts them to enter their card details.

wind basalt
#

That's all handled for you on the hosted Invoice payment page.

lethal zealot
#

What is that hosted invoice page?

wind basalt
lethal zealot
#

Okay, I just googled and it looks the same as before but with more.

#

Can it be drafted from the API?

wind basalt
#

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.

lethal zealot
#

So create the invoice and then a link for the hosted page is created, right?

wind basalt
#

Yep.

#

You can send your customer to it when the Invoice is ready to be paid.

lethal zealot
#

Okay, I'll try that next. Seems straight forward ... The payment is to be taken immediately.

wind basalt
#

Yep.

lethal zealot
#

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?

wind basalt
#

Yep.

#

Give it a try in test mode and see how it works for your flow.

lethal zealot
#

Okay good. I will look into it and get back to you if there any difficult obstacles.

#

Will do.

#

Thank you : )

wind basalt
#

Happy to help!

lethal zealot
#

Please enjoy the rest of your day.

#

Bye for now.