# Accept Bitcoin on Your Ghost Blog Today

Introducing BTCPay Server for Ghost a simple way to accept payments from your customers via Bitcoin directly on your Ghost blog (opens new window). Monetizing your content just got easier. With this integration, you have full control over your earningsno middlemen, no extra charges.

# What can I do with the BTCPay-Ghost integration?

  1. Accept Donations Allow readers support your work with donations in Bitcoin.

  2. Paywall Content Restrict access to premium articles, videos, or other content, unlocking it through Bitcoin payments.

  3. Tiered Membership Creation and Subscriptions - Offer exclusive content to members and subscribers in a tier.

Ready to take your blog to the next level? Set up BTCPay Server and start accepting Bitcoin payments today

# Prerequisites:

Before diving into the setup process, ensure you have the following:

# Setting up BTCPay Server with Ghost

  1. Login to your BTCPay Server instance, Plugins > Manage Plugins

  2. Search for and install BTCPay Server plugin for Ghost

  3. Once installed you should see Ghost, included in the side nav of your instance under plugins section

  4. Log in to your Ghost Admin Panel on a new tab

  5. Navigate to Settings (cogwheel at the bottom), in section "Advanced" click on "Integrations". Click "Add custom integration" and name it e.g "BTCPay Server"

    BTCPay Server Ghost img 1
    BTCPay Server Ghost img 2

  6. A modal will show the required Ghost credentials needed by the plugin

    BTCPay Server Ghost img 3
  7. Click on "Save" to save your credentials, you can also put in a description before saving it.

  8. Open up your BTCPay Server instance, make sure you selected the right store and open the Ghost plugin page.

  9. Copy your API Url (without the https://), Content API key, and Admin API Key from Ghost credential page into their respective input fields in your plugin page.

  10. For the Webhook Secret you can enter a secret on your own or if left empty it will auto-generate one. This will only be used for the membership functionality.

  11. Now save the credentials details on BTCPay Server Ghost Plugin.

BTCPay Server Ghost img 5
BTCPay Server Ghost img 6
  1. While on the plugin page, copy the script snippet from the bottom of the page. Open your Ghost admin portal: Settings >> Code Injection, open code injection and under site header paste the script url, save and close
BTCPay Server Ghost img 60
BTCPay Server Ghost img 36

Congratulations on successfully installing the plugin.

In case you encountered any issue you can report them here (opens new window) (prefix "Ghost" to title of the issue)

# Receiving Donations on Ghost through BTCPay Server

  1. Go to your BTCPay Server Ghost plugin, scroll down the page, you'd see "Donation Url", copy the URL.

  2. Open your ghost admin page where you want to receive donations. You may be open to receiving donations on every content page of your Ghost blog, or on a single page dedicated to donations. Which ever you choose, accepting donations is pretty straightforward. Go to the editor of your donation page (or any page). Add a new button (by clicking the (+) sign) with a title of your choice e.g Buy me a coffee in Bitcoin, for the Bitcoin URL, paste the Donation URL you copied, and paste it there. Save and publish your page.

  3. When you go to the URL of the page, you should see the button now, click on the button, and a QR code would be displayed on the screen. Users can then scan this QR and support you with any amount they want to.

  4. If you check your BTCPay Server invoice, you should see your new donation, received in your wallet. Voila!!!

BTCPay Server Ghost img 7
BTCPay Server Ghost img 8
BTCPay Server Ghost img 9
BTCPay Server Ghost img 10
BTCPay Server Ghost img 11

# Payment Paywall on Ghost

With BTCPay Server - Ghost plugin, you can now hide premium content on your blog post until the user makes a successful payment. This guide explains how to implement a Bitcoin paywall using BTCPay Server.

Please note that this is not fully protecting your content but just hiding it until payment is made. Technical users can bypass this paywall by inspecting the page source.

  1. Ensure you have copied the script url into the site header. If you haven't, go to your BTCPay Server Ghost plugin, scroll down the page, copy the paywall script url.

  2. Head over to your Ghost admin portal, Settings >> Code Injection >> Add custom code, click on the "Open" button. BTCPay Server Ghost img 36

  3. Under the site header paste the script url, click on "save" and close the modal. BTCPay Server Ghost img 37

  4. Now that you have the script injected, head over to the post/page editor where you want to include your paywall. Click on the plus icon to add an item, select HTML, and in the input field paste the following code BTCPay Server Ghost img 38

    <btcpay-gated-content data-price="0">
        <h2>Exclusive Content </h2>
        <p>You have unlocked this premium content </p>
        <button>Enjoy!</button>
    </btcpay-gated-content>

These is a custom HTML tag. You can customize your premium content using HTML tags, just ensure it is wrapped inside the custom custom tag ()

Finally replace the data-price value from 0 to whatever amount you want to sell your content for i.e. replace the 0 in data-price="2" with any amount.

P.S.: The currency associated with the amount is the default currency set for your BTCPay Server store

P.S: Also note that as for now, you can only customize one paywall per page.

If you are a technical person and good with styling and customization, further customization can be done to the elements.

BTCPay Server Ghost img 39
BTCPay Server Ghost img 39a

In your editor the premium content isn't hidden, allowing full display of your page. Not to worry as it is hidden in the post/page URL.

Once done, save your page/post, open the url to the post and proceed to make a payment.

BTCPay Server Ghost img 40
BTCPay Server Ghost img 41
BTCPay Server Ghost img 42
BTCPay Server Ghost img 43
BTCPay Server Ghost img 44

One final note, this content would be available to the user, while his browser data is still on, and would stop being once the data is cleared. It would be good to inform users to save the content once revealed.

# Membership and subscription BTCPay Server

Ghost doesnt provide a direct way to integrate custom payment providers. Instead, it relies on a private API for payment processing, which is currently built around Stripe as the default processor.

Why does this matter? While BTCPay Server can handle subscriptions and send notifications to the users, it cannot automatically deactivate or delete members in Ghost once a subscription ends.

This means subscription management remains the admins responsibility. However, you can configure the Ghost plugin to send automated notifications to the customer when a subscription is nearing expiration, allowing for timely action.

# Setting up membership subscription via BTCPay Server

  1. Head to your BTCPay Server Ghost plugin, scroll down on the page, copy the 'Membership subscription Url'.

    BTCPay Server Ghost img 21
  2. Head over to your Ghost admin portal, click on Settings >> Portal Settings, click on the 'Customize' button.

    BTCPay Server Ghost img 22
    BTCPay Server Ghost img 23
  3. Edit the field at 'Display notice at signup' in the right sidebar and to include instructions on how to signup with Bitcoin as payment option, directing users to use the link. For instance: "Sign up with Bitcoin using this link". Important: Mark "this link" with your mouse and add a link with the URL copied from the plugin. BTCPay Server Ghost img 24

  4. Save the changes and the close to the portal. You can navigate to the signup page to view your changes. It should look similar to this:
    Membership_signup.png

  5. Before we proceed to testing it out, we need to configure webhooks for our integrations, these webhook would alert the plugin for when member's data are updated or deleted.

  6. Go to your Ghost plugin view in BTCPay Server, and note down/copy the 'Webhook Secret' and 'Webhook Url' values.

  7. In your Ghost admin portal, navigate to Settings >> Integrations. Select the custom integration you earlier created.

  8. Click on 'Add webhook'. Enter a name for the webhook, for the event, select 'Member Updated', paste the URL copied into the 'Target URL' and secret into 'Secret' fields. Click on "Add". BTCPay Server Ghost img 25

  9. Create another webhook, this time the event would be 'Member Deleted'. Use the same URL and Secret for the 'Target URL' and 'Secret' and click on "Add" again. BTCPay Server Ghost img 26

  10. Once you can confirm that both your webhooks has been populated, click on 'Save' and close the modal. BTCPay Server Ghost img 27

# Testing the membership subscription

  1. Users can then proceed to create membership and pay via BTCPay Server. When a user clicks on the link, he is redirected to a page where he can select his tier. Membership_signup.png

  2. The user is prompted to enter their name and email, and also prompted to select their tier to which they need to subscribe to. BTCPay Server Ghost img 28

  3. Once he is done filling his details, he then clicks on subscribe which would show an invoice containing his first payment to subscribe to being a member.

  4. Once the invoice has been paid, a member account is created by the user on the Ghost platform, the user can then proceed to log in.

# Managing Members and Subscriptions

  1. The admin can view all subscribed members by heading over to the BTCPay Server >> Ghost plugin >> Ghost members. BTCPay Server Ghost img 29

  2. The admin can see all members, members with active subscription, members whose subscription would soon expire, and members whose subscription has expired. BTCPay Server Ghost img 30

  3. A member subscription is tagged as 'soon to expire' when the subscription ends a few days away from the end date. The days specification can be configured in the Settings. BTCPay Server Ghost img 31

  4. Once a member subscription is expired you can see that in the "Expired Subscription" tab. BTCPay Server Ghost img 32

  5. Once a member subscription is about to expire, there is a green notification that appears on the Ghost plugin side navigation. This is here to notify the admin. The admin can then proceed to notify the members, before the member's subscription expires. BTCPay Server Ghost img 33

  6. The admin can also view all payments a particular associated with the membership by clicking on the "View" link. Ghost_Members_Payments_List.png

# Ghost plugin settings

As earlier mentioned, an admin can configure settings for his Ghost plugin.

  • The admin can enable or disable automated email reminders for expiring and expired subscriptions. This would require the admin to have configured email SMTP in admin settings.
  • The admin can also set the time frame to begin notification for member subscription. BTCPay Server Ghost img 34

# Uninstalling

You can discontinue the plugin by clicking on the "Stop Ghost calls and clear credentials" button, and also deleting the custom integration that you created.

# Contribute

BTCPay Server is built and maintained entirely by contributors around the internet. We welcome and appreciate new contributions.

Do you notice any errors or bug? are you having issues with using the plugin? would you like to request a feature? or are you generally looking to support the project and plugin please create an issue (opens new window)

Feel free to join our support channel over at https://chat.btcpayserver.org/ (opens new window) or https://t.me/btcpayserver (opens new window) if you need help or have any further questions.