#PhatBoB
1 messages · Page 1 of 1 (latest)
yeah doesn't seem possible, what you want to do is set the description of the PaymentIntent that ends up being created
so what you would want is a description field in https://stripe.com/docs/api/payment_links/payment_links/create#create_payment_link-payment_intent_data but it doesn't have one.
if you don't specifically have to use PaymentLinks you can create the CheckoutSession directly and use https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-description
got it, but i can't understand, PaymentLink does not create a checkout.session as well?
I mean i am in the situation that i have to create a donation paymentlink which i need to have a clear identification on the overview section of my dashboard, i am expecting to get 30/40 donation per day....do i have to get thos payments and edit manually to have a description field?
Is there any batch procedure i can use to edit that field on my dashboard?
PaymentLink does not create a checkout.session as well?
It does
the PaymentLink is just a URL you give to the customer, and when they visit it, it creates a CheckoutSession and directs them to it. You could just create/redirect yourself directly if you need to/are able to/would like to create the payment information dynamically on a server at the time the customer is in the flow
Is there any batch procedure i can use to edit that field on my dashboard?
not that I know of
I agree it's a great feature request that we should support a description passthrough here
yes...it's a limitation that i didn't expected to face honestly.
btw the only solution is to create a payment page which i can pass the description to the checkout session or to manually edit the description created using the payment link?
Is that right?
right
ok thanks for help
Is there any batch procedure i can use to edit that field on my dashboard?
to be clear, you can use the API of course
in which way? can i retrieve a paymentintent from dashboard and edit the description field
for example listen to the checkout.session.completed webhook event, and then retrieve the PaymentIntent and update the description
?
when I said no I mean, you can't in bulk do this with only the dashboard
in the API it's matter of calling https://stripe.com/docs/api/payment_intents/create#create_payment_intent-description
yeah is a good idea, but is there a way to know if that paymentintent comes froma paymentlink or not?
not easily unfortunately if you only have the PaymentIntent ID and no other context
but it works well if you do it from the context of a webhook handler
maybe i have a workaround...i have different payment comes from my backend and all have a description, when i listen to the event checkout.session.completed, is it possible to check if 'description" == 'null' and then proceed accordingly to update or not the field?
i mean can i retrive the checkout session data?
well if you're handling a checkout.session.completed event you would know that it comes from a PaymentLink because the payment_link field is not null. https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_link
you can also retrieve the CheckoutSession's PaymentIntent (https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_intent) and check the description on that, yes.
super good, i'm going to try that! i have very appreciated your help 🙂