NoStripe - product : what is price?

default discord avatar
marek.kuticka
3 months ago
12

Good evening everyone.


If I want the product to have e.g. description, and image and price.. Where a d how do I define it? Maybe a product has even some special discount price for next 2 weeks. How is this handled?



And how would this be handled, if those were data defined in backend, and Payload should "just" display them? (and still I wanna decide in Payload, Who can see the price, i.e. based on role.. Etc)



Thx a lot

  • discord user avatar
    jacobsfletch
    Payload Team
    3 months ago

    Hey @marek.kuticka did you start with the e-commerce template? Typically, we try and save that type of data in your payment processor like Stripe. So you will use the Stripe dashboard to manage things like special pricing and discounts, and Payload will simply proxy Stripe's data.

  • default discord avatar
    marek.kuticka
    3 months ago

    Ok, got it. For certain reasons, I need to try the option, where product data is completely managed in-house

  • discord user avatar
    jacobsfletch
    Payload Team
    3 months ago

    Ok there will certainly be limitations with doing this, at least with Stripe. This is because creating a "price" in Stripe relies on more than one data point or because Stripe might use conditional logic on its price creator, for instance. The rule of thumb here for us has been to

    avoid recreating the Stripe dashboard in Payload.

    It sounds like you might have to break this rule, though. It's entirely possible, you'd just need to build it out.

  • default discord avatar
    marek.kuticka
    3 months ago

    So this means that Payload is strictly bound to stripe. And, it IS almost not possible to run it without. I'd almost say that it's a pity, as, at least imho, Payload could well be used for enterprise grade systems too.



    Then it would however mean, that data structure is maintained in backend

  • discord user avatar
    jacobsfletch
    Payload Team
    3 months ago

    The e-commerce template is designed to be used with Stripe, but Payload in no way is "bound" to any service, it's up to you to build your application within the requirements of your project, which

    does not

    have to include Stripe

  • default discord avatar
    marek.kuticka
    3 months ago

    yes, we can agree on this



    then.. probably also the documentation should be corrected accordingly, to make it more than clear, that Stripe is mandatory part in integrations for e-commerce template, as without Stripe, most of the functionality will be unavailable

  • discord user avatar
    jacobsfletch
    Payload Team
    3 months ago

    Totally! I would be up for making this explicitly clear in the docs. Would you mind opening a ticket in that repo (

    https://github.com/payloadcms/template-ecommerce

    ) so we can make that happen?



    At some point you will need a payment processor, though, and Stripe is exceptionally good at this

  • default discord avatar
    marek.kuticka
    3 months ago

    nope, go ahead. or I can create this



    ofc, once payment processing is necessary, Stripe might be very good at this, but there are usecases, when products have much more complicated structure

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

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