#coliobeware_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/1288604394513764362
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there
I'll start slightly out of order
checkout.session.completed is the correct event to listen for if you need to retrieve custom field values from a Checkout Session
No problem and thank you for the clarification there
What you're trying to do with regards to updating receipts is not possible. Updating a Charge's description after the PaymentIntent has already been confirmed will not reflect the new description in the receipt
One other thing: custom fields should not be used to collect personal information (like names): https://docs.stripe.com/payment-links/customize#add-custom-fields
Thank you, some follow up questions.
-
Is there a webhook that can be responded to that will allow appending information to the receipt?
-
The donation can be made on behalf of someone else. If not using a custom field, what would be the best way to collect that person's name?
- Not exactly. Since you're using PaymentLinks here, we attempt to confirm the payment when the customer presses "Pay". Any details on the PaymentIntent and Charge at that exact time is what will be reflected in the receipt. I think you likely want to look into using Checkout Sessions instead (more in # 2)
- If you create a Checkout Session instead of using PaymentLinks, you can collect the donation details up front (a name in this case), before the customer lands at the Checkout Session to input their payment details. You can use the value they provided when creating the Session, specifically using it as the value of
payment_intent_data.description: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-description This will trickle down to the Charge description
Ok that makes sense. So for #2, save any extra information before sending the customer to the Checkout Session. Then render the Checkout Session and append the extra data (a name in this case) to the payment_intent_data.description when creating the session?
Yep, that's right
Much appreciated, thank you