#stripe-connect-platform_best-practices

1 messages ยท Page 1 of 1 (latest)

eternal daggerBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1308100037397708862

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

glad snowBOT
primal spire
#

Hi ๐Ÿ‘‹ I'm not sure what the uuid query parameter you're showing there is plumbed up to.

If you're using Payment Links, then you'll want to use our client_reference_id query parameter appended to the Payment Link's URL:
https://docs.stripe.com/payment-links/url-parameters#streamline-reconciliation-with-a-url-parameter
and populate that with your user's UUID. Then you can retrieve that from the client_reference_id field on the resulting Checkout Session:
https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-client_reference_id

frigid flame
#

OK, I see this now. It is in the UTM section/page.

#

In general, is it bad practice to use Stripe Payment Links if I'm a developer in a Ruby on Rails app. I was trying to avoid writing Stripe Checkout code, but this actually is getting complex. Do "real" developers use Stripe Payment Links or it's just asking for trouble down the road and it's better to just code it all up.

#

And I have to use "client_reference_id" as the key or "utm_" as the key - those are the only ones you will send back, is that right? No custom key names in URL parameters allowed - is that correct?

primal spire
#

It's less dependent on what environments you're building your integration in, and is more dependent on what you are trying to accomplish.

Payment Links are designed to be single links that all of your customers use. So additional work is needed if your need a way to track those payments as being applied to a specific user.

If you already have Customer objects in your Stripe account, then Checkout Sessions may be a similar amount of effort to implement and easier to track.

#

Correct, the query params shown in our guides are the ones we support.

frigid flame
#

Well, this is for a new app.

#

"already have Customer objects in your Stripe account,"

#

You mean existing customers? No. It's a new app/

#

My thinking these days vs. 2016 Stripe is that I add a payment link and then if the use upgrades to a paid plan, I show them a link to Stripe Customer Portal. Is that the best practice???

#

In 2016, I had to code updating credit cards, really complex upgrade/downgrade code, but I'm trying to just get away with Stripe Payment Links and Stripe Customer Portal.
Any guide to doing this???

#

And last question. I only have 1 plan and monthly and annual Stripe Payment Links.
If I grow to many plans and add a Stripe Pricing Table (premade by Stripe) do your pricing tables support my adding client_reference_id to URLs or is it hardcoded so i cannot adjust the table's links???

#

I am not seeing client_reference_id being sent back to me.

#

Is it saved in the session? Or is it sent in params?
<ActionController::Parameters {"session_id"=>"cs_test_xxxxxxxnoiqK6bB5NYGzFVqoT7hOLp9Lxs44ub2iLkTZID", "controller"=>"charges", "action"=>"after_payment"} permitted: false>

primal spire
#

Best practice fluctuates based on the specifics of the features that you want to offer. It sounds like Payment Links + Customer Portal may be enough. Are you finding gaps in your testing caused by the limitations of those products?

A guide for doing what?

Pricing Tables accept the use of client_reference_id, as explained here in our guide for them:
https://docs.stripe.com/payments/checkout/pricing-table#handle-fulfillment-with-the-stripe-api

Display a pricing table on your website and take customers directly to Stripe Checkout.

#

It's saved on the session object

frigid flame
#

OK I see it saved in the session
"client_reference_id": "5b242fe3-08cb-45b3-a3bc-5261087e036e",

#

No I havent' looked at these since they came out. You thank G-d added test env emails so that was the big pain point. Looks good so far.

OK I'm great.

#

Thanks!

#

over and out

primal spire
#

Any time! Happy to help!