Commerce Tools

dean-shmuel
Member

interacting with embedded payment links

SOLVE

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

0 Upvotes
1 Accepted solution
JackCoopersmith
Solution
HubSpot Product Team
HubSpot Product Team

interacting with embedded payment links

SOLVE

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:

  1. Create and share a payment link
  2. Two routes for notifications
    1. enable the default user notification
    2. 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!

View solution in original post

10 Replies 10
CBN
Top Contributor

interacting with embedded payment links

SOLVE

And this is the old ticket on getting this for the redirect links in HubSpot in general:

https://community.hubspot.com/t5/HubSpot-Ideas/Allow-Personalization-Tokens-to-be-Used-as-URLS-in-CT...

 

Come HubSpot - you can do better.

0 Upvotes
JackCoopersmith
HubSpot Product Team
HubSpot Product Team

interacting with embedded payment links

SOLVE

@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?

0 Upvotes
CBN
Top Contributor

interacting with embedded payment links

SOLVE

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. 

0 Upvotes
JackCoopersmith
HubSpot Product Team
HubSpot Product Team

interacting with embedded payment links

SOLVE

Ah got it so query params... do you mind describing a bit more about your use case?

0 Upvotes
CBN
Top Contributor

interacting with embedded payment links

SOLVE

Sure Jack. 

 

When the payment is successful I want to create the user's new account on my platform. This requires a couple of parameters e.g. email. Then I can set the redirect link to https://app.uqualio.com/freetrial?email={contact.email}&emailvalidated=true

 

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. 

0 Upvotes
CBN
Top Contributor

interacting with embedded payment links

SOLVE

This is close to what I need @JackCoopersmith 

 

When the payment is successful I want to redirect to this link with values from the contact:

 

https://app.uqualio.com/freetrial?email={{contact.email}}&contactid={{contact.id}}&....

That would make things very easy for many cases with payment links. 

0 Upvotes
JackCoopersmith
HubSpot Product Team
HubSpot Product Team

interacting with embedded payment links

SOLVE

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"

dean-shmuel
Member

interacting with embedded payment links

SOLVE

Hi,

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

0 Upvotes
JackCoopersmith
Solution
HubSpot Product Team
HubSpot Product Team

interacting with embedded payment links

SOLVE

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:

  1. Create and share a payment link
  2. Two routes for notifications
    1. enable the default user notification
    2. 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!

PamCotton
Community Manager
Community Manager

interacting with embedded payment links

SOLVE

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.

 

Kindly,

Pam

Você sabia que a Comunidade está disponível em outros idiomas?
Participe de conversas regionais, alterando suas configurações de idioma !


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !