Passing data with Payment Links

Поделиться
HTML-код
  • Опубликовано: 12 июл 2024
  • In this episode, you'll learn the tools for passing data to and from Stripe with payment links. We'll cover the client_reference_id, embedding the Checkout Session ID in the return URL, and using UTM params for conversion tracking.
    Presenter
    CJ Avilla - Developer Advocate at Stripe - / cjav_dev
    Table of contents
    00:00 Introduction
    01:00 Creating a Payment Link in the Stripe Dashboard
    02:00 Adding a client reference id
    03:04 Retrieving the checkout session id
    06:50 Adding UTM parameters
    07:48 Conclusion
    Resources
    UTM Codes stripe.com/docs/payments/paym...
    Confirmation behavior stripe.com/docs/payments/paym...
    Prefill or track customer sessions stripe.com/docs/payments/paym...
    Support
    If you have a question, please feel free to reach out to our support team on Discord at stripe.com/go/developer-chat
    Updates
    Sign up to stay updated with developer news: go.stripe.global/dev-digest
    Feedback
    If you have any feedback about this or other episodes, let us know: forms.gle/VjNqzRhotM2snYo88
    #nocode #stripe #lowcodenocode #payments
  • ХоббиХобби

Комментарии • 68

  • @victorayala_
    @victorayala_ 11 месяцев назад +1

    You're my hero. It took me two days to figure this out. Thank you for what you do.

  • @leosilva0411
    @leosilva0411 Год назад

    I love those videos, they're simple and very straightforward

  • @leonardoximenes7525
    @leonardoximenes7525 Месяц назад

    The UTM parameters are life saver, thank you guys ❤

  • @user-ft2md2gd4s
    @user-ft2md2gd4s 7 месяцев назад

    this channel is gold almost literally 💶😉💪

  • @VitorVelosoSA
    @VitorVelosoSA 5 месяцев назад

    Ok, this video is gold. Thank you

  • @jasonrwashington
    @jasonrwashington 5 месяцев назад

    Very Helpful - saved me hours!

  • @MrSurfsAlot
    @MrSurfsAlot Год назад

    Exactly what i needed

  • @zoph
    @zoph Год назад

    Super useful!

  • @DiegoPenteado
    @DiegoPenteado 4 месяца назад

    Saved my day! Thank you.

    • @StripeDev
      @StripeDev  4 месяца назад

      Thanks for letting us know Diego-we're so glad to hear it!

  • @djmazzafakka
    @djmazzafakka 10 месяцев назад

    thank you!

  • @rabeats9346
    @rabeats9346 5 месяцев назад

    Thanks Stripe for your incredible Payment Links feature. It is awesome for non coders. I would like some added features that i know are easy to implement and will be highly welcome by your users :
    - please let us implement shipping fees depending on the country were the seller need to ship. For example when you sell physical good let's say a pair of shoes, the price for local shipping can be different for international shipping. When the buyer enter his billing country in the form the price need to be automatically changed
    - let us implement the shipping fees depending on the purchased quantity: if the buyer purchase 5 pairs of shoes, the shipping fees need to be adjusted because they are not necessarily 5 time the shipping cost of one pair.
    I hope i'm clear to understand and hope to see these features added soon. Thanks for your dedication to make life easier. I love you much better than Paypal !

    • @StripeDev
      @StripeDev  5 месяцев назад

      Hi there-have you checked this Doc about adding shipping rates for Payment Links: stripe.com/docs/payments/during-payment/charge-shipping? There you can see the no-code option.

    • @rabeats9346
      @rabeats9346 5 месяцев назад

      Hi @@StripeDev , yes i've checked it and tested the shipping rates feature but it does not really do that. I've understand the shipping rates, like the doc explains , options that a buyer can choose from to get for exemple free local picking, 10 dollars for 5 days delivery, 20 dollars for 2 days delivery etc..Generally this is a case when the seller and the buyer are in the same country/location and In this case the buyer choose the option. I know i can use shipping rates for different shipping fees for different countries, for example : for local default shipping fees 5 dollars, Canada 10 dollars, US 20 dollars, France 30 dollars
      But there will be always that buyer that is in France that will forget to choose the 30 dollars shipping fees and let the default 5 dollars or choose the fees for Canada or US, that will tells you afterward that he/she made a mistake!
      In the other hand if we can define the shipping fees for the countries/locations, when the buyer choose his country in the form the shipping fees are automatically updated with the amount we have defined and mistakes will not happen and then we can use the shipping rates feature for example to give options : 50 dollars for UPS 10 days delivery, 100 dollars for DHL overnight delivery.

  • @scottschlegelmilch8559
    @scottschlegelmilch8559 9 месяцев назад

    You demonstrate adding “client_reference_id” as a parameter. Thank you. Does it have to be named that or can you add any parameter name (ie employee_number, etc.)? Will all added parameters show up when you use the CLI (“$ stripe checkout sessions list)?

  • @emmafletcher5992
    @emmafletcher5992 7 месяцев назад

    MY GGGGGGGGGG THANK U

  • @PaidMembersApp
    @PaidMembersApp Год назад +1

    Please add a name attribute to Payment Link API. Great video!

  • @155hvar
    @155hvar Год назад

    Hi there, thanks for great explanation, however i want to ask if it is possible to add at the end of redirect url total amount and then use that to track payments in other platforms like ga4 of Fb as dynamic conversions

    • @StripeDev
      @StripeDev  Год назад +1

      Hey Jakov. Can you please try adding "?amount=XXXX" (replace XXXX with the actual amount) at the end of the URL?

    • @155hvar
      @155hvar Год назад

      yes thanks

  • @jongraham117
    @jongraham117 5 месяцев назад

    Hi. Great video. Is there a way to retrieve the client id on the thank you page using the session id? I would like to update the client record in database but would need to know what client record to update. I'm using php.

    • @StripeDev
      @StripeDev  5 месяцев назад

      Hi Jon! We'd be happy to help here, but could you mind running us through the use case you're thinking of?

  • @CircularSoftware
    @CircularSoftware 11 месяцев назад

    Helpful video thanks. Is it possible to send parameters and use them as values in the payment link form? 2:45

    • @StripeDev
      @StripeDev  11 месяцев назад

      Hey! We assume you're talking about query parameters. There're only a few query parameters that are supported. You can see the list by going to the page here:
      stripe.com/docs/payment-links/customer-info#customize-checkout-with-url-parameters

  • @Azunaii
    @Azunaii Год назад +1

    Is there a way to pass and grab a dynamic Client reference ID, rather than predetermining the value? I need to have a unique ID of my customer come into Stripe for the payment, then back to my system for reconcilliation, and I don't know the value of it beforehand (it depends on which user buys).

    • @StripeDev
      @StripeDev  Год назад

      Hey Bob! Before you redirect the customer to the Payment Link, you should already know what the customer purchases as each Payment Link has preset items for payment. At the time when you redirect the customer, you can dynamically add the client_reference_id with your own customer ID to the query parameter as mentioned in 02:00 of the video.

  • @user-jm9di4ou7j
    @user-jm9di4ou7j 7 месяцев назад

    Hi ! Nice video, thanks. Can utm parameters be used in the webhook from the session ? I can get them to go through like you show, but I can't figure out how to send that utm data in the webhook when the session is completed. Does somenoe know ?

    • @StripeDev
      @StripeDev  7 месяцев назад

      Hi Julien-your redirect URL contains the UTM specified in your payment link URL, and it won’t be used in the webhook from the session. However, we document how you can pass a Client reference ID here: stripe.com/docs/payment-links/url-parameters#streamline-reconciliation-with-a-url-parameter. If you add this parameter to their payment link, it’s sent in the checkout.session.completed webhook after payment completion. Hope this helps!

  • @travisholt5484
    @travisholt5484 5 месяцев назад +1

    I'm new to Stripe. I really like what you guys have to offer. Just wondering 😢 if there are any plans in the future for Stripe to have an IPN like PayPal?

    • @StripeDev
      @StripeDev  5 месяцев назад +1

      Great question Travis! We do offer notifications via email and through our mobile app-if you have any other questions about that, please reach out to us here: support.stripe.com/questions/contact-stripe-support. Thank you!

    • @travisholt5484
      @travisholt5484 5 месяцев назад

      @StripeDev , thanks for the response. Is there documentation or a video on how to use a payment link with multiple items?

    • @StripeDev
      @StripeDev  5 месяцев назад +1

      Yes! You can sell multiple products in one payment link, while also defining quantities for each line item. This can be done via both the API and Dashboard:
      1. To do this via the API, use the 'line_items' attribute.
      2. To do this via the Dashboard, head to 'Payment Links' under 'Products' on the Dashboard and select '+Create link'. Then, you can select existing products or add new products to your payment link.
      Let us know if you need more help with this and we'd be happy to help!

  • @xDTAT0XIC
    @xDTAT0XIC Год назад

    Is there any way to collect the subtotal from the CHECKOUT_SESSION_ID? Or any other information about the transaction?

    • @StripeDev
      @StripeDev  Год назад

      Hi Juan-the customer's name and total are not included in the checkout session ID attributes. If you retrieve the session object itself, these are the attributes that you'd get:
      stripe.com/docs/api/checkout/sessions
      You may also consider customizing the redirect/custom success page:
      stripe.com/docs/payments/checkout/custom-success-page#modify-success-url

  • @pierdocks5412
    @pierdocks5412 4 месяца назад

    Great example. I am building my own site and been researching for ideal and jr-developer friendly and I find Stripe's features and options, ideal for my current level of development. I am using Laravel's TALL stack as frame work for my application? I understand the steps to follow in this video, but do you have a guide or video for this type of framework integration?

    • @StripeDev
      @StripeDev  4 месяца назад

      Great question! We don't officially support this, but you can find a list of all our supported SDKs here: docs.stripe.com/libraries.
      We also have some community libraries that you might find helpful as well: docs.stripe.com/libraries/community.

  • @JasonBurke-dx2ns
    @JasonBurke-dx2ns Год назад

    Is there a way for the redirect URL to be dynamic (using something passed in on the payment link q-string)? Customers will be clicking to purchase from our product and would like for that redirect to bring them back to the same URL they were on so that the page reloads with the user having paid (so the relevant features will show)

    • @StripeDev
      @StripeDev  Год назад

      Hey Jason-you should be able to do this by using your Client Session ID. We actually talk about how to merge these concepts around the 5:50 mark in the video.

    • @JasonBurke-dx2ns
      @JasonBurke-dx2ns Год назад

      @@StripeDev I'm actually looking to drive the user back to a specific URL in my product (the one they were on when they clicked on the payment link). Does the client session object have the referrer URL so that my product could get that value from the client session ID that can be appended to a static redirect?

    • @StripeDev
      @StripeDev  Год назад

      Thanks for the clarification here Jason-unfortunately, this isn’t possible. If you want to redirect in this manner, then we'd recommend using Checkout Sessions so that you can set it for each session.

  • @SellyS.
    @SellyS. Месяц назад

    Hi there! I noticed that when I try and use a webhook to access payment link data I can only pull 2 of my 3 custom fields that are on my payment link. Is there a way to access the third?

    • @StripeDev
      @StripeDev  Месяц назад

      Hey there-would you mind writing in to us via support.stripe.com and we will have someone help you out? Thanks.

  • @gabrielgarza9724
    @gabrielgarza9724 6 месяцев назад

    Thank you for your video. I have a question. I have 2 partners that redirect traffic to my landing page where I have the checkout links (6 products total). they redirect traffic through a button with a link that uses UTM codes. How do I know which purchase came from which partner? This is in order to pay commissions. Is there a referral link that gets stored with the UTM data from each link? I say this because the user journey is the following: User click in partner button and gets redirected to landing page, user selects product, clicks in button and gets redirected to stripe checkout, after checkout the user is redirected to a jotform to complete registration for the program, after submitting form user gets redirected to our contact center whatsapp to schedule his first appointment. So the user never goes back to the landing page.

    • @StripeDev
      @StripeDev  6 месяцев назад +1

      Hi Gabriel. To track which purchase came from create unique referral links for each of your partners, appending a unique identifier to the landing page URL. For example:
      1. yourwebsite.com/landing-page?
      2. yourwebsite.com/landing-page?
      We also recommend using analytics tools to track the conversion on your checkout page.

  • @ekkamailax
    @ekkamailax 3 месяца назад

    Finally a solution to this problem. The issue with using webhooks is they create a race condition. If the user purchases a 'pro' subscription of our SAAS, and we redirect them back to the application after checkout, the webhook might not have processed yet, so they might still see the 'free' version even though they just purchased "pro.'
    We are using this method of passing their user ID to the payment link so we can syncronusly upgrade their account post checkout.
    Would it be a good practice to still process the web hook as a 'fail safe' ?

  • @manliomarchica4911
    @manliomarchica4911 Год назад +1

    How can I avoid customer creation if I already have a customer with the same email? I'm doing a couple of tries but always a new customer is created. Thanks

    • @StripeDev
      @StripeDev  Год назад +2

      Hi there! Specific to Payment Links, unfortunately, you cannot re-use existing Customers/prevent customer duplication. The default behaviour is for the Payment Link to create a new Customer when required, regardless of if one with the same email/name/etc. already exists.

  • @htz70
    @htz70 2 месяца назад

    So the value of client_reference_id, that I pass in the URL param, is NOT saved anywhere in stripe Dashboard? I'd think it'd be available in the payment or subscription, maybe as metadata or a custom field. Instead, I need to build something in my website that processes a webhook?

    • @StripeDev
      @StripeDev  2 месяца назад

      Hi there-you can build automations using Zapier, for a no-code solution to listen for these webhook events. We describe this in more detail starting here: ruclips.net/video/uI9gJakNLQ8/видео.htmlsi=6o1bHI3y3dfAhy6i&t=164

  • @KeyCalculus
    @KeyCalculus Год назад +1

    Your videos are great, but I wish you would slow down a bit. The screen changes so quickly, I sometimes can’t tell what happened.

    • @StripeDev
      @StripeDev  Год назад

      Thanks for your feedback, Brian! Consider adjusting your playback speed from the RUclips video settings. Hope this helps.

  • @lepontRL
    @lepontRL 9 месяцев назад

    How does this work for UTMs that will pass through another page? For instance, anyone clicking an ad will have . But on the landing page, the Stripe buy button doesn't have a any UTMs. How would they pass through? Thanks

    • @StripeDev
      @StripeDev  9 месяцев назад

      Feel free to reach out to our team on Discord at stripe.com/go/developer-chat. We're happy to discuss the options.

  • @codewithamna
    @codewithamna 18 дней назад

    "Hey, I am using a Stripe payment link in different places like websites and Instagram. My question is how I can track these payments to see where they are coming from. Is it possible to see the source directly in the Stripe dashboard? Thanks."

    • @StripeDev
      @StripeDev  18 дней назад +1

      No sorry. A payment link once generated can be used anywhere, they're not platform specific so you won't see where it is. You would need to manage this separately.

  • @lukewilliamrimmington
    @lukewilliamrimmington Год назад

    Hi there @Stripe first of all, I love your product. Second of all, I am developing a C# application with an internal Web View 2 browser with a Stripe payment link. When someone pays with the Stripe generated payment link, I want that specific form to close. I have the necessary code but, I don't know how to create a payment link ID. How can this be done? I haven't found anything yet on how to get this in your documentations, so a reply would be greatly appreciated. Again thanks.

    • @StripeDev
      @StripeDev  Год назад +1

      Hey Luke-great question! Do you mind sending us an email here: support.stripe.com/contact/login with the code that you currently have? This will help us better assist you with this.

    • @lukewilliamrimmington
      @lukewilliamrimmington Год назад

      @@StripeDev Thanks so much, will do.

  • @lucasmdf
    @lucasmdf Год назад

    How can you create customers with their name? I can only see their information in the payment information section of the page

    • @StripeDev
      @StripeDev  Год назад

      Hi Lucas-can you elaborate on this? Do you mean adding a custom field to get the customer's name or attach a name to the payment when it comes through?

  • @VusalHesenli
    @VusalHesenli Год назад

    hi . how to cancel payment after pay with payment link?

    • @StripeDev
      @StripeDev  Год назад

      Hi there-you can do this from your Dashboard here: stripe.com/docs/refunds#cancel-payment.

    • @VusalHesenli
      @VusalHesenli Год назад

      @@StripeDev this is possible only payment intent? i pay payment link and want to cancel this payment. payment link not give me any payment intenet information. what i do?

    • @StripeDev
      @StripeDev  Год назад

      Payments made through a Payment Link still create a payment intent. You can refund this on your Dashboard by finding the payment in your Payments tab, and then cancelling or refunding from the overflow menu.

    • @VusalHesenli
      @VusalHesenli Год назад

      @@StripeDev this is not possible Stripe api?

    • @StripeDev
      @StripeDev  Год назад

      Our docs page here covers how to do this with the API: stripe.com/docs/refunds?dashboard-or-api=api#cancel-payment.
      If you need help getting the payment intent from the Payment Link through the API, you can do so from the checkout session object created when your customer pays through a Payment Link: stripe.com/docs/api/checkout/sessions/object.

  • @ameft
    @ameft Год назад +1

    This is perfect, but all this possibilities, pretty important when using Payment Links, should be better referenced when creating a payment link, especially {CHECKOUT_SESSION_ID}!
    I came up with the idea of using CHECKOUT_SESSION_ID all by myself knowing already that Checkout worked similarly...