WordPress and WooCommerce
The official plugin adds Cartflox as a payment method in your WooCommerce store. Five minutes, no code, and everything is configured from WooCommerce.
Download cartflox-payment.zipOfficial plugin, version 4.0.0. WordPress 6.2+, WooCommerce 7.6+, PHP 7.4+.
Installation
Section titled “Installation”- WordPress: Plugins, Add New, Upload Plugin. Choose the
.zipfile, Install Now, then Activate. - WooCommerce: Settings, Payments, Cartflox, Manage.
- Paste your secret key
af_live_sec_...(Cartflox dashboard, API and Logs section). It works for a Cartflox workspace as well as for a Cartflox Connect workspace. - Save. The plugin verifies the key and registers your store’s webhook address in Cartflox by itself. The “Connection status” panel tells you where you stand, and the “Test connection” button confirms it at any time.
What the plugin does
Section titled “What the plugin does”- When the order is placed, creates a Cartflox session and sends the customer to the payment page (Mobile Money, cards). The customer then returns to your store.
- Receives the signed webhook (HMAC-SHA256 verified with your secret key, timestamp checked) and marks the order as “paid”, with no action from the customer.
- When the customer returns, checks the session status if the webhook has not arrived yet; the thank-you page updates on its own while the confirmation is pending.
- Every 5 minutes, checks orders still pending (24 h): a safety net if the webhook cannot reach you.
- Checks that the amount and currency received match the order; otherwise the order goes “on hold” with an explanatory note.
- On each order, a Cartflox box: payment status, operator, reference, “Check now” button, link to the transaction in Cartflox.
- Compatible with the classic and block-based checkout, and with HPOS order storage.
Settings
Section titled “Settings”| Section | What you configure |
|---|---|
| Cartflox connection | Enable, secret key, connection status, test |
| Checkout display | Title, description, displayed logos (Orange Money, Wave, MTN MoMo, Moov Money, cards, M-Pesa, Airtel Money, Free Money, T-Money) and their size, order button text, message on the thank-you page |
| Payment flow | Prefilling of the name, email and phone number, session label ({numero}, {boutique}, {client}, {total} variables), return address after payment, return after abandonment |
| Orders | Status while awaiting payment, status once paid, automatic check, automatic cancellation after a delay, Cartflox reference in emails |
| Fees and limits | Fixed or percentage fees when the customer chooses Cartflox, minimum and maximum amount, accepted currencies |
| Advanced | Automatic webhook registration, detailed log, API address |
Amounts
Section titled “Amounts”Cartflox expects integer amounts: decimal currencies (USD, EUR, GHS…) are rounded to the unit. For XOF and XAF, nothing changes. The customer’s phone number is converted to international format based on their billing country.
For developers
Section titled “For developers”cartflox_session_donnees( $donnees, $order )filter: modify the data sent to Cartflox before the session is created.cartflox_montant_frais( $montant, $cart )filter: compute the payment fees yourself.cartflox_paiement_confirme( $order, $data )action: fired as soon as a payment is confirmed.- Log: WooCommerce, Status, Logs,
cartfloxsource.