Hi, We want to embed payment links in our website. Wehn creating a payment link I witnessed there are 2 options for 'payment success': either show the default success message, or redirect to a specific URL.
my question is - Is it possible with code to create cuswtom behavior for when payment succeed? does the iframe post some messages? are there any js events that we can listen to? Thanks
Got it, appreciate the insight here @dean-shmuel ! Let me know if I'm wrong here, but it sounds like you want to embed something on your website and then notify internally when a payment happens. Assuming that's true, here's how you'd do this with HubSpot payments:
Use a payment-based workflow with a trigger of "payment status is equal to succeeded" with any actions you'd like there
Ultimately our vision is to create a commerce-powered CRM, and we're doing that by simply creating objects - right now (you'll see the introduction of a pretty significant new object in the next couple of months) we have the payment object that represents a transaction and subscription object that holds recurring payment information. If, for example, we're 6 months into a monthly subscription, that's one subscription record and six payment records associated with that one subscription.
Let me know if you have any other questions on this or anything else!
@CBN apologies in advance for the misunderstanding on my end, but it's not clear to me why you couldn't just plug that link into the payment link settings and have it redirect there upon successful payment?
Very simple issue as HubSpot does not expand tokens in the redirect URLs. So I cannot get the contact's email or contact id as part of the query parameters in my redirect link.
Yes, it could be done with a webhook, but that is an $$$ upgrade I will not add to my already too expensive HubSpot subscription. And I already have the redirect solution working from other places, but not as usual from HubSpot.
FYI - I have given up on HubSpot and implemented this using Stripe checkout directly in about two hours of work.
Thanks for the question here @dean-shmuel ! Quick intro - my name is Jack and I work on the Commerce and Operations Hub team...
I'm curious, what's your ideal end state here? What's your use case? I promise to answer your question head on, though I'm curious what you'd want to see here if you were to "waive the wand"
Thanks for the answer, We like to be able to accept payments in our website (therefor embedding the payment links), and to be able to "know" within our client that the payment was successful. our current solution is instead of the generic Hubspot payment success page, to redirect to a designated page so that we will know the payment passed. We are fine with this solution, I was just curious to see if there is a more elegant way to do this, as I understand that "behind the scenes" the payment links are powered by Stripe, and Stripe offers many events to control the payment flow
Got it, appreciate the insight here @dean-shmuel ! Let me know if I'm wrong here, but it sounds like you want to embed something on your website and then notify internally when a payment happens. Assuming that's true, here's how you'd do this with HubSpot payments:
Use a payment-based workflow with a trigger of "payment status is equal to succeeded" with any actions you'd like there
Ultimately our vision is to create a commerce-powered CRM, and we're doing that by simply creating objects - right now (you'll see the introduction of a pretty significant new object in the next couple of months) we have the payment object that represents a transaction and subscription object that holds recurring payment information. If, for example, we're 6 months into a monthly subscription, that's one subscription record and six payment records associated with that one subscription.
Let me know if you have any other questions on this or anything else!
Hello @dean-shmuel thank you for posting in our Community.
Currently, it's not possible to have a payment link API. I am checking for more information, but I would highly recommend checking this Community post here with more information.