Skip to main content
POST
/
subscription
Setup Subscription
curl --request POST \
  --url https://api.dontdie.com/subscription \
  --header 'Authorization: Bearer <token>' \
  --header 'x-dd-client-id: <api-key>'
{
  "clientSecret": "seti_1234567890_secret_abcdefghijklmnopqrstuvwxyz",
  "appliedPromotion": {
    "code": "SUMMER2024",
    "couponId": "coupon_1234567890",
    "percentOff": 20,
    "amountOff": 1000,
    "currency": "usd"
  }
}

Authorizations

Authorization
string
header
required

Enter your Bearer token in the format: Bearer

x-dd-client-id
string
header
required

Your API client ID for the request

Query Parameters

subscriptionId
string

The subscription ID to initialize. If not provided, defaults to BLUEPRINT_BIOMARKERS for Blueprint clients, otherwise DONT_DIE_PREMIUM

promoCode
string

Optional promo code to apply to the subscription

Response

OK

clientSecret
string

The Stripe client secret for payment processing. Will be an empty string if the subscription is free (100% discount coupon applied), in which case no payment confirmation is required.

Example:

"seti_1234567890_secret_abcdefghijklmnopqrstuvwxyz"

appliedPromotion
object

The promotion details if a promo code was applied. Will be null if no promo code was provided or applied.