#ericbirdsall

1 messages · Page 1 of 1 (latest)

plush pivotBOT
sour wagon
#

Is this for your own custom page, or checkout, or something else?
Something like this exists for Payment Links but to my knowledge it is only for pre-defined parameters. I don't think we support arbitrary ones

shrewd shuttle
#

@hollow oxide you may be able to use metadata to accomplish this. As an example, if you're creating a payment intent you could add the key value pairs to the metadata and, once the transaction succeeds, you can query the payment intent (or receive it by webhook) and pull the metadata.

hollow oxide
#

@shrewd shuttle Yes, from reading the docs (which are very well done btw!) I think metadata is the way we'd pass the info in a webhook. But I'm wondering if we could have URL parameters determine the key value pairs that get sent in that webhook

#

Let me step back and give a broader picture of our goal...

#

We give customers a FREE license to use our software for X days. We assign that license a unique ID. When their trial ends, we want to present them a link to a (Stripe hosted?) page where the URL parameters would tell Stripe; 1) Which software the customer is purchasing AND 2) The associated License ID, so that when the payment is successful- we could send that info via webhook back to our systems which which update their software status from TRIAL to FULL VERSON

shrewd shuttle
#

Got it, if you want to use a Stripe hosted solution, Checkout is probably the path of least resistance. The specifics of how you implement this will be different based on what tech stack you're using but here's how I would generally approach this.

  1. send the customer a link to a page hosted by you and including whatever params you'll need
  2. the only purpose of that page is to pass the params to your server where you create a checkout session and include the relevant info in the metadata property
  3. redirect to the newly created checkout session
  4. use webhooks to know when the session is completed, inspect the metadata and make any necessary licensing updates
hollow oxide
#

Yes, thank you! That's what I was thinking as well. 10/10 for your responsiveness and knowledge!

shrewd shuttle
#

No problem at all! Best of luck.