#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/1286290383373865001
๐ 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.
- maze_invoice-hip, 12 hours ago, 14 messages
- maze260_api, 1 day ago, 82 messages
- maze260_api, 1 day ago, 3 messages
Nope, metadata don't propagate from one object to another.
What I mean is, how can I add a note for the customer to see after they complete a payment - working with a paymentIntent?
What kind of note exactly you are for? can you share an example ?
I'd like to say that a portion. of the charge is non-refundable
Where you want to display this information? in the Hosted Invoice Page ?
If i were interested in working with invoices then that would be yes, but as i am interested in working with payment-intents, the answer is no.
After each payment, a customer is e-mailed an invoice by Stripe onfirming the transaction. I'd like the note to appear on that e-mailed record for the transaction.
In that case you need to display that message in your Webpage (somewhere next to your Payment Element)
You can try checking the receipt custimization I think
https://docs.stripe.com/receipts?payment-ui=direct-api#customizing-receipts
My use case is within a smartphone application with a prompt to enter card details and pay.
In your case, you can set that information inthe description of the PaymentIntent:
https://docs.stripe.com/receipts?payment-ui=direct-api#customizing-receipts:~:text=To display custom,Some examples include%3A
That was my next question, Whether there is a limit of text for the description field in a payment-intent ??
The customisation of receipts sounds good, like it covers my interests. Thank you for this info. I will give that a try next.
This is all for now, but please comment on whether there is a limit of characters for the description field - regarding payment-intents
I think 5000 chars
Okay, that would be more than enough, so, payment-intent is still a good solution for my use case. It's also much simpler than Invoices that require webhooks to learn the success of the customer's card payment.
Lastly, does an Invoice have a payment-intent aspect to it please? If yes, could be accessed to learn the status of the customer's card payment?
hi! I'm taking over this thread.
No probs.
yes an Invoice has a PaymentIntent: https://docs.stripe.com/api/invoices/object?lang=node#invoice_object-payment_intent
Thank you to your predecessor also : )
Okay, that's good news. So then maybe I could still access the payment-status ... How would that work if the payment-intent/invoice was create from a smartphone app and had to be presented on a hosted page please?
I mean, how would I reach the payment-status for whether it was successful or not?
you want to be notified when an Invoice payment is successful?
Yes, immediately please, so that the data can permit further access within the application - if positive.
Actually, if the invoice object is returned with payment-intent data, then from that data I should be able to access the payment status.
for this you would use a webhook endpoint, and listen to the invoice.paid event. you can learn more about this here: https://docs.stripe.com/webhooks
Okay, but if there's a payment-intent, shouldn't that data be associated with the paymentintent as well?
you will also receive a payment_intent.succeeded event yes. but if you are creating Invoice, it makes more sense to listen to invoice.paid.
Okay, but can you describe the process for arrange a webhook and its observation please? In my mind it is highly complex and upsetting or off-putting.
have you read the link I just shared? https://docs.stripe.com/webhooks
I have probably seen it before ๐ What I need is an expert's breakdown of how to do it - from expertise, all things are easy.
I recommend reading this doc, and then let me know if you have specfic questions.
Okay, thank you Soma. You have been very informative and helpful. Please enjoy the rest of your day ๐