v1

latestOpenAPI 3.0.02026-08-0610682246.0 KB
Braintree Payments

Start the Braintree subscription (Deprecated)

** (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.

post/blaize/payment/braintree/subscribe

Headers

cookiestring

The session cookie.

Request body

product_idstring required

Product ID/slug

plan_idstring
discount_codestring
payment_noncestring required

Payment method nonce from Braintree drop-in UI.

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.

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 request

{
  "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"
}

Response

OK

grant_idstring

New grant of product bundle to user.

Example response

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