#Ring - webhooks

1 messages · Page 1 of 1 (latest)

sinful maple
#

You're looking for webhooks

dark barn
#

Thanks, it's specifically what I've been reading. What I'm missing that this webhook contains the ID that I use in -my- system for which user has paid. I would assume this ID is something I would send along in the payment link, but I can't figure out how - that's my precise problem

sinful maple
#

A payment link generates a payment intent object (each has a unique id)

#

Or inspect their billing email on the payment intent object

dark barn
#

Okay

dark barn
sinful maple
#

Payment Links are trickier to manage because it's one link to multiple customers

dark barn
#

In applications that use Stripe, is the email used as the key to identify paying customers to customers in the system?

sinful maple
#

With something like Checkout sessions it's a one link to one customer

#

And the relationship is easy to preserve

dark barn
#

I see

#

That makes sense

#

Perhaps I'm looking to do a Checkout session instead then

#

I'll read into that, thank you

sinful maple
#

It sounds like it

#

What kind of payments are you trying to accept?

#

What kind of system are you building?

dark barn
#

People sign up to become part of an student organization. When they register, they are given an entry in the database for members, with the "PAID" field set to FALSE

#

They receive an email to the email they registered with, containing a link to pay their membership

#

I want the payment to then use a webhook/event/request/whatever to an endpoint in the page containing some identifier for the member so I know which member to set PAID = TRUE

#

Preferably the MemberID, since it's the unique primary key in my database

sinful maple
dark barn
#

Ahh interesting

#

Okay

sinful maple
dark barn
#

Alright

#

Then I would have to store MemberId -> StripeCustomerId's in the DB though, no?

#

To pick out the Member again when the payment returns

#

Checkout session looks exactly like what I need

sinful maple
#

You could use the stripe-generated customer id as a primary key, but if you must use your own primary key value, then you could do that mapping, yeah. Or you could pass in your member id as metadata so they'll be attached to certain objects: https://stripe.com/docs/api/metadata