{"id":4345,"date":"2017-09-07T22:41:38","date_gmt":"2017-09-07T12:41:38","guid":{"rendered":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/?p=4345"},"modified":"2017-09-07T22:41:38","modified_gmt":"2017-09-07T12:41:38","slug":"wp-payment-gateway-bundle-braintree-subscription-setup","status":"publish","type":"post","link":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-payment-gateway-bundle-braintree-subscription-setup-4345","title":{"rendered":"WP Payment Gateway Bundle \u00e2\u20ac\u201c Braintree Subscription Setup"},"content":{"rendered":"<p>After you install the <a href=\"https:\/\/www.tipsandtricks-hq.com\/wp-payment-gateway-bundle-plugin\" target=\"_blank\" rel=\"noopener noreferrer\">WP Payment Gateway Bundle<\/a> plugin, you will need to configure some Braintree Gateway specific settings in the plugin which you will need to obtain from your Braintree merchant account.<\/p>\n<p>You can find the Braintree specific settings required by the plugin under the &#8220;Gateway Settings&#8221; tab when you go to the payment gateway bundle plugin&#8217;s settings menu. The following screenshot shows how you can access the settings page of this addon:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" title=\"payment-gateway-bundle-settings\" src=\"http:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2011\/04\/payment-gateway-bundle-settings.gif\" alt=\"\" width=\"159\" height=\"377\" \/><\/p>\n<p>In order to configure the Braintree Subscription portion of the payment gateway bundle you will need to obtain the required details from your Braintree merchant account by following the steps outlined below:<\/p>\n<p><strong>Step 1:<\/strong> Log into your Braintree merchant account and\u00c2\u00a0click\u00c2\u00a0<strong>My User <\/strong>under <strong>Account<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4346\" src=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_subscription_setup1.png\" alt=\"screenshot1 showing how to get the braintree credentials from the merchant account\" width=\"486\" height=\"171\" srcset=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_subscription_setup1.png 486w, https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_subscription_setup1-300x106.png 300w\" sizes=\"(max-width: 486px) 100vw, 486px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 2:<\/strong>\u00c2\u00a0Go to the <strong>API Keys, Tokenization Keys, Encryption Keys<\/strong> section and click <strong>View Authorizations<\/strong>. Copy and paste your account credentials into a notepad for later use.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4347\" src=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_subscription_setup2.png\" alt=\"screenshot2 showing how to get the braintree credentials from the merchant account\" width=\"500\" height=\"229\" srcset=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_subscription_setup2.png 500w, https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_subscription_setup2-300x137.png 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 3:<\/strong> Now from your WordPress administration panel, go to Braintree Subscription Settings (under <strong>Payment Gateway Bundle<\/strong>-&gt;<strong>Gateway Settings<\/strong>).<\/p>\n<p><strong>Step 4:<\/strong> Enter your Merchant ID.<\/p>\n<p><strong>Step 5:<\/strong> Enter your Public key.<\/p>\n<p><strong>Step 6:<\/strong> Enter\u00c2\u00a0Private key.<\/p>\n<p><strong>Step 7:\u00c2\u00a0<\/strong>Copy the <strong>\u00c2\u00a0Braintree Webhook URL\u00c2\u00a0<\/strong>for your site and specify it in your merchant account (<strong>Settings &gt;\u00c2\u00a0<\/strong><strong>Webhooks<\/strong>).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4348\" src=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_subscription_webhook_setup.png\" alt=\"configure a webhook for braintree subscription\" width=\"325\" height=\"322\" srcset=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_subscription_webhook_setup.png 325w, https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_subscription_webhook_setup-150x150.png 150w, https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_subscription_webhook_setup-300x297.png 300w\" sizes=\"(max-width: 325px) 100vw, 325px\" \/><\/p>\n<p>You can choose to receive notifications for all the subscription events. However, the plugin will currently handle these events &#8211; Cancelled, Charged Successfully and Expired.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4349\" src=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_subscription_webhook_setup2.png\" alt=\"configuring braintree webhook notification types for a subscription\" width=\"307\" height=\"500\" srcset=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_subscription_webhook_setup2.png 307w, https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_subscription_webhook_setup2-184x300.png 184w\" sizes=\"(max-width: 307px) 100vw, 307px\" \/><\/p>\n<p><strong>Step 8:<\/strong> Hit the &#8220;Update&#8221; button to save your Braintree account credentials in the Payment Gateway Bundle settings.<\/p>\n<h2>Create a Subscription Plan<\/h2>\n<p>In order to accept recurring payments for your eStore subscription product, you will need to create a plan in your Braintree account. If you have 10 eStore subscription products that you wish sell with Braintree, you will need to create 10 separate plans in your Braintree merchant account. Each plan interface is very similar to the subscription settings section of an eStore product. For example:\u00c2\u00a0Recurring Billing Price,\u00c2\u00a0Recurring Billing Cycle etc.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4351\" src=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_plan_setup.png\" alt=\"configure a plain in braintree\" width=\"600\" height=\"455\" srcset=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_plan_setup.png 600w, https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_plan_setup-300x228.png 300w, https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_plan_setup-264x200.png 264w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>When a new subscription is created on your site, Braintree will charge\/rebill the customer based on these configurations (not your eStore subscription product). Your eStore subscription product will just be a template for the plan that you create in your Braintree account. Unfortunately, Braintree API doesn&#8217;t allow an external script to create this plan (you will need to do this manually). That means the payment gateway bundle addon needs to assume the ID of the plan that you are going to create for an eStore product.<\/p>\n<h3>How to Name a Plan ID<\/h3>\n<p>The Plan name can be anything you like. However, The Plan ID needs to be unique in your account and something that can be synchronized\u00c2\u00a0with the eStore product in question. In order to integrate an eStore product with a plan created in your Braintree account, your Plan ID should be:<\/p>\n<p><strong>SiteAddress<\/strong>-estore-<strong>EstoreProductID<\/strong><\/p>\n<p>Here, <strong>SiteAddress<\/strong> is the URL specified in your WordPress dashboard (<strong>Settings &gt; General &gt; Site Address<\/strong>) and\u00c2\u00a0<strong>EstoreProductID<\/strong> is the eStore product ID (example: 1). Since you can only use limited special characters in the plan ID you will need to remove http:\/\/ or https:\/\/ from\u00c2\u00a0<strong>SiteAddress<\/strong> and replace all dots with hyphens.<\/p>\n<p><strong>Plan ID Example<\/strong><\/p>\n<p>1. if your SiteAddress is http:\/\/example.com and you are creating a plan for eStore product 2, your plan ID should be:<\/p>\n<p>example-com-estore-2<\/p>\n<p>2. if your SiteAddress is http:\/\/www.example.com and you are creating a plan for eStore product 7, your plan ID should be:<\/p>\n<p>www-example-com-estore-7<\/p>\n<p>3. if your SiteAddress is http:\/\/www.my-site.com and you are creating a plan for eStore product 10, your plan ID should be:<\/p>\n<p>www-my-site-com-estore-10<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4352\" src=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_plan_name.png\" alt=\"configure a plan name in braintree\" width=\"400\" height=\"466\" srcset=\"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_plan_name.png 400w, https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-content\/uploads\/2017\/09\/braintree_plan_name-258x300.png 258w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/p>\n<h2>Subscription Limitation<\/h2>\n<p>When a new subscription is created, Braintree plan allows you to bill the customer in a future date (instead of charging immediately). Unfortunately, we can&#8217;t support this feature since our eStore product was designed to charge the customer immediately.<\/p>\n<h2>Shortcode for Subscription Button<\/h2>\n<p>You need to embed the following shortcode in a WordPress Post\/Page to accept recurring payments via Braintree:<\/p>\n<pre>[wp_pg_eStore_subscription_button id=\"1\" gateway=\"braintree_subsc\"]\r\n<\/pre>\n<p>(Replace <strong>1<\/strong> with your actual eStore product ID)<\/p>\n<h2>Customizing the Look of the Braintree Subscription\u00c2\u00a0Button<\/h2>\n<p>WP eStore plugin allows you to customize all of your subscription\u00c2\u00a0buttons by using a custom button image of your choice. If you want to customize the look of your Braintree subscription\u00c2\u00a0button then <a href=\"https:\/\/support.tipsandtricks-hq.com\/forums\/topic\/how-to-change-the-buy-button-images-for-estore-and-simple-shopping-cart-plugins\" target=\"_blank\" rel=\"noopener noreferrer\">read this post<\/a>.<\/p>\n<h2><strong>Using Braintree Subscription Button with Fancy Display Template<\/strong><\/h2>\n<p>You can use the following shortcode to use a fancy display template with the Braintree subscription button:<\/p>\n<pre>[wp_eStore_fancy_display id=\"50\" type=\"3\" style=\"1\" gateway=\"braintree_subsc\"]\r\n<\/pre>\n<p>WP eStore product ID of the item is 50 in the above example. You will need to change that value to your actual product ID.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After you install the WP Payment Gateway Bundle plugin, you will need to configure some Braintree Gateway specific settings in the plugin which you will need to obtain from your Braintree merchant account. You can find the Braintree specific settings required by the plugin under the &#8220;Gateway Settings&#8221; tab when you go to the payment [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[48,68],"tags":[175,210,91,211,171],"class_list":{"0":"post-4345","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-payment-gateway","7":"category-wp-payment-gateway-bundle","8":"tag-braintree","9":"tag-braintree-integration","10":"tag-estore-addon-2","11":"tag-estore-and-braintree","12":"tag-subscription","13":"entry"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts\/4345"}],"collection":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/comments?post=4345"}],"version-history":[{"count":0,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts\/4345\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/media?parent=4345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/categories?post=4345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/tags?post=4345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}