#aman.mohammed
1 messages ยท Page 1 of 1 (latest)
Hi there!
Pasting your other message here:
Does anyone know if we can add a text field box or any other HTML control to the Payments Link page?
I dont think it is possible as I have looked at all the docs. It perhaps is possible if we use the Stripe API to build custom page.
Does anyone know if we can use any plugin (paid/free) to add a text field to the Payments Link page so that I can ask the customer to leave a note with the order
Where is this charge coming from? A Checkout Session, Subscription, Invoice, something else?
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
First question is simple.
- I have created a Payment Link for a product.
- The customer buys the product via the Payment Link
- I check the Stripe REST API and can find the
chargemade to the customer with details such ascardused to pay, billing address etc. - Which product did the customer buy? Can I find that information somewhere via the REST API by passing in the charge id
Second question is simpler.
- Does anyone know if we can add a text field box or any other HTML control to the Payments Link page?
- I want my customer to have the ability to add optional notes while buying the product via the payments link
are you listening to webhook events?
None, I have not added any webook event. There was no need for it in my use case. I have just used the stripe keys to connect to the REST API
- Which product did the customer buy? Can I find that information somewhere via the REST API by passing in the charge id
This is called order fulfillment
please read this doc https://stripe.com/docs/payments/checkout/fulfill-orders
Payment Links behave the same way as Checkout Sessions
when it comes to fulfilling orders
ok
is there a REST API endpoint for fulfilling the orders?
or the only way to fulfill is via a webhook?
webhook is your best way to handle this, because it is more resilient and relies on Stripe providing you the right "triggered" events
ok so clearly, there is no REST API endpoint to fulfill customer orders
๐ฉ
and the only way is webhook
you can list all your checkout sessions and try to see whether you already fulfilled the order or not
there are thousands of ways of dealing with it
it boils down to choosing the right one
i agree and I want the simplest, which in my opinion is having a 1-1 relation between charge and product purchased. I am not sure going the checkout sessions route is any good, as it does not seem to have a direct relation. A charge ID should simply inform which product has been brought.
perhaps i will see how to use the webhook as that is only sensible to do. but i still think it is a much needed feature in a REST API
๐ค
second of all Payment Intents (the new API that replaced Charges) only contains the amount and is not linked to a Product
This is the current Stripe API https://stripe.com/docs/api/charges?lang=curl
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok, i see.
one that we don't recommend our users of using
got it
read this for more details https://stripe.com/docs/payments/payment-intents/migration
to make it easier the Checkout Sessions has line items that you can retrieve via this API https://stripe.com/docs/api/checkout/sessions/line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so in my case,
I have a 3rd party system which integrates with Stripe. I have stripe payments links on my public website. Customers buy, and i want that purchase to be shown in another system. It should show details of hte customer and the product purchased plus any other relevant details.
what is the 3rd party you're integrating with?
that doesn't give me any context what's so ever
is this a plugin or a e-commerce platform or what exactly
its just a custom node js application mate, using the REST API from Stripe
and showing orders
ecommerce backend system
then it's not a 3rd party that integrates with Stripe
in that case you can easily add the webhooks endpoint and fulfill the orders by listening to the checkout.session.complete events
ok, i will give that a try
i am sure it will work, but out of curiosity the REST API does not have a customer order detail object? isnt it?
also on my second question, is it possible to add a text field to the Payment Links ?
for this you need to contact support https://support.stripe.com/?contact=true we barely just launched a private beta for this, but they need to see whether you're eligible for the beta program before giving you access
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
it depends what are you saving as info and how you will be collecting the data
but as I explained earlier all the products will be on the Checkout Session's line items
Thanks a lot for your help, really appreciate your time and patience with me.
no worries, let me know if you need any more help
