Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Overview
Versioning
Changelog
Upgrade your API version
Upgrade your SDK version
Developer tools
SDKs
API
Testing
Workbench
Event Destinations
Workflows
Stripe CLI
Stripe Shell
Developers Dashboard
Agent toolkit
Stripe health alertsBuilding with LLMsStripe for Visual Studio CodeFile uploads
Security
Security
Extend Stripe
Stripe Apps
Stripe Connectors
    Overview
    Integrate a connector
    Commercetools
    Adobe Commerce
      Payments and tax connector for Adobe Commerce
      Standalone tax connector for Adobe Commerce
      Cookbooks
        Add additional metadata to payments
        Hide the terms displayed in the PaymentElement form
        Place an order before a 3D Secure payment is collected
        Style the payment form at the checkout
        Test why a specific payment method doesn't appear
        Integrate a custom fee to the tax calculation
        Enable manual capture
        Enable multicapture
        Enable overcapture
        Add external payment methods to the payment form
        Disable shipping methods in the Express Checkout modals
        Add custom events to Stripe webhooks
    Mirakl
    NetSuite
    Oracle Opera
    Cegid
    PrestaShop
    Salesforce
    SAP
    Shopware 6
    Stripe Tax for WooCommerce
    Stripe Tax for BigCommerce
    Partner connectors
    Build your own connector
Partners
Partner ecosystem
Partner certification
HomeDeveloper toolsStripe ConnectorsAdobe CommerceCookbooks

Enable manual capture

Allow separate authorization and capture for eligible Stripe payment methods.

Copy page

Stripe supports manual capture for some payment method types. You can configure this behavior in the application settings page by setting the Payment Action property of an eligible payment method to Authorize Only.

Typically, enabling manual capture for a newly launched payment method that supports it requires upgrading your Stripe module. This guide instructs you how to enable manual capture for eligible payment methods without upgrading the Stripe module by updating the payment method helper file directly.

Create a new module

Create a new module with the following directory structure. Replace Vendor with your preferred vendor name.

app/code/Vendor/StripeCustomizations/ ├── etc/ │ ├── module.xml │ └── di.xml ├── Plugin/ │ └── Helper/ │ └── PaymentMethodPlugin.php ├── registration.php

Inside registration.php, register your module with Magento.

<?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Vendor_StripeCustomizations', __DIR__ );

Inside etc/module.xml, define the module and set up dependencies to make sure it loads after the Stripe module.

<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <module name="Vendor_StripeCustomizations" setup_version="1.0.0"> <sequence> <module name="StripeIntegration_Payments"/> </sequence> </module> </config>

Inside etc/di.xml, define the following plugin:

<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="StripeIntegration\Payments\Helper\PaymentMethod"> <plugin name="vendor_stripecustomizations_helper_paymentmethod_plugin" type="Vendor\StripeCustomizations\Plugin\Helper\PaymentMethodPlugin" sortOrder="10" disabled="false" /> </type> </config>

Inside Plugin/Helper/PaymentMethodPlugin.php, create the an afterMethod interceptor:

<?php namespace Vendor\Module\Plugin; class PaymentMethodPlugin { public function afterGetPaymentMethodsThatCanCaptureManually( \StripeIntegration\Payments\Helper\PaymentMethod $subject, $result ) { // Modify or extend the result to include another payment method code that supports manual capture. $result[] = 'new_payment_method_code'; return $result; } }

Enable the module:

php bin/magento module:enable Vendor_StripeCustomizations php bin/magento setup:upgrade php bin/magento cache:clean php bin/magento cache:flush
Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access program.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc