Skip to content

Create a Braintree buy (one-off)

Request

Uses the payment info captured by the braintree drop-in UI and encoded in the payment nonce to create a braintree customer and issue a one-off payment. When braintree responds successfully, the logged-in user will be 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:"lifetime-membership"
price_point_idstringrequired

Price Point Id/slug

Example:"gold-package"
payment_noncestringrequired

Payment method nonce from Braintree drop-in UI.

Example:"eyJ2ZXmsaW5nQW...(lots more random-looking characters)...dyZWmVubW8iOiJvZmYifQ=="
{ "product_id": "lifetime-membership", "price_point_id": "gold-package", "payment_nonce": "eyJ2ZXmsaW5nQW...(lots more random-looking characters)...dyZWmVubW8iOiJvZmYifQ==" }

Responses

OK

Headers
any
Bodyapplication/json
grant_idstring

New grant of product bundle to user.

Example:"aa583cb8-51d1-4bd9-9ec7-3a43796ef8e5"
Response
{ "grant_id": "aa583cb8-51d1-4bd9-9ec7-3a43796ef8e5" }