Braintree Payments

Create a Braintree buy (one-off)

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.

post/blaize/payment/braintree/buy

Request

  • Base URL: https://demo-site
  • URL: https://demo-site/blaize/payment/braintree/buy
  • Auth: one of:
    • API key in cookie blaize_session
    • API key in query parameter jwt
    • API key in header x-blaize-jwt
    • API key in header x-zephr-jwt
    • HTTP bearer
    • API key in cookie blaize_jwt

Headers

cookiestring

The session cookie.

Request body

product_idstring required

Product Id/slug

price_point_idstring required

Price Point Id/slug

payment_noncestring required

Payment method nonce from Braintree drop-in UI.

Example request

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

Response

OK

grant_idstring

New grant of product bundle to user.

Example response

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

Changes

No recorded changes to this operation across all 2 revisions of this API.