API Update: Tiers, Offers, and Members endpoint documentation now available

We’ve pushed some big updates to our docs related to members :tada:

We’re excited to see how the community uses these new tools! If you have questions–well, you’re in the right place. Make a post or reply to this one :smile:

5 Likes

This is amazing! Thanks for exposing and sharing these new parts of the API. I’m keen to try out the members data since I’d like to share other content with my members on other platforms.

Ps. There’s a typo in the example response when creating a member, the email is missing an ‘e’ on jamie@ghost.org

1 Like

Can you suggest something to read about API management from the basis?

I’m not a dev but I self-host all my things and I like to learn.

Thanks :slight_smile:

Can you say a bit more about what you’re trying to do/learn?

The Content API is the easiest to work with, so I would start exploring with it:

1 Like

Thanks for tour time Ryan.

I’m looking for sync tiers, update members and link the accounts with initial survey like Ghost.org signup process (without theme selection of course).

I just need the ‘APIs for dummies’ book because I tried to delegate that flows and it don’t went OK so I want to learn first the basis.

Great. You’ll also want to check out the Admin API documentation, as well:

Thanks, I also start reading and watching that resources:

@RyanF According to the documentation, it is not very clear how to convert a free subscriber to a paid subscriber via API. I would like to make a subscription payment bypassing Stripe by calling the API directly, is it possible? Can I change the user’s payment status through the API?

@struchkov, I’m not sure I understand exactly what you’re trying to do.

Stripe collects the subscription payment, so bypassing it doesn’t make sense. Ghost doesn’t have the ability to take a payment without Stripe.

Did you want to mark the account as paid, without actually collecting payment? Take a look at complimentary subscriptions, if so. Those can be triggered with the API and might be a good option. Or please post more about what you’re trying to do.

@Cathy_Sarisky Unfortunately, I can’t connect Stripe. But I would like to be able to get paid subscribers in some other way. For me, the ideal way out would be to be able to independently manage paid subscribers, that is, to be able to specify via api that the subscriber is paid or free.

Ah. A recent client did something similar. He has a different payment provider, but uses a webhook to set up the user after payment. The problem with not connecting Stripe is that you only get access to a free tier. The client I worked with set his free tier up to be invitation only, and is effectively using it as a paid tier. But if you need both free and paid, the current API doesn’t seem to be able to do that without Stripe connected.

If you could connect Stripe, you could use the API to give users who pay elsewhere a complimentary subscription to a paid tier. Worth considering, if you’re technically able to connect to Stripe but don’t want to use it to process payments.

It’d be really nice to have the ability to create tiers in addition to the single free tier, without hooking up Stripe. Maybe someone has two free plans with different benefits, for example.

@Cathy_Sarisky It seems that this problem can be circumvented using tiers. However, if there is no connection to Stripe, they have to be created through the API, not the UI. Next, you can install it through the tiers API. When creating a post, it is possible to specify access by tiers. But there is a problem with closing comments for such paid subscribers, there is no way to restrict access to comments for such “paid” subscribers.

Also, it is not yet possible to set up discounts to Stripe connection. They could be used without Stripe, if all the necessary price data is given through the API, it would be possible to invoice through other payment systems.

Ah! I wasn’t aware that you could create a tier through the API without a Stripe connection. I’ll have to try that out.

What are you trying to accomplish with comments? I’m not sure I understand…

Assigning a tier to a subscriber does not make it paid, it still remains free, but with tier. Making comments available only to paid subscribers is usually a good idea of monztization, but it won’t work with tier. You can hide the entire block of comments on the presence of tedious tiers

Ah, I see. So I think I’d try settings comments to ‘all users’ in the membership settings, and then avoid the {{comments}} block and include the code it generates manually:

{{#if @member}} // Replace this with your tiers check instead.
<script defer src="https://cdn.jsdelivr.net/ghost/comments-ui@~0.12/umd/comments-ui.min.js" 
data-ghost-comments="{{@site.url}}" data-api="{{@site.url}}/ghost/api/content/" 
data-admin="{{@site.url}}/ghost/" data-key="contentAPI key" 
data-styles="https://cdn.jsdelivr.net/ghost/comments-ui@~0.12/umd/main.css" data-title="" data-count="false" data-post-id="{{id}}" data-sentry-dsn="" data-color-scheme="auto" data-avatar-saturation="60" data-accent-color="#000000" data-app-version="0.12" data-comments-enabled="all" data-publication="publication name" crossorigin="anonymous"></script>
{{/if}}