It would be very useful if we could add metadata parameters to a payment link or the payment thank you that could be later be found in the payment data.
We have a case where the an external process creates multiple contacts and make course associations using the API. Workflows create a deal based on the that data. In the meantime, the external process redirects users to a payment link. The email address is not always a surefire way to match the payment to the deal. (The email address could be changed in the payment link to an unknown one, or the email could be associated with multiple deals.) It would be useful to be able to pass along the deal id or another unique value to the payment link as a parameter that is later available in the payment as a definitive match.
Hey @SBasile - thanks so much for posting in the Community!
I definitely understand the need here. And while I can’t find any documentation on currently being able to achieve this, I highly recommend posting this in our Ideas Forum. It would allow other customers to upvote your idea and act as a direct line of communication with our Products Team. If you do post there, feel free to comment here with the post’s link - I’d be happy to start the upvoting!
Additionally, I’d like to tag in a few API experts just to make sure I’m not missing anything already available. @danmoyle, @Ben_M, and @Mike_Eastwood - any thoughts on how @SBasile may be able to achieve this?
Shane, Community Manager
Thanks for the tag @SBasile. Hi @STierney! While I don’t think I have a direct solution, this did get me thinking about some possiblities. Ultimately this may come down to a third-party option and custom development. But here’s what I start to wonder about first…
Could you create payment links from Deal records? When generating a payment link directly from a deal, HubSpot associates any completed payment with that specific deal, even if the checkout email is different. For programmatic processes, this would require using HubSpot’s API to locate or create the right deal and generate a one-time use payment link from it. But it might help ensure accurate association without relying solely on email. The downside that comes to mind is that this idea is best suited for tightly controlled flows (one-to-one, not bulk or self-service purchases).
The third-party option could include using Zapier maybe. Since Payments are built on Stripe, I would think it should use somewhat similarly.
Hi @danmoyle. We love the HubSpot API and work with it frequently, but HubSpot recently changed the Payments API to a tracking API. It now allows you to read payments and add payments collected from an external source, but you cannot create a payment link. Payment links can only be created from a deal using the HubSpot UI. At this point, there doesn’t seem to be a method I am fully confident in for associating a payment with a deal when deal creation and the issuing of a multi-use payment link are happening in parallel. It seems to rely too much on the timing of the payment and on the assumption that the email address on the payment has not been altered by the user.
If you see an angle or approach that I am missing let me know.
Thanks for the clarification and update, @SBasile. I wasn’t aware of that change specifically. Let me do a little more asking and research. If I can find something, I’ll let you know.