{"id":3407,"date":"2021-07-13T19:20:38","date_gmt":"2021-07-13T17:20:38","guid":{"rendered":"https:\/\/coincharge.os24.work\/deposit-xpub-key-with-btcpay-server\/"},"modified":"2021-07-27T21:34:52","modified_gmt":"2021-07-27T19:34:52","slug":"deposit-xpub-key-with-btcpay-server","status":"publish","type":"post","link":"https:\/\/coincharge.io\/en\/deposit-xpub-key-with-btcpay-server\/","title":{"rendered":"Deposit xPub Key with BTCPay Server"},"content":{"rendered":"<div class=\"wpb-content-wrapper\">[vc_row][vc_column][vc_row_inner][vc_column_inner width=&#8221;1\/2&#8243;][vc_column_text]\n<h2 class=\"section-title white\">xPub Public Bitcoin Address<\/h2>\n[\/vc_column_text][\/vc_column_inner][vc_column_inner width=&#8221;1\/2&#8243;][vc_single_image image=&#8221;3424&#8243; img_size=&#8221;full&#8221;][\/vc_column_inner][\/vc_row_inner][vc_row_inner][vc_column_inner][vc_column_text]\n<h2>Set up and administer BTCPay Shop<\/h2>\n[\/vc_column_text][\/vc_column_inner][\/vc_row_inner][vc_row_inner][vc_column_inner][vc_column_text]\n<h1>Deposit xPub key with the BTCPay server<\/h1>\n<p>Incoming payments are managed with the help of the BTCPayServer. A Bitcoin wallet is required to receive and send Bitcoin.<\/p>\n<p>To receive Bitcoin with the BTCPay server, you have the following options:<\/p>\n<ul>\n<li>You use an already existing external wallet in which you <a href=\"https:\/\/coincharge.io\/en\/deposit-xpub-key-with-btcpay-server\/\">import the xpubkey<\/a>.<\/li>\n<li>You create a new wallet on the BTCPay server, the <a href=\"https:\/\/coincharge.io\/en\/btcpay-wallet\/\">BTCPay Wallet.<\/a><\/li>\n<\/ul>\n<p>Wenn Sie Ihre Bitcoin mit der integrierten BTCPay Wallet verwalten m\u00f6chten, empfehlen wir Ihnen das Tutorial &#8220;<a href=\"https:\/\/coincharge.io\/en\/btcpay-wallet\/\">BTCPay Wallet<\/a>&#8220;. This tutorial explains how to create an xpub key from an existing wallet and store it on the BTCPay server. We describe this using the example of an Electrum Wallet.<\/p>\n<p>In case of an external Bitcoin wallet, the Bitcoin balance is not located in the BTCPayServer at any time, but always on the external wallet of the merchant.<\/p>\n<p>You need a Bitcoin wallet to generate xPub public keys (xpub Key \/ xpubKey).<\/p>\n<p>The xPub Key is deposited at BTCPayServer and the Private Key remains in the possession of the merchant.<\/p>\n<p>BTCPayServer is thus able to generate a public key for each transaction and credit the payments directly to the merchant&#8217;s wallet, without itself coming into possession of the Bitcoin.<\/p>\n<p>The wallet also does not have to be permanently online, but is physically separated from the BTCPay server. The wallet can be a hardware wallet like Coldcard or Ledger or a software wallet like Electrum that runs on your local computer.<\/p>\n<p>In our example, we use the Electrum Wallet, which runs on your own local computer.<\/p>\n<p>We explain how to set up an Electrum Wallet and <strong>generate the xPub Key<\/strong> in &#8220;<a href=\"https:\/\/coincharge.io\/en\/create-xpub-key-with-electrum-wallet\/\">Creating xPub Key with Electrum Wallet<\/a>&#8220;.[\/vc_column_text][\/vc_column_inner][\/vc_row_inner][vc_row_inner][vc_column_inner][vc_column_text]\n<h2>Export xPub Key at Electrum Wallet<\/h2>\n<p>Within Electrum Wallet, go to the Wallet section and then to Information. There you can find the xPub Key[\/vc_column_text][vc_single_image image=&#8221;3422&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221;][\/vc_column_inner][\/vc_row_inner][vc_row_inner][vc_column_inner][vc_column_text]\n<h2>Import xPub Key at BTCPay<\/h2>\n<p>In the Shop Administration under General Settings we go to the Derivation Scheme section[\/vc_column_text][vc_single_image image=&#8221;3420&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221;][vc_column_text]In the Shop Administration under General Settings we go to the Derivation Scheme section[\/vc_column_text][vc_single_image image=&#8221;3418&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221;][vc_column_text]In the Derivation Scheme field we enter the xPub key that we exported from Electrum under Wallet and Information.<\/p>\n<p>When inserting, the address type must also be appended.<\/p>\n<p>The address type depends on what your wallet generates or what you specified when creating the Electrum wallet. In Electrum Wallet it is specified as Script Type:[\/vc_column_text][vc_column_text]\n<table>\n<tbody>\n<tr>\n<td width=\"170\">bc1&#8230;..<\/td>\n<td width=\"233\">P2WPKH, Bech32 Address<\/td>\n<td width=\"201\"><\/td>\n<\/tr>\n<tr>\n<td width=\"170\">3&#8230;..<\/td>\n<td width=\"233\">P2SH-P2WPKH<\/td>\n<td width=\"201\">-[p2sh]<\/td>\n<\/tr>\n<tr>\n<td width=\"170\">1&#8230;..<\/td>\n<td width=\"233\">P2PKH<\/td>\n<td width=\"201\">-[legacy]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n[\/vc_column_text][vc_column_text]Depending on the script type, the addition, including hyphen and bracket, must be appended to the xpub key.<\/p>\n<p>If a Bech32 address is created with the script type p2wpkh, then an addition is not necessary.<\/p>\n<p><strong>ATTENTION:<\/strong><\/p>\n<p><strong>For traders, it is recommended that the SegWit (P2SH) format is used instead of the SegWit (Bech32) format.<\/strong><\/p>\n<p>Therefore we use the address type: <strong>p2wpkh-p2sh<\/strong><\/p>\n<p>Accordingly, we need to append the suffix <strong>-[p2sh]<\/strong>to the generated xPub key. Including the minus sign and the square bracket.[\/vc_column_text][vc_single_image image=&#8221;3414&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221;][vc_column_text]To check if the address was specified correctly, we check the Enabled box and click Continue.<\/p>\n<p>We get a listing of 10 Bitcoin addresses in total,[\/vc_column_text][vc_single_image image=&#8221;3412&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221;][vc_column_text]which must be identical to the addresses displayed in the Electrum Wallet under Address:[\/vc_column_text][vc_single_image image=&#8221;3410&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221;][vc_column_text]\n<div class=\"vc_row wpb_row vc_row-fluid\">\n<div class=\"wpb_column vc_column_container vc_col-sm-12\">\n<div class=\"vc_column-inner\">\n<div class=\"wpb_wrapper\">\n<div class=\"wpb_text_column wpb_content_element \">\n<div class=\"wpb_wrapper\">\n<p>From this address pool the Bitcoin addresses are taken, which are needed for receiving the Bitcoin payments.<\/p>\n<p>Since only 10 addresses are created in stock by Electrum by default, the Electrum Gap Limit must be increased.<\/p>\n<p>To do this, go to the Console menu item in the Electrum Wallet and enter the command:<\/p>\n<p><em><strong>wallet.change_gap_limit(100)<\/strong><\/em><\/p>\n<p>and presses Enter<\/p>\n<p>After that the command:<\/p>\n<p><em><strong> wallet.storage.write()<\/strong><\/em><\/p>\n<p>To check how high the gap limit is, issue the command:<\/p>\n<p><em><strong>wallet.gap_limit<\/strong><\/em><\/p>\n<p>one.<\/p>\n<p>If you want to read a detailed description about creating the Electrum Wallet and increasing the gap limit, you can find it at:<\/p>\n<p><a href=\"https:\/\/coincharge.io\/en\/create-xpub-key-with-electrum-wallet\/\">Create xPub Key with Electrum Wallet<\/a><\/p>\n<p>Any Bitcoin payments are automatically credited to your own Bitcoin wallet (here Electrum Wallet).<\/p>\n<p>You can check this by comparing the transactions displayed in BTCPay with the transactions in your wallet.<\/p>\n<p>You also have the sole right to dispose of the Bitcoin on your wallet. You can keep the Bitcoin or forward it to a Bitcoin exchange to exchange for Euros.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n[\/vc_column_text][\/vc_column_inner][\/vc_row_inner][\/vc_column][\/vc_row]\n<\/div>","protected":false},"excerpt":{"rendered":"<p>[vc_row][vc_column][vc_row_inner][vc_column_inner width=&#8221;1\/2&#8243;][vc_column_text] xPub Public Bitcoin Address [\/vc_column_text][\/vc_column_inner][vc_column_inner width=&#8221;1\/2&#8243;][vc_single_image image=&#8221;3424&#8243; img_size=&#8221;full&#8221;][\/vc_column_inner][\/vc_row_inner][vc_row_inner][vc_column_inner][vc_column_text] Set up and administer BTCPay Shop [\/vc_column_text][\/vc_column_inner][\/vc_row_inner][vc_row_inner][vc_column_inner][vc_column_text] Deposit xPub key [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[52],"tags":[],"class_list":["post-3407","post","type-post","status-publish","format-standard","hentry","category-btcpay-en"],"_links":{"self":[{"href":"https:\/\/coincharge.io\/en\/wp-json\/wp\/v2\/posts\/3407","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/coincharge.io\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coincharge.io\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coincharge.io\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/coincharge.io\/en\/wp-json\/wp\/v2\/comments?post=3407"}],"version-history":[{"count":18,"href":"https:\/\/coincharge.io\/en\/wp-json\/wp\/v2\/posts\/3407\/revisions"}],"predecessor-version":[{"id":5330,"href":"https:\/\/coincharge.io\/en\/wp-json\/wp\/v2\/posts\/3407\/revisions\/5330"}],"wp:attachment":[{"href":"https:\/\/coincharge.io\/en\/wp-json\/wp\/v2\/media?parent=3407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coincharge.io\/en\/wp-json\/wp\/v2\/categories?post=3407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coincharge.io\/en\/wp-json\/wp\/v2\/tags?post=3407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}