Skip to content

Start the Braintree subscription (Deprecated)

Request

** (Deprecated - use the "/zephr/subscribe" operation intead)** Uses the payment info captured by the braintree drop-in UI and encoded in the payment nonce to create a braintree customer in with a recurring payment. When braintree responds successfully, the logged-in user will be temporarily granted all entitlements in the product's associated bundle.

Security
CookieBlaizeSession or JwtQuery or JwtHeaderXBlaizeJwt or JwtHeaderXZephrJwt or JwtBearer or JwtCookie
Headers
cookiestring

The session cookie.

Example:`blaize_session=...` (string)
Bodyapplication/json
product_idstringrequired

Product ID/slug

Example:"premium-access-monthly-recurring"
plan_idstring
discount_codestring
payment_noncestringrequired

Payment method nonce from Braintree drop-in UI.

Example:"eyJ2ZXmsaW5nQW...(lots more random-looking characters)...dyZWmVubW8iOiJvZmYifQ=="
skip_trial_periodboolean

Whether or not to skip any trial period that may be associated with this subscription. This should be null or not set to use the configured trial period.

Example:true
start_datestring

ISO 8601 date format which determines when the subscription will start. When the attribute is passed, the value must be in the future. Otherwise, the subscription is expected to start immediately.

Example:"2021-01-01T00:00:00Z"
{ "product_id": "premium-access-monthly-recurring", "payment_nonce": "eyJ2ZXmsaW5nQW...(lots more random-looking characters)...dyZWmVubW8iOiJvZmYifQ==", "skip_trial_period": true, "start_date": "2021-01-01T00:00:00Z" }

Responses

OK

Headers
any
Bodyapplication/json
grant_idstring

New grant of product bundle to user.

Example:"33d576c7-d036-40e7-8141-8a91998a5c79"
Response
{ "grant_id": "33d576c7-d036-40e7-8141-8a91998a5c79" }