Payload CMS with e-commerce?

default discord avatar
taun2160last year
9

Hi. Anyone created an e-comm website with Payload CMS? Care to share your experience? Generally, the feedback regarding headless CMS and ecomm seems to be "Use a dedicated e-commerce platform, like Shopify, rather than hacking it together with a headless CMS that doesn't support everything you need." Shopify and similar platform seem to get expensive real quick, so using Payload will be ideal if it's not too tricky.

  • default discord avatar
    paulpopuslast year

    Yes! We've done that. I think I would still recommend headless Shopify for a majority of simple ecommerce sites



    There's a lot you need to do by yourself in payload like variants support and all of that data structure which is then tied into Stripe



    lmk if you have any specific questions but a brain dump from me:


    - get your login/auth implemented early


    - get a full end to end check out process working asap


    - find a solution for shipping and taxes (if applicable) sooner than later


    - if you use stripe and only stripe it's pretty easy to build a custom checkout with their elements, I would recommend just using their portal though for even more simplicity


    - otherwise be sure ahead of time that other payment processors are not needed, in our case we had to rewrite checkout


    - the stripe plugin for payload should be only used for the proxy client imo...skip the sync and stuff and just handle that on your own via hooks

  • default discord avatar
    taun2160last year

    Thanks Paul for the solid feedback and insight. It sounds like Stripe has provided a lot of infrastructure to leverage, I'll look into that.



    @Paul I'd like to learn more about integrating Stripe subscription recuring payment model with Payload and Nextjs. Do you have any tips/code to share?

  • default discord avatar
    paulpopuslast year

    We didn't have a subscription model so can't say for sure but from what I've read in their docs



    its largely the same, except youre initiating a different type of payment



    and then you just have endpoints in payload that receive webhooks from stripe to handle these events



    so when a subscription renews you will know about it and if it expires you can change a user's permissions in payload and trigger a reminder or something

  • default discord avatar
    taun2160last year

    @Paul Have you used the Payload e-commerce template, or did you create all of that logic from scratch? If you did use that template, can you recall what challenges you faced? Were you using Stripe and their portal?

  • default discord avatar
    paulpopuslast year

    Our project was before the template existed, we did use the plugin and we quickly came up with issues with the provided sync (it's not enough as it lacks conditional values) so we had to manually sync anyway, we used the stripe elements but I wish we went the portal route instead due to simplicity



    I'll recommend portal route every time unless there's very good reasons for a custom checkout page

  • default discord avatar
    taun2160last year

    Nice. By portal you're saying the user is directed to the Stripe website to perform Stripe related tasks securely and reliably, like checking-out, refunding etc and upon completion they're redirected to your website via web hooks?

  • default discord avatar
    paulpopuslast year

    Yes

  • default discord avatar
    taun2160last year

    Rather than embedding and having the form within my website? Like this?

    https://youtu.be/0T8PcO6WDnE?t=1031


    image.png
  • default discord avatar
    paulpopuslast year

    yes



    its quicker to implement and if youre doing it on your own you're basically doing the exact same thing



    so unless you really need a custom checkout, i'd avoid it

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.