Deploy a custom build to production, to integrate Revin (Stripe Tax Shield)

Hi,

I’m trying to use Revin with Ghost to handle payments. It seems a few changes to Ghost’s source code is needed for that to work.

I explain my problem in detail below:

What is Revin?
A Stripe-based Merchant of Records service, who remit taxes worldwide.
They assign a dedicated Stripe account to each customer, perfect for Ghost.
You get Stripe keys, access to dashboard, API, etc.

Reason for fork.
Building a bridge between Ghost and Revin so that they can talk to each other.

Changes in fork.
Configure the Ghost Stripe object to pass an additional parameter.
To achieve that, the following file needs some tweaks …/ghost/stripe/lib/StripeAPI.js (github)
This ensures Revin can function as an intermediary between Ghost and Stripe.

Is a fork even necessary?
Any easier method to make the above changes after vanilla Ghost has been installed?
Maybe using npm or yarn?

Server specifications.

  • DigitalOcean Droplet
  • Ubuntu 20.04 LTS x64
More droplet specs.

$7/month droplet
1 GB RAM / 1 Intel CPU
25 GB NVMe SSD
1 TB Bandwidth

Why yet another thread on forks?

  • Ghost is now a monorepo, previous build instructions may not work (source).
  • Unlike previous threads on forks, files in ghost/core/ aren’t modified in this case.
  • Still no official documentation on deploying custom builds for production. Existing guides only reference local installations.

Any help is appreciated. Feel free to correct me, if any of my above assumptions are wrong. Let me know if I missed any existing documentation on this.

Best,
Sayan.

Hey @blueinversion, did you figure this out eventually?

I’m considering also using Revin as Ghost already has an integration with Stripe. However, ideally Ghost would be able to work with Paddle or Lemon Squeezy as that would completely take away the need for using Stripe. It seems like any solution would need changing Ghost’s source code.

@staff are there any plans for adding more payment options, apart from Stripe? Especially for EU-based creators, VAT remittance is a huge hassle. It would make monetization much easier if we could use a merchant of record like Paddle, Lemon Squeezy, or Gumroad to do that for us.

Hi @Ramses

Yes, I have it figured out. But I have decided to just go with Patreon instead.

Here are my reasons, and trust me when I say I have done enough research on this:

Disclaimer: Reasons specific to my use case. Ghost might be the perfect fit for your use case. Ghost is also improving rapidly. So these problems might get solved one day. I think it is very important that Ghost exists sustainably and self-hosting remains an option.

1. Video hosting

My membership is video-first. Video streaming is a hard and expensive problem. You need something like Vimeo to do it ad-free and at high enough quality.

So far both Ghost and Patreon used the same procedure to achieve this. Embed Vimeo videos. That costs a lot of money if you are serving above 2 TB bandwidth per month. Even below that the fixed costs are pretty steep.

Vimeo, after their IPO, has seemed to abandon their initial focus on individual creators and now acts as a B2B video hosting solution. So once you cross the 2TB bandwidth, you will be charged 10x the price (not exaggerating). This has already happened. Here’s proof.

Recently Patreon added video at no extra cost for now, so now the playing field isn’t level anymore. They will perhaps take a slightly bigger cut after 2023 to compensate but I’m okay with that.

2. Email newsletters

I am not comfortable with the monopoly of Mailgun on Ghost’s newsletter service. The premise of self-hosting and decentralization is lost there. I have written a more comprehensive explanation on this here.

Mailgun randomly flags new accounts, support is bad and they are not transparent about their Flex (pay-as-you-go) plan being still available.

So even if you just want to host a paid newsletter, it is not straight forward.

Unlike for video streaming, there are better alternatives for this like SendGrid.

You can use Mailchimp or the likes instead and just use Ghost for the membership login part of it. But then you are paying for Mailchimp and also Zapier which are both pretty expensive after a point. Also you lose much of the native Ghost newsletter features which made it appealing in the first place.

3. Sales Tax/VAT

This isn’t unique to Ghost, all platforms that use Stripe directly have this blindspot.

Unless you have an accountant, even Stripe Tax won’t save you. On top of that, Ghost doesn’t even work with Stripe Tax yet.

You will have to absorb all the sales tax before you pay the payment processing fee. You won’t be left with much after currency conversion fees, specially if your customer is EU-based.

Also, don’t forget about the accountant’s own fees.

This doesn’t stop there, sales tax varies by state and by type of product you sell. Here is a helpful guide.

All this to say, using a Merchant of Record is far better. Like you mentioned, Paddle or Gumroad.

You can actually use Gumroad with Ghost already, only thing that you need to do manually would be to delete the members who cancel their plans. For some use cases that won’t be a deal breaker. Oh, and you need to pay Zapier’s $20/m if you are running a serious membership.

I tried cutting out Zapier by manually writing a python-flask script to run serverless on GCP and it works. So if you are a programmer you can try that, both Gumroad and Ghost has solid APIs. You just need to add labels to the cancelled members and remove them manually later, because Ghost won’t let you delete them via the API.

I prefer Gumroad because Paddle is for SaaS - they won’t allow you to sell access to a community for example. But Gumroad has vendor lock-in. So why not Patreon after all?

One thing unique to my country is that, if I sell directly via Stripe, all software sales need to be “regularized” and I need to submit shit ton of forms to do that, which have their own fees. Note, this needs to be done per sale, not on the bulk payout each month, which makes the profit margin even thinner.

Revin solves this to some extent, but I couldn’t bet the entire membership on a brand new company. Moreover they haven’t shipped what I wanted yet. So I had to take a decision to avoid further delays in launch.

If you are from a place where sales tax is super simple, Stripe is fully supported and you price your membership high enough, you might be able to handle this, but it doesn’t work in my case.

Conclusion

So I have decided to use Patreon for my paid membership. And for now I will keep my newsletter free for all, using Substack.

This doesn’t mean I don’t like Ghost. I’m comfortable using Substack or Patreon because Ghost gives me the piece of mind that I can always opt-out and switch platforms.

Substack to Ghost is super easy. Patreon not so much, but possible.

I finally want to emphasize, if you have the money and want to send free newsletters only, just use Ghost (Pro). That takes away most of the headaches.

I have plans to move my newsletter over to Ghost (Pro) in the future, once I have enough profits to justify that. I love Ghost’s philosophy in business and design, so I will continue to support the project even if I am not actively using it for my business at the moment.

And who knows, maybe they will come up with even better solutions very soon?