Skip to content

List the Braintree subscriptions of a user

Request

Lists all Braintree subscriptions for the logged-in user.

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

The session cookie.

Example:`blaize_session=...` (string)
cURL
curl -i -X GET \
  https://demo-site/blaize/payment/braintree/subscriptions \
  -H 'cookie: `blaize_session=...` (string)' \
  -b '`blaize_session=...` (string)'

Responses

OK

Headers
any
Bodyapplication/json
managed-bystringrequired

The name of payment provider capitalised.

Example:"Braintree"
endsstring, (date-time)

ISO-8601 formatted time at which the subscription was canceled. This field will be omitted if the subscription is not canceled.

Example:"2021-05-17T04:31:33Z"
external-idstringrequired

The ID for this subscription in Braintree.

Example:"abc123"
next-billing-timestring, (date-time)required

ISO-8601 formatted time at which the subscription will next be billed.

Example:"2021-05-17T04:31:33Z"
blaize-productobject(braintree-subscription-product)required
transaction-historyArray of objectsrequired
subscription-statestringrequired

The subscription state, as acquired from Braintree.

Enum:"Active""Canceled""Expired""Past Due""Pending""Unrecognized"
paid_through_datestring, (date-time)

ISO-8601 formatted time up to which the subscription has been paid for. This will be null if the subscription has not yet been paid for.

Example:"2021-05-17T04:31:33Z"
plan_idstringrequired

The Braintree plan ID

Example:"plan-123"
plan_namestringrequired

The Braintree plan name

Example:"monthly-plan"
billing_frequency_unitstringrequired

The time unit of the billing frequency. Braintree only supports MONTH.

Value:"MONTH"
billing_frequencynumberrequired

The frequency at which the subscription is billed, in the units specified by billing_frequency_unit.

Example:1
currency_codestringrequired

The currency of the subscription price.

Example:"GBP"
pre_discount_pricenumberrequired

The subscription price before any discounts are applied.

Example:50
multiphase_planbooleanrequired

Always false, as Braintree does not support multi-phased plans.

Example:false
discounts_appliedbooleanrequired

If the subscription has any applied discounts.

Example:true
Response
{ "managed-by": "Braintree", "external-id": "abc123", "next-billing-time": "2021-05-17T04:31:33Z", "blaize-product": { "id": "one-month-one-off", "label": "One month access", "description": "One month access", "entitlement": { … }, "mapping": { … }, "sharingLimit": 0 }, "transaction-history": { "time": "2021-05-17T04:31:33Z", "currency": "GBP", "cents": 234, "cycle": "month", "cycleCount": 1, "currencyCode": "GBP", "human-readable-amount": "£2.34" }, "subscription-state": "Active", "paid_through_date": "2021-05-17T04:31:33Z", "plan_id": "plan-123", "plan_name": "monthly-plan", "billing_frequency_unit": "MONTH", "billing_frequency": 1, "currency_code": "GBP", "pre_discount_price": 2, "multiphase_plan": false, "discounts_applied": true }