Sylius
Accept payments through MONEI in your Sylius store using the official MONEI Payment Plugin. The plugin supports Cards (Visa, Mastercard, Amex), Bizum, Apple Pay, and Google Pay with two integration modes — hosted payment page or embedded payment component.
Features
- Two integration modes — Hosted Payment Page (redirect) or Embedded MONEI Component (JS widget), configurable per gateway in the Sylius admin
- All MONEI payment methods — Cards, Bizum, Apple Pay, Google Pay
- Full lifecycle support — , Refund (full and partial), Cancel, and Status sync
- Webhook-driven — Asynchronous payment status updates via signed MONEI webhooks
- / ready — 3D Secure handled automatically by MONEI
Requirements
| Dependency | Version |
|---|---|
| PHP | 8.2+ |
| Sylius | 2.1+ |
| Symfony | 6.4 or 7.x |
Before you begin
To test your integration:
- Use your test mode API Key. You can find it in MONEI Dashboard → Settings → API Access.
- You can check the status of a test payment in your MONEI Dashboard → Payments (in test mode).
- See MONEI test cards for test card numbers and Bizum phone numbers.
Install
Step 1: Install via Composer
composer require monei/sylius-monei-plugin
Step 2: Register the bundle
If your Sylius project doesn't use Symfony Flex, add the bundle manually:
// config/bundles.php
return [
// ...
Monei\SyliusPlugin\MoneiSyliusPlugin::class => ['all' => true],
];
Step 3: Import plugin routes
# config/routes/monei.yaml
monei_sylius:
resource: '@MoneiSyliusPlugin/config/routes.xml'
prefix: /monei
note
Payum handles the webhook notify route automatically — no additional route config is needed for basic operation.
Configure
- In your Sylius admin, go to Configuration → Payment methods
- Click Create and choose MONEI as the gateway
- Fill in your API Key and Account ID — find these at MONEI Dashboard → Settings → API Access
- Select your preferred Integration Type:
- Redirect — Customer is redirected to MONEI's PCI-compliant hosted payment page
- Component — An in-page payment form is rendered using MONEI.js (card input, Bizum, Apple Pay, Google Pay buttons)
- Toggle Sandbox mode for testing
- Assign the payment method to your desired channels
Configuration reference
| Field | Description |
|---|---|
api_key | Your MONEI API key (pk_test_... for sandbox, pk_live_... for production) |
account_id | Your MONEI account identifier |
integration_type | redirect (hosted page) or component (embedded MONEI.js widget) |
sandbox | Enable test mode — no real charges are processed |
How it works
Redirect flow (Hosted Payment Page)
- Customer clicks "Pay" → Sylius creates a MONEI payment via the API
- Customer is redirected to MONEI's hosted page
- Customer completes payment (card, Bizum, Apple Pay, Google Pay)
- MONEI redirects back to your store's completion URL
- MONEI sends a webhook to confirm the final status asynchronously
Component flow (Embedded MONEI.js)
- Customer clicks "Pay" → Sylius creates a MONEI payment via the API
- An in-page payment form is rendered with card input, Bizum, Apple Pay, and Google Pay
- Customer completes payment without leaving the page
- Customer is redirected to the order confirmation page
- MONEI sends a webhook to confirm the final status asynchronously
Webhooks
MONEI uses webhooks to notify your store of payment status changes. The plugin automatically verifies the MONEI-Signature header (-SHA256) and re-fetches the payment from MONEI's API to prevent spoofing.
Ensure your server is accessible from the internet so MONEI can reach the .
Before you go live
- Make sure that you are using live (production) mode API Key.
- Make sure that you have at least one active payment method.
Links
Was this page helpful?