mohan-devstack / magento2-paypal-rest-checkout
Standalone PayPal REST Orders v2 payment integration for Magento 2. No Magento_Paypal or SOAP/NVP dependency. Server-side redirect checkout with capture, refund, and admin transaction support.
Package info
github.com/mohan-devstack/magento2-paypal-rest-checkout
Type:magento2-module
pkg:composer/mohan-devstack/magento2-paypal-rest-checkout
Requires
- php: ~8.1.0||~8.2.0||~8.3.0||~8.4.0||~8.5.0
- magento/framework: ^103.0
- magento/module-checkout: ^100.4
- magento/module-payment: ^100.4
- magento/module-sales: ^103.0
- magento/module-store: ^101.1
README
A standalone PayPal REST Orders v2 payment module for Magento 2. Uses only the modern REST API — no dependency on Magento_Paypal, SOAP, or the deprecated NVP/SOAP stack that PayPal is retiring.
Features
- PayPal REST Orders v2 API (
/v2/checkout/orders) - Server-side redirect checkout flow — no JS SDK required
- Automatic invoice generation on successful capture
- Online refunds (full and partial) via credit memo
- Admin transaction detail page with PayPal capture information
- Sandbox / Live toggle in admin config
- No
Magento_Paypaldependency
Requirements
- Magento 2.4.4 or later
- PHP 8.1 or later
- PayPal REST API credentials (Client ID + Secret from developer.paypal.com)
Installation
Via Composer (recommended)
composer require mohan/magento2-paypal-rest-checkout php bin/magento module:enable Mohan_PaypalRest php bin/magento setup:upgrade php bin/magento cache:clean
Manual
- Copy the module to
app/code/Mohan/PaypalRest/ - Run:
php bin/magento module:enable Mohan_PaypalRest php bin/magento setup:upgrade php bin/magento cache:clean
Configuration
Stores > Configuration > Mohan > PayPal REST Checkout
| Field | Description |
|---|---|
| Enabled | Enable/disable the payment method |
| Payment Title | Label shown at checkout (default: "PayPal") |
| Sort Order | Position in the payment method list |
| Payment from Applicable Countries | Restrict to specific countries |
| Use Sandbox | Enable for testing; disable for production |
| Client ID | From developer.paypal.com REST app |
| Client Secret | From developer.paypal.com REST app |
Checkout Flow
- Customer selects PayPal at checkout and clicks Place Order
- Magento creates the order in
pending_paymentstate - Module creates a PayPal Orders v2 order and redirects the customer to PayPal
- Customer approves on PayPal and is returned to the store
- Module captures the payment, generates an invoice, and moves the order to
processing - Order confirmation email is sent
Refunds
Full and partial refunds are processed via Sales > Orders > Credit Memo in the Magento admin. The module calls /v2/payments/captures/{id}/refund on PayPal automatically.
Support
- Email: mohandevstack@gmail.com