OnlyFans API
FanslySubscription Discounts

Create Subscription Discount

Create a new subscription discount (gift link).

POST
/api/fansly/{fanslyAccount}/subscription-discounts
AuthorizationBearer <token>

Get your API Key from OnlyFansAPI Console - https://app.onlyfansapi.com/api-keys

In: header

Path Parameters

fanslyAccount*string

The Fansly Account ID

Request Body

application/json

plan_id*string

The subscription plan ID this discount renews for. Plan IDs come from the List Subscription Tiers endpoint (tiers[].plans[].id).

price*integer

Discounted price in cents (e.g. 5000 = $5.00).

duration*integer

Duration in days until the subscriber rebills at the full subscription price.

label?string

Optional internal label for the discount.

max_uses?integer

Maximum number of times the discount can be claimed. Default = 100.

new_subscribers_only?integer

Set to 1 to exclude users who have already claimed a discount for this plan, 0 to allow everyone. Default = 1.

starts_at?integer

Optional start time as a UTC epoch in milliseconds. 0 (default) means active immediately.

ends_at?integer

Optional end time as a UTC epoch in milliseconds. 0 (default) means no expiry.

Response Body

application/json

curl -X POST "https://app.onlyfansapi.com/api/fansly/fansly_acct_XXXXXXXXXXXXXXX/subscription-discounts" \  -H "Content-Type: application/json" \  -d '{    "plan_id": "843584256495083520",    "price": 5000,    "duration": 7  }'
{
  "data": {
    "id": "900000000000000003",
    "type": 1,
    "label": "",
    "planId": "700000000000000010",
    "accountId": "800000000000000001",
    "price": 5000,
    "paymentMethodRequired": 0,
    "duration": 7,
    "maxUses": 100,
    "newSubscribersOnly": 1,
    "startsAt": 0,
    "endsAt": 0,
    "status": 1,
    "originalPrice": 5000,
    "code": "OTAwMDAwMDAwMDAwMDAwMDAzOjE6MTpiMzAxMjJiODZk"
  },
  "_meta": {
    "_credits": {
      "used": 1,
      "balance": 10055789,
      "note": "Always"
    },
    "_cache": {
      "is_cached": false,
      "note": "Cache disabled for this endpoint"
    },
    "_rate_limits": {
      "limit_minute": 5000,
      "limit_day": null,
      "remaining_minute": 4999,
      "remaining_day": null,
      "notice": "We have decided to remove our daily rate limits. Please remove any references to these in your integrations."
    }
  }
}