Memberships API

Design

The Memberships API is designed for customers who wish to charge their members a monthly or yearly fee and have Staylists collect the money in the same billing run as we collect any commission.

Request

Make a POST or PATCH request to the following endpoint, replacing {id} with the Staylist property ID for which you wish to create or update a membership

https://app.staylists.com/api/v3/listings/{id}/membership

(Strictly speaking, you should make a POST request when creating a membership, and a PATCH when updating a membership. But as a listing can only have one membership, we thought we’d make it easier for you. And thus either verb will work.)

Parameters

fee_cents (integer, required)

The fee you would like to charge in the currency’s lowest denomination. So to charge £15.00, send us 1500

currency (string, defaults to “GBP”)

The three-letter ISO code of the currency in which you wish to charge the membership fee.

billing_frequency (enumerated string, defaults to “monthly”)

Accepts only "monthly" or "yearly" and is self explanatory.

status (enumerated string, defaults to “active”)

Accepts only "active" or "inactive". An inactive Membership will not be charged during the monthly invoicing run.

start_date (string, defaults to current date)

If you wish to start invoicing for Membership in the future, you can set a start date for the Membership Fees to kick in. The first Membership Fee will be charged at the end of the start date month.

Authentication

This request requires authentication

Response

When a Membership is created or updated

{
    "object": "Membership",
    "data": {
        "id": 12345
        "fee_cents": 1000,
        "currency": "GBP",
        "billing_frequency": "monthly",
        "start_date": "2021-04-14",
        "status": "active"
    }
}

When the Membership could not be saved

You’ll get a 400 bad request with an explanation of why. (Likely you didn’t include the fee_cents, or have some other malformed data.)

When a Listing for the Property ID is not found

You’ll get an empty json body {} and a 404 response code.