PricingBlog

Setting up stripe using payment links/session_order_id

  • rscott-1203556660115804260

    Bishop

    2 years ago

    I'm using payment links and expecting to get back from stripe a order session ID.

    I'm not clear on how I can access the order_id that I'm sending through using the docs from stripe. I've done this in Wordpress/php so I know how to do it, just unclear on a few toddle issues.

    a) how do i access the ?order_id=xxx parameter? 'order_id' is only going to come through when I've got a visit directly through order confirmation, not when I'm building in toddle.dev, because the url has incorrect parameters.

    How can I extract fields from the object in general and how will I extract order_id in particular?
  • lucasg-1203557266943639623

    Lucas G

    2 years ago

    You'd use Parse URL
  • If you're in Stripe test mode, you should be able to get an order_id from a test transaction and use that as a placeholder, no?
  • rscott-1203557697585418250

    Bishop

    2 years ago

    ok i got this
    1203557697367187576-Screenshot_2024-02-03_at_10.28.09_PM.png
  • I guess I'm not sure how I'm going to test. I have to push to publish, right?
  • lucasg-1203558696697864223

    Lucas G

    2 years ago

    For testing purposes, put in a placeholder URL in there
  • with a placeholder order_id
  • just to validate things
  • rscott-1203558845125894144

    Bishop

    2 years ago

    i guess if its not detected it could use a placeholder
  • lucasg-1203558871801528360

    Lucas G

    2 years ago

    Though, yeah, publishing and running the actual flow I guess is a way to test it lol
  • Can you use a test order_id
  • rscott-1203559035580977223

    Bishop

    2 years ago

    yeah i'll just substitute one in if order_id is missing
  • if i can figure that out.
  • lucasg-1203559254259277824

    Lucas G

    2 years ago

    well for now you could paste into the Parse URL node something like testingsite.com?order_id=1234567890
  • rscott-1203559291429331065

    Bishop

    2 years ago

    default to
  • yeah i could but i want to minimize the number of things i need to remember to go from dev to prod
  • lucasg-1203559395456188436

    Lucas G

    2 years ago

    Yeah or use a Default to to set a fallback
  • rscott-1203559425877610626

    Bishop

    2 years ago

    yes i found that just now. 🙂