{"id":1958,"date":"2021-05-27T14:44:47","date_gmt":"2021-05-27T14:44:47","guid":{"rendered":"https:\/\/ccbill.com\/kb\/?p=1958"},"modified":"2023-03-07T11:55:15","modified_gmt":"2023-03-07T11:55:15","slug":"magento-add-payment-method","status":"publish","type":"post","link":"https:\/\/ccbill.com\/kb\/magento-add-payment-method","title":{"rendered":"How to Add a Payment Method to Magento 2"},"content":{"rendered":"<p class=\"h3\">Introduction<\/p>\n\n\n<p>Customers want to use <a href=\"https:\/\/ccbill.com\/blog\/preferred-payment-method\" target=\"_blank\" rel=\"noreferrer noopener\">preferred payment methods<\/a> they recognize and trust. To meet customer expectations, ecommerce stores need to offer as many payment options as possible.<\/p>\n\n\n\n<p><a href=\"https:\/\/ccbill.com\/kb\/how-to-install-magento-in-linux\" target=\"_blank\" rel=\"noreferrer noopener\">Magento 2.4<\/a> enables store owners to accept payments using built-in PayPal\/Braintree payment solutions. You can also add new payment options by implementing third-party extensions from the <a href=\"https:\/\/marketplace.magento.com\/extensions.html?\" target=\"_blank\" rel=\"noreferrer noopener\">Magento Marketplace<\/a>.<\/p>\n\n\n\n<p>However, adding a custom payment method allows merchants to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Integrate Magento 2 with a preferred <a rel=\"noreferrer noopener\" href=\"https:\/\/ccbill.com\/industries\/ecommerce\" target=\"_blank\">ecommerce payment processor<\/a>.<\/li>\n\n\n\n<li>Customize the Magento checkout process to fit a particular business model.<\/li>\n\n\n\n<li>Offer customers region-specific payment options.<\/li>\n<\/ul>\n\n\n\n<p>In this article,<strong> learn how to add a custom payment method to Magento 2<\/strong> and maximize your store\u2019s conversion rates.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"800\" height=\"400\" src=\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/add-payment-method-magento-2.png\" alt=\"Adding a different payment methods to pay in a Magento store.\" class=\"wp-image-1960\" srcset=\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/add-payment-method-magento-2.png 800w, https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/add-payment-method-magento-2-300x150.png 300w, https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/add-payment-method-magento-2-768x384.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\">Add a Custom Payment Method in Magento 2<\/h2>\n\n\n\n<p>To add a new payment option in Magento 2, you need to build a custom payment module, render the payment method during checkout, and configure the module to processes payment data in conjunction with Magento\u2019s systems.<\/p>\n\n\n\n<p>Magento is a flexible, open-source platform, and it is not necessary to modify the native Magento code. Create the custom payment method as a separate module dependent on the existing Magento checkout module.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-vivid-cyan-blue-color has-css-opacity has-vivid-cyan-blue-background-color has-background is-style-wide\"\/>\n\n\n\n<p><strong>Note<\/strong>: Choosing the right <a rel=\"noreferrer noopener\" href=\"https:\/\/ccbill.com\/kb\/choosing-a-payment-gateway\" target=\"_blank\">payment gateway<\/a> that delivers a smooth payment flow when <a href=\"https:\/\/ccbill.com\/kb\/how-to-build-magento-website\" target=\"_blank\" rel=\"noreferrer noopener\">building a Magento website<\/a> is important for the growth and development of your ecommerce business.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-vivid-cyan-blue-color has-css-opacity has-vivid-cyan-blue-background-color has-background is-style-wide\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Register Payment Module in Magento<\/h3>\n\n\n\n<p>Create a <em>registration.php<\/em> file in the payment module\u2019s root directory. In this example, the file path is <em>app\/code\/CCBill\/CustomPaymentOption\/registration.php.<\/em><\/p>\n\n\n\n<p>Add the following code to register the module (component) in Magento\u2019s system:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n\\Magento\\Framework\\Component\\ComponentRegistrar::register(\n    \\Magento\\Framework\\Component\\ComponentRegistrar::MODULE,\n    &#039;CCBill_CustomPaymentOption&#039;,\n    __DIR__\n);<\/code><\/pre>\n\n\n\n<p>Edit the vendor (CCBill) and module name<em> <\/em>(CustomPaymentOption) to match your module\u2019s name.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-vivid-cyan-blue-color has-css-opacity has-vivid-cyan-blue-background-color has-background is-style-wide\"\/>\n\n\n\n<p><strong>Note<\/strong>: For easy integration with Magento, CCBill maintains a <a href=\"https:\/\/github.com\/CCBill\/restful-api-guide\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub repository<\/a> for its public-facing API. For any additional information, reach out to<a href=\"https:\/\/ccbill.com\/contact\" target=\"_blank\" rel=\"noreferrer noopener\"> CCBill Support<\/a>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-vivid-cyan-blue-color has-css-opacity has-vivid-cyan-blue-background-color has-background is-style-wide\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Declare Payment Module Name<\/h3>\n\n\n\n<p>Access the custom module\u2019s <em>app\/code\/CCBill\/CustomPaymentOption\/etc\/<\/em> directory and create a <em>module.xml<\/em> file. Define the module name within the <em>module.xml<\/em> file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?xml version=&quot;1.0&quot;?&gt;\n&lt;config xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:Module\/etc\/module.xsd&quot;&gt;\n    &lt;module name=&quot;CCBill_ CustomPaymentOption&quot; setup_version=&quot;2.2.0&quot;&gt;\n&lt;sequence&gt;\n            &lt;module name=&quot;Magento_Sales&quot;\/&gt;\n            &lt;module name=&quot;Magento_Payment&quot;\/&gt;\n            &lt;module name=&quot;Magento_Checkout&quot;\/&gt;\n&lt;\/sequence&gt;\n    &lt;\/module&gt;\n&lt;\/config&gt;<\/code><\/pre>\n\n\n\n<p>The <code>&lt;strong&gt;&lt;sequence&gt;&lt;\/strong&gt;<\/code> tag controls the load order and ensures that the system loads the listed components before the custom payment module.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Add Payment Method Configuration Settings<\/h3>\n\n\n\n<p>Configure and display the payment method in the Magento Admin by using a <em>system.xml <\/em>file<em>.<\/em> Create the <em>system.xml<\/em> file in the <em>app\/code\/CCBill\/CustomPaymentOption\/etc\/adminhtml\/ <\/em>directory and add the following code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;config xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:module:Magento_Config:etc\/system_file.xsd&quot;&gt;\n    &lt;system&gt;\n        &lt;section id=&quot;payment&quot;&gt;\n            &lt;group id=&quot;ccbill_custompaymentoption&quot; translate=&quot;label comment&quot; type=&quot;text&quot; sortOrder=&quot;100&quot; showInDefault=&quot;1&quot; showInWebsite=&quot;1&quot; showInStore=&quot;1&quot;&gt;\n                &lt;label&gt;Custom Payment Option&lt;\/label&gt;\n                &lt;field id=&quot;active&quot; translate=&quot;label&quot; type=&quot;select&quot; sortOrder=&quot;10&quot; showInDefault=&quot;1&quot; showInWebsite=&quot;1&quot; showInStore=&quot;0&quot;&gt;\n                    &lt;label&gt;Enabled&lt;\/label&gt;\n                    &lt;source_model&gt;Magento\\Config\\Model\\Config\\Source\\Yesno&lt;\/source_model&gt;\n                &lt;\/field&gt;\n                &lt;field id=&quot;title&quot; translate=&quot;label&quot; type=&quot;text&quot; sortOrder=&quot;30&quot; showInDefault=&quot;1&quot; showInWebsite=&quot;1&quot; showInStore=&quot;1&quot;&gt;\n                    &lt;label&gt;Title&lt;\/label&gt;\n                &lt;\/field&gt;\n                &lt;field id=&quot;cctypes&quot; translate=&quot;label&quot; type=&quot;multiselect&quot; sortOrder=&quot;75&quot; showInDefault=&quot;1&quot; showInWebsite=&quot;1&quot; showInStore=&quot;0&quot;&gt;\n                    &lt;label&gt;Credit Card Types&lt;\/label&gt;\n                    &lt;source_model&gt;Magento\\Payment\\Model\\Source\\Cctype&lt;\/source_model&gt;\n                &lt;\/field&gt;\n            &lt;\/group&gt;\n        &lt;\/section&gt;\n    &lt;\/system&gt;\n&lt;\/config&gt;<\/code><\/pre>\n\n\n\n<p>Activate the module using the <code>&lt;strong&gt;Enabled&lt;\/strong&gt;<\/code> label, display its <code>&lt;strong&gt;Title&lt;\/strong&gt;<\/code>, and add a preferred payment option, such as <code>&lt;strong&gt;Credit Card Types&lt;\/strong&gt;<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Add Default System Configuration Values<\/h3>\n\n\n\n<p>Define default values for the <em>system.xml<\/em> file by creating a <em>config.xml<\/em> file. Create the <em>config.xml<\/em> file in the <em>app\/code\/CCBill\/CustomPaymentOption\/etc\/ <\/em>directory and add the following code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?xml version=&quot;1.0&quot; ?&gt;\n&lt;config xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot;\n        xsi:noNamespaceSchemaLocation=&quot;urn:magento:module:Magento_Store:etc\/config.xsd&quot;&gt;\n    &lt;default&gt;\n        &lt;payment&gt;\n            &lt;ccbill_custompaymentoption&gt;\n  &lt;title&gt;Custom Payment Option&lt;\/title&gt;\n                &lt;active&gt;1&lt;\/active&gt;\n  &lt;payment_action&gt;preferred_method&lt;\/payment_action&gt;\n                &lt;model&gt;CCBill\\CustomPaymentOption\\Model\\PaymenMethod&lt;\/model&gt;\n                &lt;order_status&gt;pending_payment&lt;\/order_status&gt;\n            &lt;\/ccbill_custompaymentoption&gt;\n        &lt;\/payment&gt;\n    &lt;\/default&gt;\n&lt;\/config&gt;<\/code><\/pre>\n\n\n\n<p>Use the <code>&lt;strong&gt;payment_action&lt;\/strong&gt;<\/code> tag to set preferred payment methods as the default value.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Create Payment Method Model<\/h3>\n\n\n\n<p>Access the <em>app\/code\/CCBill\/CustomPaymentOption\/Model\/ <\/em>directory and create a <em>custompaymentoption.php<\/em> file<em>.<\/em> Copy the following code to establish a payment method model class in the <em>.php<\/em> file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nnamespace CCBill\\CustomPaymentOption\\Model;\n\nclass CustomPaymentOption extends \\Magento\\Payment\\Model\\Method\\Cc \n{\n    const METHOD_CODE        = &#039;ccbill_custompaymentoption&#039;;\n \n    protected $_code               = self::METHOD_CODE;\n \n    protected $_custompayments;\n \n    protected $_isGateway                   = true;\n    protected $_canCapture                  = true;\n    protected $_canCapturePartial           = true;\n    protected $_canRefund                   = true;\n    protected $_minOrderTotal = 0;\n    protected $_supportedCurrencyCodes = array(&#039;USD&#039;,&#039;GBP&#039;,&#039;EUR&#039;);\n \n    public function __construct(\n        \\Magento\\Framework\\Model\\Context $context,\n        \\Magento\\Framework\\Registry $registry,\n        \\Magento\\Framework\\Api\\ExtensionAttributesFactory $extensionFactory,\n        \\Magento\\Framework\\Api\\AttributeValueFactory $customAttributeFactory,\n        \\Magento\\Payment\\Helper\\Data $paymentData,\n        \\Magento\\Framework\\App\\Config\\ScopeConfigInterface $scopeConfig,\n        \\Magento\\Payment\\Model\\Method\\Logger $logger,\n        \\Magento\\Framework\\Module\\ModuleListInterface $moduleList,\n        \\Magento\\Framework\\Stdlib\\DateTime\\TimezoneInterface $localeDate,\n        \\Extension\\Extension $Extension,\n        array $data = array()\n    ) {\n        parent::__construct(\n            $context,\n            $registry,\n            $extensionFactory,\n            $customAttributeFactory,\n            $paymentData,\n            $scopeConfig,\n            $logger,\n            $moduleList,\n            $localeDate,\n            null,\n            null,\n            $data\n        );\n \n        $this-&gt;_code = &#039;Extension&#039;;\n        $this-&gt;_Extension = $Extension;\n        $this-&gt;_Extension-&gt;setApiKey($this-&gt;getConfigData(&#039;api_key&#039;));\n \n        $this-&gt;_minOrderTotal = $this-&gt;getConfigData(&#039;min_order_total&#039;);\n \n    }\n \n    public function canUseForCurrency($currencyCode)\n    {\n        if (!in_array($currencyCode, $this-&gt;_supportedCurrencyCodes)) {\n            return false;\n        }\n        return true;\n    }\n \n    public function capture(\\Magento\\Payment\\Model\\InfoInterface $payment, $amount)\n {\n        $order = $payment-&gt;getOrder();\n        $billing = $order-&gt;getBillingAddress();\n        try{\n            $charge = \\Extension\\Charge::create(array(\n                &#039;amount&#039; =&gt; $amount*100,\n                &#039;currency&#039; =&gt; strtolower($order-&gt;getBaseCurrencyCode()),\n                &#039;card&#039;      =&gt; array(\n                    &#039;number&#039; =&gt; $payment-&gt;getCcNumber(),\n                    &#039;exp_month&#039; =&gt; sprintf(&#039;%02d&#039;,$payment-&gt;getCcExpMonth()),\n                    &#039;exp_year&#039; =&gt; $payment-&gt;getCcExpYear(),\n                    &#039;cvc&#039; =&gt; $payment-&gt;getCcCid(),\n                    &#039;name&#039; =&gt; $billing-&gt;getName(),\n                    &#039;address_line1&#039; =&gt; $billing-&gt;getStreet(1),\n                    &#039;address_line2&#039; =&gt; $billing-&gt;getStreet(2),\n                    &#039;address_zip&#039; =&gt; $billing-&gt;getPostcode(),\n                    &#039;address_state&#039; =&gt; $billing-&gt;getRegion(),\n                    &#039;address_country&#039; =&gt; $billing-&gt;getCountry(),\n                ),\n                &#039;description&#039; =&gt; sprintf(&#039;#%s, %s&#039;, $order-&gt;getIncrementId(), $order-&gt;getCustomerEmail())\n            ));\n           $payment-&gt;setTransactionId($charge-&gt;id)-&gt;setIsTransactionClosed(0);\n \n            return $this;\n \n        }catch (\\Exception $e){\n            $this-&gt;debugData(&#091;&#039;exception&#039; =&gt; $e-&gt;getMessage()]);\n            throw new \\Magento\\Framework\\Validator\\Exception(__(&#039;Payment capturing error.&#039;));\n        }\n    }\n \n    public function refund(\\Magento\\Payment\\Model\\InfoInterface $payment, $amount)\n    {\n        $transactionId = $payment-&gt;getParentTransactionId();\n \n        try {\n            \\Extension\\Charge::retrieve($transactionId)-&gt;refund();\n        } catch (\\Exception $e) {\n            $this-&gt;debugData(&#091;&#039;exception&#039; =&gt; $e-&gt;getMessage()]);\n            throw new \\Magento\\Framework\\Validator\\Exception(__(&#039;Payment refunding error.&#039;));\n        }\n \n        $payment\n            -&gt;setTransactionId($transactionId . &#039;-&#039; . \\Magento\\Sales\\Model\\Order\\Payment\\Transaction::TYPE_REFUND)\n            -&gt;setParentTransactionId($transactionId)\n            -&gt;setIsTransactionClosed(1)\n            -&gt;setShouldCloseParentTransaction(1);\n \n        return $this;\n    }\n \n    public function isAvailable(\\Magento\\Quote\\Api\\Data\\CartInterface $quote = null){\n        $this-&gt;_minOrderTotal = $this-&gt;getConfigData(&#039;min_order_total&#039;);\n        if($quote &amp;&amp; $quote-&gt;getBaseGrandTotal() &lt; $this-&gt;_minOrderTotal) {\n            return false;\n        }\n        return $this-&gt;getConfigData(&#039;api_key&#039;, ($quote ? $quote-&gt;getStoreId() : null))\n        &amp;&amp; parent::isAvailable($quote);\n    }\n}<\/code><\/pre>\n\n\n\n<p>To check if the new payment method is available, access the Magento Admin and go to <strong>Stores&gt;Configuration<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"800\" height=\"478\" src=\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/check-custom-payment-method-magento-admin.png\" alt=\"Access Configuration menu in Magento\" class=\"wp-image-1961\" srcset=\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/check-custom-payment-method-magento-admin.png 800w, https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/check-custom-payment-method-magento-admin-300x179.png 300w, https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/check-custom-payment-method-magento-admin-768x459.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>Expand the<strong> Sales<\/strong> drop down and open the <strong>Payment Methods<\/strong> menu.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"800\" height=\"490\" src=\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/custom-payment-option-magento-admin.png\" alt=\"Custom Payment Method in Magetno Admin.\" class=\"wp-image-1959\" srcset=\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/custom-payment-option-magento-admin.png 800w, https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/custom-payment-option-magento-admin-300x184.png 300w, https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/custom-payment-option-magento-admin-768x470.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure><\/div>\n\n\n<p>Confirm that the settings correspond with the values defined in the <em>config.xml<\/em> and <em>system.xml<\/em> files.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: Configure Dependency Injection<\/h3>\n\n\n\n<p>To inject the custom payment method into the existing Magento <code>&lt;strong&gt;CcGenericConfigProvider &lt;\/strong&gt;<\/code>create a new <code>&lt;em&gt;di.xml&lt;\/em&gt; file&lt;em&gt;.&lt;\/em&gt;<\/code> Place the <em>di.xml<\/em> file within the <em>app\/code\/CCBill\/CustomPaymentOption\/etc\/frontend\/<\/em> directory and add the payment method code as an argument:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?xml version=&quot;1.0&quot;?&gt;\n&lt;config xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:ObjectManager\/etc\/config.xsd&quot;&gt;\n    &lt;type name=&quot;Magento\\Payment\\Model\\CcGenericConfigProvider&quot;&gt;\n        &lt;arguments&gt;\n            &lt;argument name=&quot;methodCodes&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;CustomPaymentOption&quot; xsi:type=&quot;const&quot;&gt;CCBill\\CustomPaymentOption\\Model\\Payment::METHOD_CODE&lt;\/item&gt;\n            &lt;\/argument&gt;\n        &lt;\/arguments&gt;\n    &lt;\/type&gt;\n&lt;\/config&gt;<\/code><\/pre>\n\n\n\n<p>After configuring the payment method module, the system needs to render the user interface in the store\u2019s frontend.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 7: Add Payment Method Renderer<\/h3>\n\n\n\n<p>Create a <em>custompayments.js<\/em> file within the <em>app\/code\/CCBill\/CustomPaymentOption\/view\/frontend\/web\/js\/view\/payment\/<\/em> directory. Add the following code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define(\n    &#091;\n        &#039;uiComponent&#039;,\n        &#039;Magento_Checkout\/js\/model\/payment\/renderer-list&#039;\n    ],\n    function (\n        Component,\n        rendererList\n    ) {\n        &#039;use strict&#039;;\n        rendererList.push(\n            {\n                type: &#039;ccbill_custompaymentopyion&#039;,\n                component: &#039;CCBill_CustomPaymentOption\/js\/view\/payment\/method-renderer\/custompayments&#039;\n            }\n        );<\/code><\/pre>\n\n\n\n<p>The primary function of the <em>.js<\/em> file in this example is to add a payment method renderer. &nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 8: Declare Payment Method Renderer<\/h3>\n\n\n\n<p>Create a <em>.js<\/em> file in the <em>app\/code\/CCBill\/CustomPaymentOption\/view\/frontend\/web\/js\/view\/payment\/method-renderer\/ <\/em>directory. Use the following code to control the frontend logic of the new payment method:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define(\n    &#091;\n        &#039;Magento_Payment\/js\/view\/payment\/cc-form&#039;,\n        &#039;jquery&#039;,\n        &#039;Magento_Checkout\/js\/action\/place-order&#039;,\n        &#039;Magento_Checkout\/js\/model\/full-screen-loader&#039;,\n        &#039;Magento_Checkout\/js\/model\/payment\/additional-validators&#039;,\n        &#039;Magento_Payment\/js\/model\/credit-card-validation\/validator&#039;\n    ],\n    function (Component, $) {\n        &#039;use strict&#039;;\n \n        return Component.extend({\n            defaults: {\n                template: &#039;CCBill_CustomPaymentOption\/payment\/custompayments&#039;\n            },\n \n            getCode: function() {\n                return &#039;ccbill_custompaymentoption&#039;;\n            },\n \n            isActive: function() {\n                return true;\n            },\n \n            validate: function() {\n                var $form = $(&#039;#&#039; + this.getCode() + &#039;-form&#039;);\n                return $form.validation() &amp;&amp; $form.validation(&#039;isValid&#039;);\n            }\n        });\n    }\n);<\/code><\/pre>\n\n\n\n<p>If the custom module has several payment methods, register the renderers in the same <em>.js<\/em> file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 9: Create Payment Method Template<\/h3>\n\n\n\n<p>The system renders the UI Component using the Knockout JavaScript framework. Build a template that contains a title, billing address, and radio button for the payment method. <\/p>\n\n\n\n<p>Create the <em>.html<\/em> file in the <em>app\/code\/CCBill\/CustomPaymentOption\/view\/frontend\/web\/js\/view\/payment\/ <\/em>directory.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;div class=&quot;payment-method&quot; data-bind=&quot;css: {&#039;_active&#039;: (getCode() == isChecked())}&quot;&gt;\n    &lt;div class=&quot;payment-method-title field choice&quot;&gt;\n        &lt;input type=&quot;radio&quot;\n               name=&quot;payment&#091;method]&quot;\n               class=&quot;radio&quot;\n               data-bind=&quot;attr: {&#039;id&#039;: getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()&quot;\/&gt;\n        &lt;label data-bind=&quot;attr: {&#039;for&#039;: getCode()}&quot; class=&quot;label&quot;&gt;&lt;span data-bind=&quot;text: getTitle()&quot;&gt;&lt;\/span&gt;&lt;\/label&gt;\n    &lt;\/div&gt;\n    &lt;div class=&quot;payment-method-content&quot;&gt;\n        &lt;!-- ko foreach: getRegion(&#039;messages&#039;) --&gt;\n        &lt;!-- ko template: getTemplate() --&gt;&lt;!-- \/ko --&gt;\n        &lt;!--\/ko--&gt;\n        &lt;div class=&quot;payment-method-billing-address&quot;&gt;\n            &lt;!-- ko foreach: $parent.getRegion(getBillingAddressFormName()) --&gt;\n            &lt;!-- ko template: getTemplate() --&gt;&lt;!-- \/ko --&gt;\n            &lt;!--\/ko--&gt;\n        &lt;\/div&gt;\n \n        &lt;form class=&quot;form&quot; data-bind=&quot;attr: {&#039;id&#039;: getCode() + &#039;-form&#039;}&quot;&gt;\n            &lt;!-- ko template: &#039;Magento_Payment\/payment\/cc-form&#039; --&gt;&lt;!-- \/ko --&gt;\n        &lt;\/form&gt;\n \n        &lt;div class=&quot;checkout-agreements-block&quot;&gt;\n            &lt;!-- ko foreach: $parent.getRegion(&#039;before-place-order&#039;) --&gt;\n            &lt;!-- ko template: getTemplate() --&gt;&lt;!-- \/ko --&gt;\n            &lt;!--\/ko--&gt;\n        &lt;\/div&gt;\n        &lt;div class=&quot;actions-toolbar&quot;&gt;\n            &lt;div class=&quot;primary&quot;&gt;\n                &lt;button class=&quot;action primary checkout&quot;\n                        type=&quot;submit&quot;\n                        data-bind=&quot;\n                        click: placeOrder,\n                        attr: {title: $t(&#039;Place Order&#039;)},\n                        css: {disabled: !isPlaceOrderActionAllowed()},\n                        enable: (getCode() == isChecked())\n                        &quot;\n                        disabled&gt;\n                    &lt;span data-bind=&quot;text: $t(&#039;Place Order&#039;)&quot;&gt;&lt;\/span&gt;\n                &lt;\/button&gt;\n            &lt;\/div&gt;\n        &lt;\/div&gt;\n    &lt;\/div&gt;\n&lt;\/div<\/code><\/pre>\n\n\n\n<p>For convenience, use templates from existing Magento payment modules. The <em>.html<\/em> templates are located in the <em>&lt;random_module &gt;\/frontend\/web\/template\/payment\/<\/em> payment module directories.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 10: Show Payment Method in Checkout<\/h3>\n\n\n\n<p>To display the payment method on the checkout page, create the <em>checkout_index_index.xml<\/em> file within the <em>app\/code\/CCBill\/CustomPaymentOption\/view\/frontend\/layout\/<\/em> directory.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?xml version=&quot;1.0&quot;?&gt;\n&lt;page xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; layout=&quot;1column&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:View\/Layout\/etc\/page_configuration.xsd&quot;&gt;\n    &lt;body&gt;\n     &lt;referenceBlock name=&quot;checkout.root&quot;&gt;\n      &lt;arguments&gt;\n       &lt;argument name=&quot;jsLayout&quot; xsi:type=&quot;array&quot;&gt;\n        &lt;item name=&quot;components&quot; xsi:type=&quot;array&quot;&gt;\n         &lt;item name=&quot;checkout&quot; xsi:type=&quot;array&quot;&gt;\n          &lt;item name=&quot;children&quot; xsi:type=&quot;array&quot;&gt;\n           &lt;item name=&quot;steps&quot; xsi:type=&quot;array&quot;&gt;\n            &lt;item name=&quot;children&quot; xsi:type=&quot;array&quot;&gt;\n             &lt;item name=&quot;billing-step&quot; xsi:type=&quot;array&quot;&gt;\n              &lt;item name=&quot;component&quot; xsi:type=&quot;string&quot;&gt;uiComponent&lt;\/item&gt;\n               &lt;item name=&quot;children&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;payment&quot; xsi:type=&quot;array&quot;&gt;\n                 &lt;item name=&quot;children&quot; xsi:type=&quot;array&quot;&gt;\n                  &lt;item name=&quot;renders&quot; xsi:type=&quot;array&quot;&gt;\n                   &lt;!-- merge payment method renders here --&gt;\n                    &lt;item name=&quot;children&quot; xsi:type=&quot;array&quot;&gt;\n                     &lt;item name=&quot;paymentoptions-payments&quot; xsi:type=&quot;array&quot;&gt;\n                      &lt;item name=&quot;component&quot; xsi:type=&quot;string&quot;&gt;CCBill_CustomPaymentOption\/js\/view\/payment\/paymentoptions&lt;\/item&gt;\n                       &lt;item name=&quot;methods&quot; xsi:type=&quot;array&quot;&gt;\n                         &lt;item name=&quot;CustomPaymentOptions&quot; xsi:type=&quot;array&quot;&gt;\n                          &lt;item name=&quot;isBillingAddressRequired&quot; xsi:type=&quot;boolean&quot;&gt;true&lt;\/item&gt;\n                                             &lt;\/item&gt;\n                                           &lt;\/item&gt;\n                                         &lt;\/item&gt;\n                                       &lt;\/item&gt;\n                                     &lt;\/item&gt;\n                                   &lt;\/item&gt;\n                                 &lt;\/item&gt;\n                               &lt;\/item&gt;\n                             &lt;\/item&gt;\n                           &lt;\/item&gt;\n                         &lt;\/item&gt;\n                       &lt;\/item&gt;\n                     &lt;\/item&gt;\n                   &lt;\/item&gt;\n                 &lt;\/argument&gt;\n               &lt;\/arguments&gt;\n             &lt;\/referenceBlock&gt;\n           &lt;\/body&gt;\n         &lt;\/page&gt;<\/code><\/pre>\n\n\n\n<p>If Magento is in production mode, deploy static content and flush the Magento cache before testing the functionality of the new payment method.<\/p>\n\n\n\n<p>To flush Magento cache, use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento cache:flush<\/code><\/pre>\n\n\n<p class=\"h3\">Conclusion<\/p>\n\n\n<p>You have successfully added a custom payment method to your Magento 2 store. Use the same approach to implement new payment options and enable customers to pay using their preferred method. <\/p>\n\n\n\n<p>The number of devices and methods customers use to make online payments is increasing rapidly. It is challenging to maintain a satisfying customer experience with a traditional web-based model. <\/p>\n\n\n\n<p>To help merchants reach their customers more effectively, platforms like Magento are introducing <a href=\"https:\/\/ccbill.com\/kb\/headless-commerce\" target=\"_blank\" rel=\"noreferrer noopener\">headless commerce<\/a> and API-driven features.<\/p>\n\n\n\n<p> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>The tutorial contains basic code examples and shows how to add a custom payment method to Magento in 10 short steps.<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[13,14],"tags":[],"class_list":["post-1958","post","type-post","status-publish","format-standard","hentry","category-payment-processing","category-web-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Add a Payment Method to Magento 2 | CCBill KB<\/title>\n<meta name=\"description\" content=\"Add a custom payment method to Magento 2 in 10 easy-to-follow steps. Lots of practical code examples guide you each step of the way.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ccbill.com\/kb\/magento-add-payment-method\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Add a Payment Method to Magento 2 | CCBill KB\" \/>\n<meta property=\"og:description\" content=\"Add a custom payment method to Magento 2 in 10 easy-to-follow steps. Lots of practical code examples guide you each step of the way.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ccbill.com\/kb\/magento-add-payment-method\" \/>\n<meta property=\"og:site_name\" content=\"CCBill Knowledge Base\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ccbillBIZ\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-27T14:44:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-07T11:55:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/add-payment-method-magento-2.png\" \/>\n<meta name=\"author\" content=\"Vladimir Kaplarevic\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CCBillBIZ\" \/>\n<meta name=\"twitter:site\" content=\"@CCBillBIZ\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vladimir Kaplarevic\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ccbill.com\/kb\/magento-add-payment-method#article\",\"isPartOf\":{\"@id\":\"https:\/\/ccbill.com\/kb\/magento-add-payment-method\"},\"author\":{\"name\":\"Vladimir Kaplarevic\",\"@id\":\"https:\/\/ccbill.com\/kb\/#\/schema\/person\/1f198b1218f6343a2682022ac4395644\"},\"headline\":\"How to Add a Payment Method to Magento 2\",\"datePublished\":\"2021-05-27T14:44:47+00:00\",\"dateModified\":\"2023-03-07T11:55:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ccbill.com\/kb\/magento-add-payment-method\"},\"wordCount\":912,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/ccbill.com\/kb\/#organization\"},\"image\":{\"@id\":\"https:\/\/ccbill.com\/kb\/magento-add-payment-method#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/add-payment-method-magento-2.png\",\"articleSection\":[\"Payment Processing\",\"Web Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ccbill.com\/kb\/magento-add-payment-method#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ccbill.com\/kb\/magento-add-payment-method\",\"url\":\"https:\/\/ccbill.com\/kb\/magento-add-payment-method\",\"name\":\"How to Add a Payment Method to Magento 2 | CCBill KB\",\"isPartOf\":{\"@id\":\"https:\/\/ccbill.com\/kb\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ccbill.com\/kb\/magento-add-payment-method#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ccbill.com\/kb\/magento-add-payment-method#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/add-payment-method-magento-2.png\",\"datePublished\":\"2021-05-27T14:44:47+00:00\",\"dateModified\":\"2023-03-07T11:55:15+00:00\",\"description\":\"Add a custom payment method to Magento 2 in 10 easy-to-follow steps. Lots of practical code examples guide you each step of the way.\",\"breadcrumb\":{\"@id\":\"https:\/\/ccbill.com\/kb\/magento-add-payment-method#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ccbill.com\/kb\/magento-add-payment-method\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ccbill.com\/kb\/magento-add-payment-method#primaryimage\",\"url\":\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/add-payment-method-magento-2.png\",\"contentUrl\":\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/add-payment-method-magento-2.png\",\"width\":800,\"height\":400,\"caption\":\"Customers using different payment methods to pay in a Magento store.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ccbill.com\/kb\/magento-add-payment-method#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"KB Home\",\"item\":\"https:\/\/ccbill.com\/kb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Web Development\",\"item\":\"https:\/\/ccbill.com\/kb\/category\/web-development\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Add a Payment Method to Magento 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ccbill.com\/kb\/#website\",\"url\":\"https:\/\/ccbill.com\/kb\/\",\"name\":\"CCBill Knowledge Base\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/ccbill.com\/kb\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ccbill.com\/kb\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/ccbill.com\/kb\/#organization\",\"name\":\"CCBill\",\"url\":\"https:\/\/ccbill.com\/kb\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ccbill.com\/kb\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2020\/10\/ccbill-logo.png\",\"contentUrl\":\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2020\/10\/ccbill-logo.png\",\"width\":160,\"height\":70,\"caption\":\"CCBill\"},\"image\":{\"@id\":\"https:\/\/ccbill.com\/kb\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/ccbillBIZ\/\",\"https:\/\/x.com\/CCBillBIZ\",\"https:\/\/www.linkedin.com\/company\/ccbill\",\"https:\/\/www.youtube.com\/c\/CCBillBiz\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ccbill.com\/kb\/#\/schema\/person\/1f198b1218f6343a2682022ac4395644\",\"name\":\"Vladimir Kaplarevic\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ccbill.com\/kb\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cc08885e8fec32585bae8a0f5a1aef92f8c8c4fc33692e74e0ec2e63633d2478?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cc08885e8fec32585bae8a0f5a1aef92f8c8c4fc33692e74e0ec2e63633d2478?s=96&d=mm&r=g\",\"caption\":\"Vladimir Kaplarevic\"},\"description\":\"Vladimir is a resident Tech Writer at CCBill. He has more than 8 years of experience in implementing e-commerce and online payment solutions with various global IT services providers. His engaging writing style provides practical advice and aims to spark curiosity for innovative technologies.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Add a Payment Method to Magento 2 | CCBill KB","description":"Add a custom payment method to Magento 2 in 10 easy-to-follow steps. Lots of practical code examples guide you each step of the way.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ccbill.com\/kb\/magento-add-payment-method","og_locale":"en_US","og_type":"article","og_title":"How to Add a Payment Method to Magento 2 | CCBill KB","og_description":"Add a custom payment method to Magento 2 in 10 easy-to-follow steps. Lots of practical code examples guide you each step of the way.","og_url":"https:\/\/ccbill.com\/kb\/magento-add-payment-method","og_site_name":"CCBill Knowledge Base","article_publisher":"https:\/\/www.facebook.com\/ccbillBIZ\/","article_published_time":"2021-05-27T14:44:47+00:00","article_modified_time":"2023-03-07T11:55:15+00:00","og_image":[{"url":"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/add-payment-method-magento-2.png","type":"","width":"","height":""}],"author":"Vladimir Kaplarevic","twitter_card":"summary_large_image","twitter_creator":"@CCBillBIZ","twitter_site":"@CCBillBIZ","twitter_misc":{"Written by":"Vladimir Kaplarevic","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ccbill.com\/kb\/magento-add-payment-method#article","isPartOf":{"@id":"https:\/\/ccbill.com\/kb\/magento-add-payment-method"},"author":{"name":"Vladimir Kaplarevic","@id":"https:\/\/ccbill.com\/kb\/#\/schema\/person\/1f198b1218f6343a2682022ac4395644"},"headline":"How to Add a Payment Method to Magento 2","datePublished":"2021-05-27T14:44:47+00:00","dateModified":"2023-03-07T11:55:15+00:00","mainEntityOfPage":{"@id":"https:\/\/ccbill.com\/kb\/magento-add-payment-method"},"wordCount":912,"commentCount":0,"publisher":{"@id":"https:\/\/ccbill.com\/kb\/#organization"},"image":{"@id":"https:\/\/ccbill.com\/kb\/magento-add-payment-method#primaryimage"},"thumbnailUrl":"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/add-payment-method-magento-2.png","articleSection":["Payment Processing","Web Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ccbill.com\/kb\/magento-add-payment-method#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ccbill.com\/kb\/magento-add-payment-method","url":"https:\/\/ccbill.com\/kb\/magento-add-payment-method","name":"How to Add a Payment Method to Magento 2 | CCBill KB","isPartOf":{"@id":"https:\/\/ccbill.com\/kb\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ccbill.com\/kb\/magento-add-payment-method#primaryimage"},"image":{"@id":"https:\/\/ccbill.com\/kb\/magento-add-payment-method#primaryimage"},"thumbnailUrl":"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/add-payment-method-magento-2.png","datePublished":"2021-05-27T14:44:47+00:00","dateModified":"2023-03-07T11:55:15+00:00","description":"Add a custom payment method to Magento 2 in 10 easy-to-follow steps. Lots of practical code examples guide you each step of the way.","breadcrumb":{"@id":"https:\/\/ccbill.com\/kb\/magento-add-payment-method#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ccbill.com\/kb\/magento-add-payment-method"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ccbill.com\/kb\/magento-add-payment-method#primaryimage","url":"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/add-payment-method-magento-2.png","contentUrl":"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2021\/05\/add-payment-method-magento-2.png","width":800,"height":400,"caption":"Customers using different payment methods to pay in a Magento store."},{"@type":"BreadcrumbList","@id":"https:\/\/ccbill.com\/kb\/magento-add-payment-method#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"KB Home","item":"https:\/\/ccbill.com\/kb\/"},{"@type":"ListItem","position":2,"name":"Web Development","item":"https:\/\/ccbill.com\/kb\/category\/web-development"},{"@type":"ListItem","position":3,"name":"How to Add a Payment Method to Magento 2"}]},{"@type":"WebSite","@id":"https:\/\/ccbill.com\/kb\/#website","url":"https:\/\/ccbill.com\/kb\/","name":"CCBill Knowledge Base","description":"","publisher":{"@id":"https:\/\/ccbill.com\/kb\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ccbill.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ccbill.com\/kb\/#organization","name":"CCBill","url":"https:\/\/ccbill.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ccbill.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2020\/10\/ccbill-logo.png","contentUrl":"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2020\/10\/ccbill-logo.png","width":160,"height":70,"caption":"CCBill"},"image":{"@id":"https:\/\/ccbill.com\/kb\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ccbillBIZ\/","https:\/\/x.com\/CCBillBIZ","https:\/\/www.linkedin.com\/company\/ccbill","https:\/\/www.youtube.com\/c\/CCBillBiz"]},{"@type":"Person","@id":"https:\/\/ccbill.com\/kb\/#\/schema\/person\/1f198b1218f6343a2682022ac4395644","name":"Vladimir Kaplarevic","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ccbill.com\/kb\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cc08885e8fec32585bae8a0f5a1aef92f8c8c4fc33692e74e0ec2e63633d2478?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cc08885e8fec32585bae8a0f5a1aef92f8c8c4fc33692e74e0ec2e63633d2478?s=96&d=mm&r=g","caption":"Vladimir Kaplarevic"},"description":"Vladimir is a resident Tech Writer at CCBill. He has more than 8 years of experience in implementing e-commerce and online payment solutions with various global IT services providers. His engaging writing style provides practical advice and aims to spark curiosity for innovative technologies."}]}},"_links":{"self":[{"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/posts\/1958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/comments?post=1958"}],"version-history":[{"count":29,"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/posts\/1958\/revisions"}],"predecessor-version":[{"id":4879,"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/posts\/1958\/revisions\/4879"}],"wp:attachment":[{"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/media?parent=1958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/categories?post=1958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/tags?post=1958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}