a payment service provider (psp) moves the money. stripe, adyen, mollie, paypal and przelewy24 all offer a drop-in pay button, and the demo works in an afternoon. the real integration is everything around that button: what happens when the customer closes the tab, when a refund is partial, when the bank wants extra authentication, or when finance asks which payout covers which orders.
authorization, capture and the order state
payments have steps. authorization checks the funds and holds them. capture takes them. some businesses capture at once, others at shipment, which matters for pre-orders and made-to-order goods. decide this early, because it changes your order statuses, your refund logic and what the customer sees on their statement.
define the order states in writing: created, awaiting payment, paid, failed, cancelled, refunded. every state needs an owner, meaning the system that is allowed to change it.
the order is paid when the webhook says so
customers get redirected, close browsers and lose signal. the redirect back to your shop is a hint. the provider's server-to-server webhook is the source of truth. build the order flow so that "paid" is set by the webhook, and the thank-you page only reads the state.
treat webhooks as unreliable messengers. verify the signature. acknowledge fast and process in a queue. expect the same event twice and events out of order. make your handler idempotent, so processing an event a second time changes nothing. providers document all of this; the common failure is that nobody on the project reads that page.
refunds, partial refunds and chargebacks
refunds are the feature most often left for the end. plan for full and partial refunds, refunds of orders paid with different methods, and the delay before money reaches the customer. decide who can trigger a refund: support in the shop admin, or finance in the psp dashboard. if both can, you need a sync so the order state is never wrong.
chargebacks are disputes opened through the card network. know where the notification lands and who answers it, with what evidence, inside the deadline the provider sets.
strong customer authentication and local methods
in europe, many card payments require strong customer authentication, usually 3d secure, which sends the customer to their bank for approval. your flow must survive that extra step, including customers who abandon it. test it with the provider's test cards, not just the happy path.
payment methods are local. cards are not enough in every market: blik and bank transfers matter in poland, ideal in the netherlands. check which methods your psp supports in your countries before you pick it.
reconciliation and compliance
finance does not see orders, it sees payouts. make sure every payout can be matched to orders, fees and refunds, with identifiers that exist in both the shop and the psp reports. ask for a sample settlement report in the first week, not after launch.
on compliance, using hosted payment fields or a redirect keeps card numbers off your servers and typically reduces your pci dss scope. confirm your exact obligations with your provider and your acquirer.
example tools and docs
- stripe webhooks documentation ↗ - signatures, retries and event handling
- stripe idempotent requests ↗ - how to make payment api calls safe to retry
- stripe refunds ↗ - full and partial refunds and their timing
- adyen webhooks ↗ - notifications for enterprise payment flows
- przelewy24 developer docs ↗ - polish bank transfers and local methods
- mollie documentation ↗ - european payment methods behind one api
- pci security standards council ↗ - the pci dss standard itself