The Nuvei plugin for Magento 2 supports rebilling via a credit card.
Setting Up a Plan
The merchant can use two approaches to apply rebilling plan on their products:
- Rebilling via Predefined Plans from the Control Panel
- Rebilling with a Default Plan and Dynamic Details
Predefined Plans from Control Panel
If you use this approach, the merchant must log in to the Control Panel and create a plan for each product with rebilling.
- Go to Operations > Recurring > Plans menu.
- Press New Plan and enter the plan details and press Save.
- To access the plans in the plugin, go to the end of Nuvei plugin settings and press Collect Plans to download the plans information.
If some of the plans were removed from the Control Panel, they are removed from plugin collection too.
Default Plan and Dynamic Details
To use Rebilling functionality in Nuvei plugin, a specific Product Attribute must be created. It is created by default if you use Nuvei Checkout Plugin. To check for this attribute, in the Magento dashboard, go to Stores > Attributes > Product.
In the list, search for nuvei_payment_plan. If this attribute does not exist, create it. It must be of type “drop-down” and its Scope (Advanced Attribute Properties) must be Global.
You can set other options as you wish.
To use the Default plan, the merchant does not need to do anything in the Control Panel. The plan is created during the downloading of plans.
- Instead, the merchant only needs to open their product details, go to the end, and expand Nuvei Subscription group:
- If the merchant does not have active plans yet, a default plan is generated.
The name pattern is: Default_plan_for_site_merchantSiteId.
If there are other plans, they are listed in the select menu. You can select any of the plans and its data is populated in the below settings, which can then be modified.
Do not forget to set Enable Subscription option to Yes!
The settings here are almost the same as in the Control Panel. Here the Initial amount is missing because the product price is used. - After you set all data, save the product. It includes a Nuvei subscription plan.
Creating Products with Plans
If you want a single product with a plan, you can follow the approach above. But if you want a product with different plans, there are a few options.
Using Simple Products
- Using simple products is good if you have only a few options for the plans and don’t mind seeing these options as different products in the store.
- Each product may have different price, name, SKU, and subscription details.
The client can select them using the Add to Cart button. - For a better user experience, add a description of the plan in the Content area.
- The Plan details in the store:
Using Configurable Products
- Select the desired attribute and follow the steps on the screen.
- Select attribute values.
- At the end of the process, you see a few new products. At this step is very important to set products Quantity! In some versions of Magento , the products are not shows in the Store if you don’t set it here.
- Save the main product, so the selected attributes can be added to the child products.
- Go back to the Products list and search for the new child product; you see the main and the child products.
- Open the new products one by one and set the desired Nuvei Subscription settings according to the new added attribute (Nuvei Subscription Option in this case).
- Now you can go to the Store and search for your new product:
- When you try to add the product to the Cart or press it, you are sent to the Product page to select a Nuvei Subscription Option:
- In our case, Plan 1 has no Subscription Plan.
If you choose Plan 2, a small table with Subscription details is displayed:
- After selecting the options, you can add the product to the Cart.
- If the client has an account in the store, they can get a list of the orders with subscriptions from the My Account > Nuvei Subscriptions menu.