RCUR

Subscriptions

Apply discount to subscription

post https://rcur.app/api/v2/subscriptions/{subscriptionId}/discount

With a discount code, or a discount without a code. A subscription has at most one discount at a time.

Requires your API key as Authorization: Bearer <key>. See authentication.

Path parameters

  • subscriptionId string required

Request body

application/json

Either discount_id, or type, value and duration for a discount without a code. It applies from the next payment.

  • discount_id string

    Id of a discount code; counts towards its maximum

  • type string

    One of percentage fixed

  • value number

    A percentage, or an amount in the currency of the subscription

  • duration string

    One of once repeating forever

  • periods integer

    Required for repeating

Responses

201 Discount applied to the subscription SubscriptionDiscount object
  • discount_id string nullable

    The discount code it came from; null for a discount without a code

  • code string nullable
  • type string required

    One of percentage fixed

  • value string required
  • currency string nullable
  • duration string required

    One of once repeating forever

  • periods_total integer nullable
  • periods_used integer required
  • total_discounted string required
  • created_at string
404 Resource not found Error object
  • status integer required
  • error string required
422 Validation error ValidationError object
  • status integer required
  • error string required
  • fields object
Try it Send this request with your own API key

Requests run against the live data of the organization that owns the key. This POST request changes that data.