v1

latestOpenAPI 3.0.02026-08-0610682246.0 KB
Braintree Payments

List the Braintree subscriptions of a user

Lists all Braintree subscriptions for the logged-in user.

get/blaize/payment/braintree/subscriptions

Headers

cookiestring

The session cookie.

Response

OK

managed-bystring required

The name of payment provider capitalised.

endsstring date-time

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

external-idstring required

The ID for this subscription in Braintree.

next-billing-timestring date-time required

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

subscription-state'Active' | 'Canceled' | 'Expired' | 'Past Due' | 'Pending' | 'Unrecognized' required

The subscription state, as acquired from Braintree.

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.

plan_idstring required

The Braintree plan ID

plan_namestring required

The Braintree plan name

billing_frequency_unit'MONTH' required

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

billing_frequencynumber required

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

currency_codestring required

The currency of the subscription price.

pre_discount_pricenumber required

The subscription price before any discounts are applied.

multiphase_planboolean required

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

discounts_appliedboolean required

If the subscription has any applied discounts.

Example response

{
  "managed-by": "Braintree",
  "ends": "2021-05-17T04:31:33Z",
  "external-id": "abc123",
  "next-billing-time": "2021-05-17T04:31:33Z",
  "blaize-product": {
    "tenantId": "your-tenant|site-slug",
    "subTenantId": "your-tenant|site-slug",
    "id": "one-month-one-off",
    "label": "One month access",
    "description": "One month access",
    "entitlement": {
      "id": "191f6d00-b8d4-46f1-a22d-2bf53f4f8fa3",
      "type": "bundle"
    },
    "mapping": {
      "recurring": {
        "plans": [
          {
            "paymentProvider": "braintree"
          }
        ]
      },
      "oneOff": {
        "plans": [
          {
            "paymentProvider": "braintree",
            "accessDuration": {
              "duration": 2,
              "unit": "MONTHS"
            }
          }
        ]
      }
    }
  },
  "transaction-history": [
    {
      "time": "2024-02-15T11:30:58Z",
      "currency": "EUR",
      "cents": 900,
      "cycle": "month",
      "cycleCount": 1,
      "currencyCode": "EUR",
      "human-readable-amount": "€9.0"
    }
  ],
  "paid_through_date": "2021-05-17T04:31:33Z",
  "plan_id": "plan-123",
  "plan_name": "monthly-plan",
  "billing_frequency": 1,
  "currency_code": "GBP",
  "pre_discount_price": 50,
  "discounts_applied": true
}