ENATIV Logo
ENATIV
Back
© 2026 ENATIV
ProjectsServicesKnowledge hubContact
contact@enativ.pl
  1. Knowledge hub
  2. ›
  3. Integrations
  4. ›
  5. Stripe

Stripe

Online payments in a store and an app: choosing the flow, webhooks, idempotency and subscriptions.

IntegrationsUsing since 2022 · Featured project: CAS Marketplace (in the Code & Pepper team)

Category
Integrations
Using since
2022
Featured project
CAS Marketplacein the Code & Pepper team

In practice

I pick Stripe for online payments when a store or an app takes one-off payments or subscriptions and should not build that from scratch. In the Code & Pepper team I worked with it on Gaia Lens, for subscriptions, and on CAS Marketplace, for marketplace payments.

What is Stripe?

Stripe is an online payments service with a public API, plugged into a store or an app. One-off payments and subscriptions run through a payment page, a form embedded in your app or a custom layout built from Elements components, and on the server you create a payment session or a PaymentIntent object.

The app learns the outcome of a payment from webhooks: Stripe sends events to your HTTPS address, for example when a bank confirms a payment or a customer disputes a charge, or a recurring payment succeeds. Retried requests are protected with an idempotency key, so an operation is not carried out twice.

How I work with Stripe

I start from what happens when a payment fails, not from the "Pay" button. Stripe handles the payment, but the order, the invoice and access to the product live in your app and have to agree with the state in Stripe.

  1. The payment flow

    I choose between a Stripe payment page, an embedded form and a custom layout with Elements, and I ask who will maintain it after launch. The full payment page needs the least upkeep and Elements the most.

  2. Webhooks and retries

    I change an order's state from webhooks, not from the customer merely returning to the site, and I protect requests with an idempotency key. Otherwise a customer pays and the order stays unpaid, or the other way round. A repeated event must not close an order twice.

  3. A payment that fails

    I check what the customer sees and what happens to the order when a bank declines a card or asks for extra authentication. The compensating steps for a failed payment are in the entry on Medusa.js.

When it fits, and when it doesn't

Stripe fits where a payment should be a ready-made process, not a project of its own that you have to write and maintain.

A good fit when

  • Your own store or a marketplace that takes online payments from customers by several payment methods.
  • An app with subscriptions where recurring payments should lead to invoices and statuses.
  • A team that prefers a ready payment flow to its own card form.
  • A project where orders move on events instead of on redirects.

Not a fit when

  • Sales where customers pay only by a traditional bank transfer or on delivery.
  • A company that has to use a payment provider imposed by its bank or a partner, and cannot change that.
  • A project with nobody to handle refunds and disputes on the business side.

When a Polish provider matters, for example Przelewy24, I look at it next to Stripe and compare the two on the payment methods your customers want.

Frequently asked questions

The charges Stripe makes on transactions, plus the work on the integration and the hosting. Stripe publishes its own rates on its site and they may change, so I do not quote them here. We work out the total together, based on what you sell and how customers pay.
Yes. Stripe creates invoices for a subscription and tracks its status, including the attempts to collect payment. On Gaia Lens Stripe covers subscriptions and online payments. I receive status changes through webhooks.
From a webhook, not from the customer merely coming back to the site, since they may close the tab right after paying. Stripe sends an event to your HTTPS address and the app updates the order. An event can arrive twice, so the code has to cope with that, and I write every integration that way.
It is not impossible, but it needs a plan: customers and subscriptions sit in Stripe, so moving them is a separate task. That is why I keep the order logic in the app and treat Stripe as a payment layer. A switch then touches a smaller part of the code.

On this page

  • In practice
  • What is Stripe?
  • How I work with Stripe
  • When it fits, and when it doesn't
  • Frequently asked questions

Related topics

  • Stripe
  • Medusa.js
  • Multi-vendor marketplace
  • Shopify
  • Next.js

Related services

  • E-CommerceHeadless Shopify, Medusa.js, and custom storefronts with Stripe.
  • Landing PagesHigh-converting landing pages optimized for marketing campaigns.

Planning a store or an app with online payments?

Tell me what you sell, how customers should pay and where orders land today. I will say whether a Stripe payment page is enough or you need your own order and subscription logic.

Describe your projectSee CAS Marketplace