Add WP BTCPayWall by Shortcode
In this tutorial we will explain how to integrate the various applications into your WordPress site via shortcode.
If you don’t use a WordPress editor like Gutenberg, WPBakery or Elementor, then the integration via shortcode is recommended. This way you can also use the WordPress BTCPayWall if you use another WordPress editor to design your WordPress pages.
The area protected behind the paywall is embedded between a Start and an End command.
The individual commands are opened and closed respectively with a square bracket.
Inside the square brackets are the instructions on how the WP BTCPayWall should act.
Below we describe the different commands, depending on the type of content.

Pay-per-post / Pay per single Blog Post
For the content to be displayed behind the paywall, the btcpw-start_content command is used. The abbreviation btcpw stands for BTCPayWall.
In addition, the paywall is activated by activating the pay_block with the addition true or deactivating it with false.
At the end of the blog post the protected area is closed with the command btcpw_end_content.
Any text that comes after that will be displayed normally again.
The individual commands including the square brackets can be seen on the right.

Every attribute is optional. Omitted attributes will use default values. Attribute
which controls paywall is pay_block.
In order to protect your content with paywall you need to set pay_block to true. Currency and duration_type are getting
validated.
This means that you don’t need to worry if you have set the proper value.
When you enter unsupported currency or duration_type, the default values for these fields won’t be overridden.
Default values for attributes (pay-per-post):
- pay_block = false
- price = amount defined in general settings
- currency = currency defined in general settings
- duration = duration defined in general settings
- duration_type = duration_type defined in general settings
[btcpw_start_content pay_block=(‘true’|’false’) price=(‘number’) currency=(‘BTC’|’SATS’|’EUR’|’USD’) duration=(‘number’) duration_type=(‘minute’|’hour’|’day’|’week’|’month’|’year’|’onetime’|’unlimited’)]

The image on the left shows how a blog post or page should look when the shortcode is embedded in the text.
If you want to see what the finished page looks like from a user’s point of view and give it a try, go to the page:
Pay-per-Post Demo Page
Pay-per-view / Pay per single Video
With Pay-per-View you can sell videos through the WP BTCPayWall.
The user sees a preview for each video, consisting of a caption, a description text and an image. In addition, the details of the video’s price are displayed.
After successful payment, the video is displayed and played on the website.
The video, which is played after successful payment, can be on your own server, but also on an external server.


For example, you can show videos that are stored on YouTube or Vimeo.
In order not to offer these videos to the general public for free, you can set the video to private. Then the video will not be shown in the search.
Only those who know the exact internet address can access this video.
If you want to offer a Vimeo or YouTube video for a fee, set it to private and store this secret Internet address as a paywall url.
If you want to protect a video with a paywall, the start of the paywall area is activated with the command: btcpw_start_video pay_view_block=”true”.
Within the start command further fields can be defined, which will be shown to the user as a preview.
The following commands are available for this purpose:
– title – a headline as text
– description – a video description as text
– preview – a preview image.
For Title and Description a text can be written. For the preview image you have to provide the link where the image is stored.
Then the Internet address where the video is stored and from where it should be played is specified.
Finally you close the paywall area with the command btcpw_end_video.
In the adjacent image you can see an example of how the video dancing-queen.mp4 is stored on your own server and protected by the paywall.

Every attribute is optional. Omitted attributes will use default values.
The attribute which controls paywall is pay_view_block.
In order to protect your video with paywall you need to set pay_view_block to true.
Currency and duration_type are getting validated. This means that you don’t need to worry if you have set the proper value.
When you enter unsupported currency or duration_type, the default values for these fields won’t be overridden.
Title, description, and preview are attributes that are related to a protected video.
Default values for attributes pay-per-view / Video content
- pay_view_block = false
- title = ‘Untitled’
- description = ‘No description’
- preview = default picture
- price = amount defined in general settings
- currency = currency defined in general settings
- duration = duration defined in general settings
- duration_type = duration_type defined in general settings
[btcpw_start_video pay_view_block=(‘true’|’false’) title=(‘Title for video’) description=(‘Video description’) preview=(‘Link to a preview image for video’) price=(‘number’) currency=(‘BTC’|’SATS’|’EUR’|’USD’) duration=(‘number’) duration_type=
(‘minute’|’hour’|’day’|’week’|’month’|’year’|’onetime’|’unlimited’)]
Video Catalog
A separate page must be created for each video. This page then contains the preview and the payment functions. After the successful payment, the video will be played on this page as well.
To create an overview page for all offered videos, there is the video catalog function.
One creates an overview page, on which with the command btcpw_video_catalog the preview pictures of the offered videos are listed.
For each video preview the command must be used.
In our example opposite, we have created it for three videos.
If you want to see what the finished page looks like from a user’s point of view and give it a try, go to the page:
Pay-per-View Video Demo Page
Pay-per-file / Pay per single File or per Download
With the pay-per-file function, individual files can be sold as downloads.
– You have written your own software that you want to offer to your customers for download?
– You have written a manual, a handbook or an eBook and want to sell it as a PDF file?
– You are a photographer and want to market your pictures yourself?
– You have composed your own piece of music or produced a video, which you want to offer to your fans as an mp4 file for download.
The pay-per-file function is like a digital content store. You can sell any file format on the Internet and offer it to your customers for download.
If you want to protect a file with a paywall, the start of the paywall area is activated with the command: btcpw_file pay_file_block=‘true’
Within the start command further fields can be defined, which will be shown to the user as a preview.
The following commands are available for this purpose:
- currency=’SATS’
- btc_format=’BTC’
- file=’https://btcpaywall.com/wp-content/uploads/2021/05/SEPA-Lastschrift.pdf’
- title=’SEPA direct debit for Internet commerce (german version)’
- description=‘A german Language guide for SEPA direct debit’
- price=’125′
- duration=’2′
- duration_type=’hour’
For Title and Description a text can be written. For the preview image you have to provide the link where the image is stored.
Then the Internet address where the file is stored and from where it should be played is specified.
In the adjacent image you can see an example of how the file SEPA-Lastschrift.pdf is stored on your own server and protected by the paywall.
File attribute is mandatory for paywall. If this attribute is omitted, a paywall
won’t be set.
The other attributes are optional, and if not set, values from the
general settings will be used.
It’s recomended to upload a file to Media Library and use that link for a file. In order to protect your content with paywall you
need to set pay_file_block to true.
Btc_format is used to control price format within paywall. This attribute gets applied only if SATS is selected as currency.
For example, if currency is set to SATS, price to 10 and the btc_format is set to SATS, the text within paywall will be: ‘For 10 SATS…’. In contrary, if btc_format is set to BTC, the text would be: ‘For 0.0000001 BTC…’. Currency and duration_type are getting validated.
This means that you don’t need to worry if you have set the proper value. When you enter unsupported currency or duration_type, the default values for these fields won’t be overriden.
Default values for attributes pay-per-file Download
- pay_file_block = false
- title = ‘Untitled’
- description = ‘No description’
- preview = default picture
- file = ”
- price = amount defined in general settings
- currency = currency defined in general settings
- btc_format = btc_format defined in general settings
- duration = duration defined in general settings
- duration_type = duration_type defined in general settings
[btcpw_file pay_file_block=(‘true’|’false’) file=(‘file url’) title=(‘Title for file’) description=(‘File description’) preview=(‘Link to a preview image for file’) price= (‘number’) currency=(‘SATS’|’EUR’|’USD’) btc_format=(‘BTC’|’SATS’) duration=(‘number’) duration_type=(‘minute’|’hour’|’day’|’week’|’month’|’year’|’onetime’|’unlimited’)]
If you want to see what the finished page looks like from a user’s point of view and give it a try, go to the page:
Leave a Reply
Your email is safe with us.