Shopware plugin
Accept cards, wallets, and local payment methods in a Shopware 6 shop with the Pay.com Payments plugin.
Pay.com Payments for Shopware 6 adds Pay.com as a payment method at the Storefront's checkout, and to headless storefronts through the Store API. Customers pay with the cards, wallets, and local payment methods your Pay.com account offers, in a payment form rendered in Pay.com-hosted frames.
Shopware creates and validates the order before any payment is taken, and the shop confirms every payment with Pay.com on its server before it marks the order's transaction paid.
To install the plugin and connect it to your Pay.com account, see Set up the Shopware plugin. Every setting and its default is in Settings.
Supported features
The plugin supports these checkout and order management features.
| Feature | Description |
|---|---|
| Checkout | Cards, wallets, and local payment methods on the confirm page. By default, the card is entered in secure fields styled like your theme's inputs, and each payment method is a Shopware payment method of its own. See Checkout settings. |
| Paying an open order | A failed payment keeps the order. The customer pays it again from the confirm page, or later from Complete payment on the order in their account. |
| Capture | Capture when the order is paid, or authorize at checkout and capture later with Capture on the order's Pay.com card, or when the order's delivery is shipped. |
| Refunds | Refund from the order's Pay.com card, or through Shopware's own refund API, which return management uses, in full or in part. Refunds made in the Pay.com dashboard reach the order. Cancel authorization, or canceling an order that is only authorized, releases the authorization. |
| Payment review | A payment that doesn't match its order leaves the transaction Unconfirmed. Accept payment on the order's Pay.com card takes it as it is, and Deny payment refunds the payment. |
| Express checkout | Apple Pay and Google Pay buttons on product pages, the cart page, the off-canvas cart, and the top of the checkout. Customers pay without filling in the checkout, and Shopware still creates and validates the order first. A product page button buys what the page's buy form picked and leaves the cart as it was. |
| Saved cards | Customers with an account can save a card when they pay in Pay.com's Universal checkout, pay with it later, and add or delete cards under Saved cards in their account. With card fields, the default, there's no option to save a card at checkout. Pay.com keeps the card. The shop keeps only its brand, last four digits, and expiration date. |
| Apple Pay domain | The Storefront serves Apple's domain association file, and the plugin registers each sales channel domain with Apple through Pay.com. |
| Sales channels | One Pay.com account for all sales channels, or one per sales channel. |
| Headless storefronts | Shopware Frontends and other composable frontends take payments through the plugin's Store API routes. See Store API. |
How orders stay in sync
The shop confirms each payment with Pay.com on its server. Webhooks, and a background check every 15 minutes in Shopware's scheduled tasks, reconcile payments when a customer closes the browser before returning to your store.
| Pay.com outcome | Order transaction |
|---|---|
| Paid | Paid. |
| Authorized (manual capture) | Authorized. Capture it from the order's Pay.com card before the authorization expires, or when its delivery ships. |
| Funds pending, for example a bank debit | In Progress until the funds clear, then Paid, or Failed if they don't. |
| Failed | Failed. The order stays, so the customer can pay it again. |
| Requires manual review | Unconfirmed, with a note saying why. A paid order whose charge is disputed goes to Chargeback. |
A refund sets the transaction to Refunded or Refunded (partially). A payment that completes after its transaction failed or was canceled reopens the transaction, unless the order itself was canceled. In that case, the payment is refunded, or its authorization released.
The plugin subscribes to the 12 shared plugin webhook events.
Apple Pay
The Apple Pay button shows only on a domain registered with Apple. Under Apple Pay domain on the plugin's settings page, pick the sales channel and click Register domain for each environment. The shop sends its domain to Pay.com, and Pay.com asks Apple to check the domain association file that the Storefront serves. The shop must be on HTTPS at the root of its domain.
Store API
For Shopware Frontends and other composable frontends, the plugin adds Store API routes, called with the Store API's context token and access key:
| Route | What it does |
|---|---|
POST /store-api/pay-com/session | The cart's payment session, to render Pay.com's payment form on, with the URL of Pay.com.js, the payment form, the Pay.com payment methods the checkout shows, and the customer's saved cards. |
POST /store-api/pay-com/attach | Called after Shopware's POST /store-api/checkout/order to bind the session to the order's exact total, return a new session if needed, or report that the order is already paid. |
POST /store-api/pay-com/status | Called on the frontend's return page with the return URL's t parameter to confirm the payment with Pay.com and return the order status. |
GET /store-api/pay-com/saved-cards, DELETE /store-api/pay-com/saved-cards/{id}, POST /store-api/pay-com/saved-cards/setup, and POST /store-api/pay-com/saved-cards/save | Lists, deletes, and adds saved cards for a signed-in customer. |
POST /store-api/pay-com/express/start, /quote, and /order | Express checkout for the cart, priced with Shopware's cart calculation. |
Shopware's /store-api/payment-method lists every active Pay.com payment method of the sales channel. Show only those the session's methods lists, and hide those the session doesn't offer. A saved card pays only with the card's payment method.
Set Headless return page to the frontend's page customers come back to after paying.
Data the plugin sends
The plugin communicates with Pay.com in three ways:
- The checkout page loads Pay.com.js from
https://js.pay.com/v1. Card details are entered in Pay.com frames and sent only to Pay.com. - The shop's server calls the Pay.com API (
https://api.pay.com/v1, orhttps://api.sandbox.pay.com/v1for the sandbox) to create payment sessions, to confirm, capture, and refund payments, to manage saved cards, and to read your account's payment methods. - For Apple Pay, the shop downloads Apple's domain association file from Pay.com at most once a day, and sends its domain to the Pay.com API when an administrator clicks Register domain.