No-code marketplace using only Airtable & Stripe with CJ Avilla | AATT #53

With stripe payment links and stripe express you can easily build a marketplace. We're going to build a no-code marketplace in one hour.

Transcript

Aron: [00:00:00] Hey, CJ. Welcome to automate all the things I'm excited to have you. 

CJ: [00:00:05] Thanks for having me. Yeah. I'm uh, I'm excited to build some stuff. This looks, uh, we've got something, something fun today. 

Aron: [00:00:11] Yeah. So maybe some, some context into yourself. I think most developers know what dev REL is, but I think actually most know, coders have probably never met.

A developer relation ner, I don't know how to put that into noun. 

CJ: [00:00:28] Yeah. Usually like the rule is developer advocate and we like do developer advocacy or we do developer relations. Um, yeah. 

Aron: [00:00:36] So there are no developers here. So what are, what are, what are you gonna, what are we going to do today knowing that there's no developers watching?

Well, there might be some actually, but there's usually no developers. 

CJ: [00:00:46] Sure. Yeah. So no code has taken off. No code is taken off, thanks to things like your channel air table. Uh, and so no code has become like a really popular way to build things online. And we want to, we want to arm developers and arm upstarts and arm businesses with the tools so they can help build their businesses online.

And, uh, as a developer advocate, I think it's interesting to sort of dip our toes into the no-code space a little bit and help folks that are in the no-code space. Get up and running with tools that have typically been. Uh, you know, saved for developers outside of, you know, maybe building with plugins, right?

So now you have a lot of access to the same infrastructure and tools that developers typically would use, uh, as a no-code someone is building a no-code. So, um, 

Aron: [00:01:29] yeah. So let me know in the chat, I'm curious to see. Like the mix of folks like our, do we have developers here today? Are most folks, it seems like I'm recognizing Colleen penny, welcome back.

Appreciate you joining. Um, and I'd love to know as well, like, is there a marketplace that you'd like to build? Right. So there are different types of marketplaces that we could build today. Right. And I think we're going to do something very simple, which is just like items in a marketplace, which could be jobs.

It could be boats, it could be whatever it is that you want. Yeah. Um, but, uh, maybe, maybe CJ, I'll let you kind of introduce the use case for today and how we kind of came about it. 

CJ: [00:02:07] Sure. Yeah. So Stripe just recently. So Stripe is a, a platform for building your business online. Um, most commonly used for collecting payments, but we also help you like incorporate and there's a bunch of other features from Stripe that can help you build your business.

Uh, and we recently released a no-code tool. For accepting payments called payment link. And in a previous automate all the things Aaron met with Josh, and they went through like the whole process for creating a payment link and connecting it to your base. Um, and as a fast follow. So right after we released support for payment links, we also support, uh, really support for payment links with multi-party payments, meaning that you can use this no-code offering for collecting payment through payment links and also split some of those payments, uh, among sellers or vendors.

A platform or marketplace like Shopify or Lyft, right. Where you are sort of facilitating payments on behalf of someone else. You can now do that with no code using payment links. And so, yeah, we're excited to maybe, um, show how we might build out a platform or you might become the marketplace and you are helping facilitate sales to end customers on behalf of some other sellers or vendors or other, other folks that you're helping out.

You 

Aron: [00:03:24] have such a educator's voice DJ, like you're using the right terms. You're thinking about the terms you're using us all. I absolutely love it. So, you know, what, what, what I love about Stripe we've grabbed before we jump in here is that, you know, you started with developers and as a company, your goal is to increase the GDP of the internet.

And most folks are not developers. Right. They don't know how to, how to implement Stripe dot JS. Right. And so now you're finally getting to that point where. Actually democratizing the ability to build an online business and mainly payment, which is frankly, no business can live without. So our goal for today is going to be hopefully in an hour, maybe a little less 50 minutes start from an, uh, new air table.

Talk through how to build the easiest marketplace. I'm going to use an example of like appliances. Like let's say a neighborhood marketplace, a local marketplace where folks can, but there's gonna be a ton of things we don't manage, but we just want to get to that payment. And, uh, we're going to leave some time at the end for like, okay, how do we handle these other things, maybe communication or, uh, verification or other stuff again, love to know in the chat.

Uh, oh, we have penny marketplace for arts groups. Love it. Used cars. All great examples. Use cars particularly I think is pretty cool. Um, so, so yeah. Welcome Eric to the stream. Excited to have you here. Uh, yeah. Let's let's kick this off. CJ. You ready to go? Yeah, let's do it. Okay. So, this is where I have to, I have to do a lot of things at once and my way of doing that is by talking about it.

So now you should see my screen here. CJ, there we go. Yup. Looks great. And boom, everyone else should see my screen as well. So let me just recap. Today's agenda. So we're going to start with building the base structure for an air table base, how to add new items and new users into that marketplace. Then we're going to go to the Stripe part.

How do we set up a payment for each item in that marketplace? And then when someone pays, how do we track back to the air table based to say, oh, that item is no longer for sale. And then I have about 50 or 60 things that are not taken care of in this build, like communication, uh, you know, multi users selling multiples, one user selling, maybe 10, 15 things and things like that.

But the cool part is that the hard part, which is let's say CJ sells an item and I want to take 10% of the marketplace. And someone comes in through the marketplace, buys the item, you know, we're going to be able to facilitate that splitting. So 90% will go to CJ and then 10% is going to go. Okay. And CJ you're, you're an air table expert.

I mean, let me, I'm going to spend a few minutes talking about the structure, but feel free to kind of interrupt me and ask questions and same thing for the chat. This is going to be where I shine if I do shine at all. Uh, cool. Okay. So how I think about a base structure for here, uh, is I want my marketplace to be an air table.

Right. So we're going to create a shared view that has all of the information that someone would need to buy that item. And there's going to be a button on it that is like buy this item. Right. So, and that's going to go to the payment link. So let me, when I think about the items, I'm just going to go ahead and start kind of putting out the fields that I think we need.

Okay. So, uh, image. Sure. So, uh, we're gonna have, uh, is going to be attachment fee. Boom. Let's actually, I have some appliances here. Oh, nice. Let's do that. There you go. Someone's selling an iron. I'm really into like upcycle resell. I think, you know, I wish I could buy stuff from the neighborhood. So when we go, we'll use this in my building or something.

Okay. Price. Yep. It's going to be a currency field. Let's say this one's 20 bucks or it's 2020 bucks, right. Um, what else would I do? Maybe I need add date, right? So that's going to be a created time. What's not to you a time field so that these were created today. I don't, what else would I need from like a purity item?

Point of view? 

CJ: [00:07:41] Yeah. So I think if we're going to keep track of the payment links in the same table, we might want to, uh, call them for the payment link 

Aron: [00:07:48] itself payment link and let's call it a URL. That's awesome. And then I'm going to instantly do this thing that I think is really cool. We're going to create a button that is buy this item.

I'm going to call this, buy this item. Nice. And it's going to be a nice little label by, by this blue green open URL. And she's gonna go payment link. 

CJ: [00:08:12] Penny says maybe a 

Aron: [00:08:13] discount. Right. That's a good point. Okay. Let's give it a rich text field. Give folks a little bit of space to write it out. Right. So this is going to go to Stripe, like some, some example of stripe.com.

Yep, exactly. Okay. And description, let's say use Irin since work from home who needs an IRN,

maybe you do. There we go. It's a very, it's a very informal marketplace. Okay. That feels about right. You'll notice that I'm not, uh, uh, adding the name and I want to do that a little later, depending on how we need to search information in this, uh, table in this, in this table, right. In this view. Okay. So, uh, anything else that we should be adding just from like a item perspective?

CJ: [00:09:05] Well, when we come back and we want to associate purchases with a specific. Seller will want to know, like who, who is selling this items. It might be nice to keep track of some reference to that seller in another table. 

Aron: [00:09:20] Yeah. Aye. We will have a seller's table. Cool. Right. So I totally agree with you. So let's see.

So let's just call the sellers. Let's already assume that we're going to have a link. So seller. Linked to another record, let's go to sellers. Let's not allow linking to multiple records and then simply like a sold right into check box that says whether it's been sold. Yeah. 

CJ: [00:09:43] Right. So payment links too, is that you can use them and sell.

You can sell the same item over and over and 

Aron: [00:09:49] over. Um, so do you want to like, like a Mount? Is that what you're. 

CJ: [00:09:56] Or yeah, maybe like quantity sold or something. And then we can keep track of like how many 

Aron: [00:09:59] results I let's let's I'm going to hold on that because I think that adds a level of complexity because they don't expect people to have like multiple, but it is true that you could treat multiple records, linked him to the same thing.

But I do think we can use a count field for each seller. So I'll show that after. Okay. I'll actually remind myself number of items sold will be. Okay. And it's going to be a count on table one. Let's call this items. Okay. That feels about right. Anything, anything comes to mind, CJ. 

CJ: [00:10:32] I think that's great. Yeah, it looks great.

Okay. 

Aron: [00:10:36] Um, awesome. So this is okay. So there's going to be all items we're going to call us. So for folks who are less familiar with air table, air table, you can create views that are kind of, uh, uh, well views into all of your information. So here we have an unfiltered view that says every single one. Let's maybe add a second one here.

Just so folks can kind of get some context. So I have a stove top, uh, which is kind of like I thought the still top, I don't think you can sell just the stove top, but whatever. It's an image of a stove top. I get whatever it works. Let's say this one's 500 bucks. We're still going to have stripe.com. And this is a used stove top.

Don't recommend. Let's say this one has been sold. Okay. Now we actually want to make the front end for our marketplace. So when I was coming, I'm thinking about this, like we could embed, you know, air table into a website, but air table is actually in and of itself already kind of a website. Right. So if we create this gallery view, which kind of creates like a, almost like a listings view, so we're going to start unsold items, available items.

And we're going to filter out everything that's been sold, where sold is unchecked. Right? So now we have this kind of, uh, uh, record this almost like a, a view, and we can actually share this. So here we go. We just create a URL and this is our market. Right. So anyone coming to this URL will see the available items.

Now they can't buy anything because I haven't exposed that kind of a button, but I can't. So what I can do is customize card. I can add the button that says, buy this nice. Right? So now if I refresh here, boom, I have those by this. And it goes to Stripe today. Right. But that's where we're going to put our payment link.

And this is for me, the kind of like MVP of marketplace. Right where you don't need a website, you don't need to deploy anything. You're you're you could be selling. Right. Right. So I'm gonna actually drop that in, in, in the chat. Folks can, folks can have fun with it. I mean, right now it doesn't do anything.

And if people start messing with it, I'll I'll, I'll disable it. Uh, cool. Okay. So that was step one. Let's add, you know, you're totally right. Let's add the sellers. So let's go ahead and, and delete. All of our records

and let's call this cell, uh, item and okay, so let's sell her name. It's going to be a single line text. Let's say I'm selling. And the thing I'm selling is that STO that iron Aaron is selling iron. Okay. Okay. Uh, what else would we need? Right. 

CJ: [00:13:35] So, yeah. So in this table, we're going to want to have reference to the ID inside of Stripe for the account for that seller.

So we need to con we're going to use Stripe connect to connect to, um, the seller's Stripe account to facilitate these payments on behalf of them. So we'll want that Stripe account ID. Yeah. 

Aron: [00:13:54] Okay. So account ID, let me actually go ahead and I'll have you as the stove top. Okay. Yeah, totally. Cause we, we have your account ID.

Right. So maybe email, email feels right? 

CJ: [00:14:07] Sure. Yep.

Aron: [00:14:12] And the last thing I'm going to do is in account ID. So marketplace account ID, and this will become clear why I do this when we create the form to submit items. Right. So, um, I'm actually just going to do, I'm going to do two things. I'm going to call this record number. And, uh, we're going to call this record number and it's going to be an auto number.

Right? And so for folks who are new to air table, like this is just one of those things that if you work enough in air table, you kind of think about in advance. What would normally happen is that you would make the mistake. I'm going to avoid in three minutes, which is a, we don't want to expose the seller names on our form, but we want to be able to tie new items to an existing seller.

So instead we create an idea. And so what we're going to do here is we're going to just do ID, which is a formula field, which has maybe like 0, 0, 0, and the record number. 

CJ: [00:15:13] Nice. Is there a way to like generate, uh, like a random key 

Aron: [00:15:18] to that you could use? Yes. So, uh, there's a few ways to do that. A good one in a simple one is actually the record ID.

Okay. Uh, so we could have a formula field that is just the record, right? Nice. Right. And that's a, it's a unique identifier within that base suite and you're kind of right. That that might be a better unique identifier. So it's actually go ahead and just have this as record ID. Okay. Nice. Right. And that's going to be the identifier for each user in our database.

And that way, when someone's submitting a new item, if they're already a user in our database, With big quotation marks for any developer, uh, as someone with an ID, right. Uh, we're going to be able to identify them. Right. Cool. Okay. So now we actually have almost a marketplace in the sense that from the air table side, let's give ourselves like fake fake emails.

Okay. Uh, and then you're going to be [email protected] Okay. So the only thing left here just from a straight easy marketplace is actually to go ahead and add a form to submit new items. Cool.

Right. And, uh, so, you know, add one to add something to the marketplace.

Fill out this form. Okay. I'm not going to spend a bunch of time on this form. So name, image, price, payment link. We're going to hide cause we need to create that. Yep. And then description and then seller. What I would recommend here is that when you're going to go into the seller, you have the record IDs and you could hide all of these values.

So people just get the record IDs. Yeah. Uh, but what you usually would do is like, Hey, do you have a user ID? If so selected, if you don't reach out to us or, you know, fill out the seller's form to create one and then select your record. And as we're going to add in the, I, if we have time at the end, I will show people how to do that.

Like automation to go to the other form, submit it, and then let that person know about the record ID. But in our case, let's say that you are submitting. Okay. 

CJ: [00:17:35] And so can you like nest another form inside of this form? Or is it you have like two separate forms, 

Aron: [00:17:42] separate forms, but you can create like in the description, a link to that other 

CJ: [00:17:46] form.

Oh, nice. Nice. Okay. 

Aron: [00:17:49] There's a few ways, like we can do a future stream on like how to, how to, how to avoid this and how to edit existing stuff, but let's keep nice. Yeah, there we go. Okay. And now we have our form, so folks can now submit. I'm not going to do that, but this is how folks would submit new items.

And then they would assign themselves that item. And it would show up in our available items, which are then displayed. Uh, that said we should actually kind of thought process here. We should have a little check that says, do you have a payment link? Right? Because we don't want to show items on the gallery that don't have a payment.

So, what we can do is add a second filter. So where payment link is not, is not empty. Great, great, nice. That way someone submits the form until we create a payment link. Uh, they're not going to be, uh, on our marketplace. And so last tip here and we're going to jump into Stripe. Is that a further recommendation is you can create an email to that.

Right. If they selected their seller, well, they have to, I'll make this required, um, to let them them know that like, Hey, we're going to go ahead and create a payment link for you. There's going to be a few steps that you need to take. You can jot down in that email, all of those things. And then once they're done, you create their Stripe payment link and it's created, uh, that gallery item, which appears in the marketplace.

So I'm going to take a deep breath. 

CJ: [00:19:29] Yeah. So yeah. So a couple, a couple of things that, um, that we can also do is like, generally. If we were having people submit items that they were going to sell, I think it would typically be something they're going to sell over and over and over again, with a payment link, we have other offer offerings for like one-time sales.

So you might use an invoice in that case, if we're going to sell something over and over and over like a book, right. If you're going to, if you're, if you were uploading a book or some artwork that you have, you know, multiple copies of, I think those are good use cases. Um, but the one thing that I wanted to mention is that like, um, There are pieces of this that we could automate even further by adding just a little bit of code, but you can definitely get started and sort of take a scrappy approach to finding product market fit with your marketplace and like experiment and iterate really quickly by using something like our table and payment links to just get up and running really, really quickly and validate your idea before adding too much automation.

So we're going to sort of manually create these payment links. We're going to manually create the account, using all no code options. It is a, it is worth mentioning that like, when you submit that form, you could technically sort of make an API call in the background to like go create the product and automate more and more of those pieces.

But to start, this is a really, really great way to, to solve the problem in a yeah. Like a, a no-code way. 

Aron: [00:20:45] So, yeah. And, and even like, frankly, for folks who are like, I don't want to take payment, you could have a button that is like email. Right, like interested and it links to your email and then you go start an email conversation and then facilitate that transaction.

Right. So there was a question in the chat around, like what about inventory numbers? So that's an example where CJ mentioned you could have, there's a few ways to structure it where potentially you might want to create one row for each item of inventory. Right. That does change a little bit the structure.

Cause then you would have. You know, in your gallery, you would have like three irons that might be one way, or you have an inventory number that you reduce every time there's a payment that would require a little bit of automation. That's not something we're going to get into today, but definitely something that is possible.

And if you do figure it out, I invite you to come to the stream and show us how you did it. I'm really curious. Um, okay. So I think with this. Uh, uh, we have our base, we have an outline of the forms. We want to submit to be able to get new sellers and new items into our marketplace. So now it's up to you, like how do we set up this payment link?

Right. As a reminder, this payment link is what people will click on right here to buy the item and what we want from that payment. Is that it does two things. It takes the payment, but in splits the money 10% to me, or more depending on how much you want and then the rest to that seller all through Stripe and CJ.

This is where I hand off to you and to talk us through how to do. 

CJ: [00:22:30] Yeah. So let's, let's maybe start by talking through the process of actually connecting one of those sellers to air table. So could we dive into your Stripe dashboard? Yeah, totally right here. Okay. Yeah. So on the left-hand side, really, the first step is to go to your connected accounts and here we are in test mode.

Um, and so. Yeah, right. Uh, right down on the right hand side, you'll see this create button. So this is the plot next to create. This allows you to create a connected account. Now there's like a couple of different types of connected accounts and they basically vary by how much access they have to different Stripe dashboards or how much white labeling you're going to do for the no-code use case.

We want to use an express account. So if we select express from the account drop. And then hit continue. We're going to create an express connected account and we can do it with no code is just copy that URL and send that to your seller. And they can then fill out all of the onboarding forms to collect all of the, sort of like business, know your customer information so that they can actually set up an account with a bank.

That is behind their Stripe account and that is ready to accept payments. So it'll collect, you know, their, their address and any of the, you know, the legal entities that are related to the account and sort of walk them through the entire flow for setting up an account. So you've, uh, I saw the, a copy of the URL.

Should we go through the process of onboarding and 

Aron: [00:23:52] account? I would only show the, like the F like the page. I know we've gone through it, so, and I'm also happy to drop it in there. If someone wants to like go deeper, uh, and where, if someone fills it out, I'm happy to use it in the example, but essentially it's like, you, you give all your information, your email, your phone number, so that it creates a new Stripe kind of account in the backend that can accept payments when that item is sold.

So I'm going to drop that in the chat. 

CJ: [00:24:20] Okay. So that, that is going to be like a one-time use link. So you would have to copy and paste that for each, uh, I believe for everyone that wants to connect. 

Aron: [00:24:30] Yeah. So the link is too long for the chat. That's over 200. I'm sorry. First you're going to have to do a 

CJ: [00:24:36] hundred, 200 characters, 

Aron: [00:24:37] man.

Okay. If someone's really motivated, I'm going to do. 

CJ: [00:24:41] Okay. 

Aron: [00:24:43] And then you gotta, you gotta con no one has to do it. We already did it, but that's an example of how it works. 

CJ: [00:24:48] Uh, cool. Okay. About this onboarding flows, you can totally brand that with your brand settings directly in the Stripe dashboard. So they match your, your, like your business colors, um, so that when users are brought to that page, it does feel familiar, uh, very similar to Stripe checkout, which we'll see sort of later when we actually go through the page.

Aron: [00:25:08] Luckily, we have no branding. So it's literally just a marketplace. We're gonna, we're going to keep it just simple. So if I, let me just, maybe I'm a Stripe noob here and what this does is it just connects her two accounts to say, I can take payment on your behalf and then kind of flow through me. This is the universal sign for flow, and then send to you a percentage of that money for whatever sales that we do.

CJ: [00:25:38] Yes, so, yep. That's right. So when you actually connect the platform, we would call your, um, automate all the things that I oh, marketplace or platform Stripe, right? Using your API keys, you can sort of control any of the counts that connect to you. Got it. Um, and by control, that means that you, uh, you can, you know, uh, issue refunds on behalf of the connected account and accept payments.

You can, um, you can, there's, there's a whole bunch of different things that you could do typically on your own account. And you can also now do on behalf of all these other accounts so that you can build tools. You can build plugins, you can build these marketplaces to facilitate these sort of yeah. The sort of payment flows as a marketplace.

So, uh, I think we have a connected account and we have you. Yeah, that's right. So if you click on that, a connected account, you'll see in the URL, there's that ACC T underscore that's the connected account ID. It's also, I guess, on the top right there. I think we could copy right here. That is the Stripe con that's the Stripe account ID.

And that is the idea we want to keep track of here. Yep. And so, uh, any time that you receive a notification of something that happened related to a payment that was on behalf of this connected Stripe account, you can look in the web hook notification and it'll have that ID. So you can tell which of the sellers, you know, uh, accepted payment from some end customer.

Got it. And then you can associate that payment back to the seller. So, okay. So 

Aron: [00:27:08] if, if I was to like recreate this on my end, the first step is that we, this would be manual today. And I'm sure that there are plans for you to allow this to be somewhat automated. Question from Connor, uh, is create the connected account, which actually is just like, copy that URL.

Let the person know that they have to do it. And then maybe, you know, every morning, check your new accounts at a match, their email. To this ID and bring it back here so that when payment happens, we're able to know which account was paid out. 

CJ: [00:27:40] Yup. And so there are automations available. So we could actually technically build a webhook listener inside of air table that said, anytime we receive an account dot created event, we could add a seller to the table.

So right. 

Aron: [00:27:55] Doesn't know how to code. So that maybe the lesson here is Connor learn how to learn, how to 

CJ: [00:27:59] code a little bit. No, so this, yeah, I mean, uh, I've seen streams before, right. Where you're receiving a web hook notification from stride with no code. So we can do that. Yeah. So that doesn't require any code.

So you could just receive a web book notification and add a seller to the list. So you can automate that. Um, you can automate that part already. There's actually a few different ways you can create these connected accounts without having to go into Stripe and click on the button to get that URL, to create the OAuth.

Um, and then. Uh, so instead you could, you could either build an off platform, write code to do that. An alternative would be to write a little bit of code to create an account link. Right. But this is going into the dashboard and creating that auth URL is like the no-code way to onboard a connected account.

Yeah. So, yeah. So you could do it with, you could do it with Zapier. You could do it directly inside of, uh, inside of air table by receiving that web notification. Um, I don't actually remember the state of the Zapier. Like the official stripes, Zapier plugin, or, uh, you know, whether or not that would, um, I assume that that also handles like, um, inside of Zapier, you can handle generic web book.

No, 

Aron: [00:29:09] so we w well, let's actually put this at the end. And if we do have time, we are going to do a web hook at the end for a, um, payment, but I imagine we can also have a payment, a web hook for new connections. Right. So let's keep that for the end, for folks like Steven and Connor, who, you know, would be coders, who haven't watched the learn air table, Stripe, uh, air table scripting series, and who aren't like full fledged air table developers just yet.

Okay. So step one, we've connected our account. I imagine the next step is to actually create a product so we can create a payment link for that product. 

CJ: [00:29:49] That's right. Yep. So let's go into products and then payments. Um, do I 

Aron: [00:29:54] need to have an existing product so we can 

CJ: [00:29:57] create one in part like, as part of the flow for creating a payment link, we can create the product also.

Yep. So here we can say add new products. 

Aron: [00:30:05] Okay. So here's just like copy pasting. Yeah, 

CJ: [00:30:07] exactly. And so again, they're behind the scenes, there is an API where you could, um, like when someone submits that form initially, You could post all of this data to strike, to create the product inside of Stripe. That would again, require a little bit of, um, writing a little bit of code, but that could automatically create those products inside of Stripe, as people are submitting, um, the, uh, yeah, there.

So the no-code way is to kind of like, just see what you have entered in air table and come back here and type it in. Um, 

Aron: [00:30:38] so that is a JPEG though. What am I? What's a web P okay. Whatever, they won't have a image. So 200 bucks. Okay. Let's have the product, uh, and, and CJ just, uh, ask for a future stream. I'd love to see like, do the automated version of this.

So let's like a part two. I don't know if there's an interest, let me know in the chat if there's interest for this, but it'd be cool to just do the scripting part. So how do we auto create a payment link? How do we auto connect an account? How do we create a web hook to check when a new connected account is in.

Right. Uh, let me know in the chat, if there's interest and I'd love to have you on to do that. Yeah, absolutely. 

Can't 

CJ: [00:31:18] say no, my stream right now, there is not an API for creating payment links, something that we would love to build and we're excited to add. And we've had a lot of interest in, in that so that we could build automations just like this, but, uh, that would be the one piece where we would have to go to the Stripe dashboard to create it.

But, um, yeah, 

Aron: [00:31:34] that would save us some time. We can still do that. Yeah, absolutely. Absolutely. Cool. Cool. So I've created the payment link for the. Let's go ahead and click next. Oh, there we go. 

CJ: [00:31:44] Yes. So yeah, this is the, this is the spot where we can say with the payment, with the connected account, and then we can find that connected account by typing.

Aron: [00:31:54] Why don't I have you as a, is it because I'm in test mode? 

CJ: [00:31:56] Um, no, I'm surprised it's not there. It should be. 

Aron: [00:32:01] Let's give it a, do you want to give it a look? Why, why we don't have it there? 

CJ: [00:32:05] Yeah, let's go. Let's actually, uh, yeah, let's go back to connected accounts and see what's going on here. So, Hmm. It is complete.

It should be in that dropdown list. 

Aron: [00:32:23] Ooh, this is where I put the jeopardy music 

CJ: [00:32:26] on. Yeah, yeah, yeah. Uh, let's try, let's go back to that payment link and say, uh, Yeah. So can we click on the three dots and say edit? I actually don't know if editing the, um, okay, so that's the product. Okay. So let's go back and try to find the payment link for this.

Aron: [00:32:49] Uh, I can get the payment link. Okay. Create 

CJ: [00:32:53] payment link or, uh, yeah. Okay. So then if we go to next, is this split the payment and it's not there, huh? It's not there. Why is that? Not. Well, 

Aron: [00:33:05] do I need to put a percentage? 

CJ: [00:33:08] No, it shouldn't be there. It should be in the dropdown. So we have that account is confirmed and it's active.

Aron: [00:33:14] Is it because I'm using I'm like in Canada? Is this because I'm like using the U S versus Canada? 

CJ: [00:33:20] Yeah. Can you, can you try typing? Just like see or yeah, try, let's try typing in the account ID. Maybe let's just start dropping the account ID there. Yeah. I'm not sure what's going on. 

Aron: [00:33:32] Uh, account ID. This is like, where?

Boom, let's come here.

No, it says no accounts found. 

CJ: [00:33:43] Hmm. Let's see. What's going on. Um, Hmm, 

Aron: [00:33:51] let me take it. This is, uh, a Canadian product. Cause they did have some issues of like, because I was in 

CJ: [00:33:56] Canada because I, my connected account is in the U S and your in Canada. So let's, um, Is the connected account that was created. The other one that was created is that one based in Canada.

Let's see in check. 

Aron: [00:34:10] Okay. This one though, it's also based in the U S 

CJ: [00:34:14] okay. So let's create a connected account based in Canada. Um, 

Aron: [00:34:21] do you want to do that in the backend? 

CJ: [00:34:22] Yeah. Yeah. 

Aron: [00:34:23] Yeah. So what I can continue while you're creating a Canadian account is actually go ahead and just copy the payment link as it is today with no.

And you can bring that into air table. 

CJ: [00:34:35] Yeah. So there's actually a couple of different ways you can split payment in the case where you're, you're splitting. When you create the payment link, that'll automatically give a portion to the connected account. Okay. The alternative is if you're accepting payment and then you need to pay out multiple sellers.

So for instance, if you were creating t-shirt or if you're selling t-shirts or something, right, you might want to pay the artists who created the design, you know, 30%, and then you want to. The, the, uh, the company who's making the t-shirts, you know, 50% or something, then you would create the payment link without the split.

And later on, you can come back and create payouts directly through the Stripe dashboard also. Okay, well, 

Aron: [00:35:12] let's do that. And in that case, let's, let's go through the flow and then at the end we can split, you know, manually. And then, you know, if anyone wants to create an, a Canadian account to see if that was the issue, how did you do that?

So let me bring in the payment link. So let me just create it. I don't think I ever created. Uh, so payment links, uh, I think two, I have it here. Shipping rates, products, iron create payment link, 20 bucks. Next let's not split the payment. Create the link. Yep. There it's go. Bring that back into items. Yep. And then let's copy paste over it.

CJ: [00:35:57] Yes. One limitation is that if you, if you are a platform that's based in the U S and you can connect to accounts in other countries, but if you're a platform that's based in other countries, you can only connect to accounts that are in those countries. So in test mode, we were able to create a connected account in a different country.

Uh, so, um, mine was based in the U S yours is based in Canada. So I think that might be the limitation we're running. Right. Okay. 

Aron: [00:36:21] Do you want to do, does anyone, uh, here I'll send it over. 

CJ: [00:36:24] Could you, could you drop a link to the create connected account and I'll create one real quickly? 

Aron: [00:36:29] Yeah, totally. And I can start working on the, on the web hook stuff.

So let me so connect to the accounts. 

CJ: [00:36:33] Yep. Connected accounts and then we'll say create yeah. And 

Aron: [00:36:39] this breasts. Yeah. And then I imagine, do I do it would have, I 

CJ: [00:36:43] can't, can you not select 

Aron: [00:36:46] Canada there? No, I can't. Could I do, uh, 

CJ: [00:36:50] Um, sure. Yeah. Let's do standards in Canada. And then yeah. Can you send that to me?

Aron: [00:36:56] Yeah. I'm going to send that to you. Okay. There you go. This is on live debugging folks. I love it. 

CJ: [00:37:02] This is great. There are a couple of limitations here around the countries. 

Aron: [00:37:06] Okay. So now, while you're doing that, I'm going to go ahead and kind of walk through where we are in the actual marketplace, and then we'll figure out the splitting in the last 10 minutes we have here.

So now I actually have, if I go back to this. Uh, URL right here. Yep. I'm hearing some echo here from you. See Jess, I'm gonna mute you for a second. Let me know. Okay. Uh, boom. So now if I go by this, I actually have payment information I can put in, right. Because we've inputted the Stripe, uh, URL. And, um, so what that means is I can actually take this payment.

So if I was to send this to him, They would be able to pay for that item. So the last step here is how do we go about and tie that payment to that item? Right. So how do we know that what was paid is this iron right here? So we can check off a sold and remove it from our marketplace. And then there's probably a bunch of other things we want to do, like pay out that person, uh, you know, arrange the shipment or the, the transaction.

Skip all of that for today. Just want to do is take that payment. Um, so yeah, so how we do that is there are web hooks. You can trigger, uh, from Stripe to air table to say that this payment link has been paid. Right? So someone had a transaction on that payment link. So how we do that if, and, and Colleen, if you could link to the, the, the one we did.

Uh, Joshua, which has like a much more detailed kind of step here. What I'm going to do is just go ahead and go developers. I want to create a web hook ad web hook, and then I need the end point. So where is Stripe going to send information to they're going to strain sends information to air table, so let's create a custom automation.

So it's going to be receive Stripe web hook when web hook received. I'm going to copy that URL over to Stripe. Boom. And this is when payment link is paid. Events is going to be payment. So checkout. So this is where CJ, I'm going to ask you to come back in. Is it invoice or payment completed? 

CJ: [00:39:31] We actually want to do checkout dot session dot completed here.

Yep. Got it. Perfect. Yep. Correct. 

Aron: [00:39:41] Okie dokes. So add endpoint. So this is the saying when any payment link is paid, go to a Sandy web hook to this. So let me actually, can I do a test? I think I can send test web hook, boom sent us web hook and it's saying, okay, this is the web. Boom. Let's receive it. Run test.

We've now received that web hook. Now the problem with this web hook is that it does not have like the Stripe, the test underscore 14 K six. It doesn't have that information in the web hook. It's just saying like, Hey, someone paid you, it doesn't necessarily have the information around the link itself.

But we can actually, with the session ID, be able to say, uh, uh, what was checked out. Right. So what information was, uh, which payment link was paid? We did that in the previous one. So I'm actually just gonna go ahead and copy paste the code. Hmm. Yep. And again, I'm happy this one, I'm happy to drop the link to this.

So folks who are like, oh, how would I do that? Let me just drop the link right there. I could have dropped that in there. So if you have any questions, I think it should be there. If the automation is not there, I copied it into this Stripe scripting right here. Right. So you're going to be able to copy paste that into automations.

Cause the automation script will not be shared. Cool. Okay. So let me copy paste that we're going to write a script. Let's make this full screen. Okay. CJ. This is where I need your help. 

CJ: [00:41:30] Yep. Okay. 

Aron: [00:41:32] I didn't, I didn't copy the whole thing.  I got to go to my clip. There we go. Okay. So, okay. We, as an input variable, we're gonna do session ID, correct?

Yup. Which comes from a step one and it is in, 

CJ: [00:41:54] I think it's the bottom, the, uh, or, yeah, data. Sorry, if you scroll down to data object. That ID. Yeah, the top one there. That 

Aron: [00:42:03] render. Okay. So we're going to call this session ID is the ID. Yup. Um, 

CJ: [00:42:11] yup. And then we have to go get your test API keys from the Stripe dashboard.

Aron: [00:42:15] Yup, yup, yup. Yup. There we go. Let's go into developers. It's the one with S K somewhere here, API keys, 

CJ: [00:42:25] API keys. And then we're going to reveal that test key. Copy. You don't want to reveal your, your live API keys cause they do give access to your, your actual Stripe account. 

Aron: [00:42:37] Yeah. Okay. So we're, we're copying that in the test and then there was something we needed to change.

No, actually, no, we w in this URL we're expanding to get the customer line items, but I think what we want is the payment link information. So 

CJ: [00:42:56] this is the, the other thing that we want to do. I think. In our items table instead of air table, I think we want to track the ID for the product. And then from those line items, we can come back and associate those with the product.

Aron: [00:43:10] Hmm. Let me, yeah, let me know in the chat, if my screen is blurry, I think that might just be, uh, someone's wifi. I think it's fine on my end. Uh, so to say that again, could we not from this session, be able to get this test, uh, payments. 

CJ: [00:43:28] Right. The payment link, like the, the payment link itself. There's no reference to the payment link, but the payment link, uh, is created with a product.

And so that product ID in the Stripe dashboard, I think we also want to copy that and 

Aron: [00:43:42] add that. Yeah, that makes sense. That makes sense. So there's a one-to-one relationship between product and payment link. So, oops. This is the wrong air table base. Uh, let's go into, uh, Stripe, let's go into product. And then the iron and there should be a product ID here right here, prod.

Yep. Right. Okay, great. So let's bring that into right here. So product ID, single line text, and then for the iron let's go ahead and put that in. Okay, great. Thanks for the update. It seems fine. Um, okay. And I've got it on the great, so this is what we're going to search and are we getting this from the URL?

By just putting expand line items so we should have it there. Right, right. 

CJ: [00:44:33] Okay, cool. Yep. So it should be in the line 

Aron: [00:44:35] items. Okay. Let's give this a, so this is with a test session, so I don't know what the line items are going to be, but we can do a live web hook with the payment. Yeah. 

CJ: [00:44:44] Let's do a live web book.

Cause I think the test might not have line items, so, 

Aron: [00:44:49] yeah. Okay. And where are we? Outputting checkout session. 

CJ: [00:44:53] I think it's online for we're console logging. 

Aron: [00:44:57] Okay. Cause it's a, it's a test session. So he can't find let's do a real run here where we actually do the payment. Yep. Uh, let's go to that. Boom.

Nice.

Aaron, at example.com 42, even I know this by now.

CJ: [00:45:26] Yeah, 1442 is one of our test cards.

Aron: [00:45:43] There we go. So it said the payment. So that means it's sent a web hook. Yep. And, uh, Web hooks.

So we have that one right there. And then if we look, we have the checkout session right here, and then I'm wondering whether I can bring it into as a new test again. And if it's going to bring in the latest one, let's hope that's the case. Yeah, 

CJ: [00:46:19] we got it. It looks like it. Yeah, that, that's a real, it's a real event.

Aron: [00:46:23] Yeah. So let's run this again. Okay. Okay. And what it's outputting is the session ID. Well, if we look at checkout session, do we have the product somewhere here? Yeah. 

CJ: [00:46:38] We should have line items now. Yep. So like right there, there, and then inside of data, Um, you 

Aron: [00:46:46] have data over here. I can't click into it. I have it right here, URL.

CJ: [00:46:50] Um, so that, uh, I'm surprised that we're not getting the products back. 

Aron: [00:46:56] Let me see if I can, uh, find record

items

condition. Let me just see what that looks like. Okay, sure. Right. Uh, I can go into items

where payment link contains. Let me see what dynamic, if I can bring in from step to checkout session. And then you said product. Or data first or so 

CJ: [00:47:39] line items, you said the line numbers there's data, and then it should have like the, yeah. That should be an array. And it has, um, 

Aron: [00:47:51] yeah. Yeah. So I have it right here.

I have iron currency, quantity and then ID. Um, 

CJ: [00:48:01] yeah, let's see what that looks 

Aron: [00:48:02] like. But it is an array. 

CJ: [00:48:05] Oh, it is. Okay. So that's line item. Let's keep going down a little bit. I think it should be, I have read 

Aron: [00:48:10] the description. I 

CJ: [00:48:11] could just use descriptions. Yeah. Or if I think price should have the, um, or is price prices, string ID.

Let's see. Continue. Yeah. So that I, okay, so we go down. Is there a product there? Oh 

Aron: [00:48:26] my God. 

CJ: [00:48:28] In front of there we go. Product. So that's the one. Okay. So 

Aron: [00:48:32] we need to, in the output of this script, this just turned into how to handle web hooks. Yeah. Uh, very quickly, which is totally cool. Okay. Welcome to automate all the things where we actually automate all the things.

Yes. Uh, okay. So what we're saying is that we shouldn't output checkout session. Could you remember how to get to that? So we're going to go into checkout session. Yup. Yup. And then dot. 

CJ: [00:49:01] Right. I think we want actually, you know what, I think we want checkout session. Can we output multiple things? Cause I think we want session and I think we want the account.

Well, no, actually, no. So in this case, because we're doing the multi-party where we're splitting it multiple ways, we won't have reference to that seller's ID, but you could also in this same web hook notification, if we were doing this related to a connected account, it would have the accounts ID. So we would want to output dot set the account ID in the checkout session, but because we're split.

Um, 

Aron: [00:49:30] well, wouldn't Stripe handle that I don't, I don't need, I don't need to track the splitting air 

CJ: [00:49:36] table because the product ID is going to be 

Aron: [00:49:38] unique also. Yeah. So let's just output one product ID. Yeah, totally. Uh, and then, so I have let checkout session, blah, blah, blah. And then what I want to output is checkout session dot where, so check-in session, and then you said go to price or.

Bring me back to where I found that idea. 

CJ: [00:50:00] Yeah. So checkout session, line items, uh, yep. Dot data. Okay. So yeah. So I think you can do in yeah. In JavaScript there, you can do dot line underscore items, um, dot 

Aron: [00:50:15] data the first. Yep. And then we said the price. Um, let's try it. We can console by luck 

CJ: [00:50:24] that yeah. Sure, sure.

Yeah. So con like oftentimes console, that log is the way to debug many of these things. Cause you can print them out and see puts you that value that you have there. 

Aron: [00:50:36] Let's do this. Let's test this.

Okay. Okay. Here we go. So we're here and we're saying dot product.

Boom. Let's test that again.

Okay. So now we have prod right here. That's the output. That's the right. And then if we come here, it's the product ID that's here. So now we can actually just find the record that has that product ID and market assault. Yep. You didn't believe there for a moment. We're going to get there. I saw that I saw your eyes there, but I'm very proud of you.

I'm proud of us. So we're going to call it. Product ID

and let's test that.

Great. So now let me actually just make sure console dot log actually. No, I don't need to, I don't need to see it. Boom. And here, if we search, so we want to say where product ID.

Is we're actually just contains just we're taking less risk dynamic, go to output from step two, an insert that product ID let's run the test. It should return one record. If all went well, there we go. And we return the one record. I can't see it, but I can see. Right. And then I could set update record.

From step in the items, go to step two records and I want record ID, just insert. And I want to update the sold to, I guess, true. I think I never updated. I think that should work. Let's try that or true or something like this. I don't know if it's gotta to be or one. No, I gotta update it to one. Let's try it.

Boom run test. There we go. And we've updated to salt. All right. Okay. Let's let's do it in live. And then if you've had time to create the connected account, we can try that as like a, uh, a wrap here, but I do want to do the whole flow. Let's turn on this, this automation right here. Done. Done. Done. Boom.

Let's go into Stripe. I imagine I can repay that Stripe payment. You bet it's been paid once. Yep. Boom.

Okay. Let's pay that. And if this works, it should send the web. That's going to find the record and it's going to pay market as paid.

Uh, this is where we wait. 

CJ: [00:53:59] Does it automatically update or do you have to refresh or anything? 

Aron: [00:54:02] No, it should. It should automatically let's do run 

CJ: [00:54:05] history. Okay. While we're oh, it failed to run where we 

Aron: [00:54:08] got.

Oh, no, no, that was, that was what we just ran the previous one. Yeah. Let me see what, uh, to deter. Oh, no, I was, I was really bullish that that was going to work web hooks.

Uh, I don't know what happened there.

What was my syntax 

CJ: [00:54:39] error? Hey, Steven, I'm asking if there's a way to pre-populate the fields in the payment. Um, the, the, the fields that you would fill in on the page that you land on, ultimately there, isn't a way to pre-populate those with payment links, there's another Stripe product called Stripe checkout, where you can, um, you can pass reference to a customer object and you can, pre-fill a couple of different things, but that does require implementing your own like checkout session.

Aron: [00:55:06] I know what happened. I had a stray parentheses stray prints. Okay. Classic, classic. Okay. Let me just. Whew. We're going to get that. We're going to get there bullish now. I'm very competent. Let's do that again. Okay.

Boom.

I imagine you've got like, 

CJ: [00:55:37] Lots of connected accounts. 

Aron: [00:55:40] No, no, no, no. Just like you can fill these out faster than anyone. Okay. So this now is going to go ahead and pay

and now we hold our breath to see if it worked. Can you, 

CJ: [00:55:53] oh, oh, nice. Boom. 

Aron: [00:55:56] For access. Amazing.  

CJ: [00:56:01] connected account again and send it to me. Uh, we need to, we need to have an express account. So I don't think we're going to get to it in Canada. Oh yeah. We're out of time, I guess. Yeah. 

Aron: [00:56:11] That's all right. That's all right.

So I hope coax. So you now have it sold. You can create an automation that says, you know, go out and pay out that person. So maybe where we end just a minute here is actually go into, I imagine if I had payments, right. So Jeff just paid me. How would I go about splitting that if I wanted to? 

CJ: [00:56:31] Yeah. So let's actually go to the payouts tab now on the left.

And so, um, this is I'm sorry, this is your, your payouts. Uh, let's go back to, um, transfers factor. Uh, yes. Um, sorry, this just moved around. Yeah, let's go to transfers and then create a new transfer and now, yeah. Uh, that's 

Aron: [00:56:56] where I would accounts. Yeah. That's where I would find your account. 

CJ: [00:57:01] Yes. Exactly.

Exactly. I wonder if it's because you're a CA is this account activated, like fully activated your, 

Aron: [00:57:07] this is a real, this is my real Stripe 

CJ: [00:57:09] account. Okay. Huh? Yeah. I wonder what's going on. That's okay. 

Aron: [00:57:13] Well, hopefully folks got an intro into checkout, uh, and we'll do you, I'd love to do in the future, CJ, like a more, uh, uh, uh, a more detailed look into web hooks.

Yeah, absolutely. Yeah. So I think we went a little quickly there for on a lot of things on building the marketplace on doing the web hook on doing the connected accounts. We bit off, a little more than we can choose. So I appreciate all of your patients. Hopefully everyone learned a thing or two, uh, Penny's going to be watching the stream again.

I'll probably rewatch the stream as well. I feel like CJ was guiding me through a lot of that. Uh, but yeah, CJ, huge. Thanks for coming on. Automate all the things was a real joy. Uh, you know, that one was, uh, uh, a little bit of work and thanks to you, everyone, uh, for joining Colleen, Kyle, uh, Steven, I hope to see you next week.

We're going to be back with Connor from no code talk where we're going to, you know, highlight some no-code project, answer your questions and yeah, a huge, thanks again, CJ for joining and we'll have to do it again sometime. 

CJ: [00:58:19] Absolutely. Yeah. Great time. Hope everyone enjoyed, uh, taking a look at connect and.

All right. 

Aron: [00:58:26] Bye everyone. 

See ya. Okay.

Key takeaways

Similar streams