Issues a Braintree client token for the current blaize session. This holds the user's userId if the user has an authenticated session. This token can be used to request a payment once.
Public API Reference (2025-07-30)
The Zephr Public API provides common client-side actions tied to a session cookie. Unlike the Admin API, neither users nor other resources can be dereferenced; the only data that can be accessed is owned by the user who is currently signed-in. This design is used to protect other users from malicious attacks.
You can find the base URL for the Public API by navigating to your site domains. To do this, select Sites from the Delivery menu, select your site, and then click the Site Domains button. The base URL is the Live domain.
Zephr forms use the Public API by default, with relative URLs based on the base URL.
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/token
- https://demo-site/blaize/payment/braintree/token
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/token?allowUnauthenticated=true' \
-H 'cookie: `blaize_session=...` (string)' \
-b '`blaize_session=...` (string)'{ "token": "eyJ2ZXmsaW5nQW...(lots more random-looking characters)...dyZWmVubW8iOiJvZmYifQ==" }
Request
This endpoint generates a callback for subscription charges when a product purchase is created, regardless of success or failure. It requires a mandatory string payload containing the bt_signature and bt_payload parameters. To use subscriptions, configure the Braintree callback to direct to this endpoint.
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/subscriptionChargedCallback
- https://demo-site/blaize/payment/braintree/subscriptionChargedCallback
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/subscriptionChargedCallback \
-H 'Content-Type: application/json' \
-b blaize_session=YOUR_API_KEY_HERE- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/subscriptions
- https://demo-site/blaize/payment/braintree/subscriptions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/subscriptions \
-H 'cookie: `blaize_session=...` (string)' \
-b '`blaize_session=...` (string)'OK
ISO-8601 formatted time at which the subscription was canceled. This field will be omitted if the subscription is not canceled.
ISO-8601 formatted time at which the subscription will next be billed.
Zephr subtenant ID and site slug
ISO-8601 formatted time at which the transaction was made.
The subscription state, as acquired from Braintree.
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.
The time unit of the billing frequency. Braintree only supports MONTH.
The frequency at which the subscription is billed, in the units specified by billing_frequency_unit.
The subscription price before any discounts are applied.
Always false, as Braintree does not support multi-phased plans.
{ "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 }
Request
Updates a Braintree subscription by ID. This operation currently only supports updating the payment method for a subscription, sending the payment method token or nonce.
Payment method token referencing a payment method in Braintree.
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/subscriptions/{subscriptionId}
- https://demo-site/blaize/payment/braintree/subscriptions/{subscriptionId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PATCH \
'https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/subscriptions/{subscriptionId}' \
-H 'Content-Type: application/json' \
-H 'cookie: `blaize_session=...` (string)' \
-b '`blaize_session=...` (string)' \
-d '{
"payment_method_token": "alpha123token",
"payment_method_nonce": "alpha123token"
}'- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/subscriptions/{subscriptionId}
- https://demo-site/blaize/payment/braintree/subscriptions/{subscriptionId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/subscriptions/{subscriptionId}' \
-b blaize_session=YOUR_API_KEY_HERERequest
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.
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/buy
- https://demo-site/blaize/payment/braintree/buy
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/buy \
-H 'Content-Type: application/json' \
-H 'cookie: `blaize_session=...` (string)' \
-b '`blaize_session=...` (string)' \
-d '{
"product_id": "lifetime-membership",
"price_point_id": "gold-package",
"payment_nonce": "eyJ2ZXmsaW5nQW...(lots more random-looking characters)...dyZWmVubW8iOiJvZmYifQ=="
}'{ "grant_id": "aa583cb8-51d1-4bd9-9ec7-3a43796ef8e5" }
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/payment/braintree/payment-methods
- https://demo-site/zephr/payment/braintree/payment-methods
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/payment/braintree/payment-methods \
-H 'cookie: `blaize_session=...` (string)' \
-b '`blaize_session=...` (string)'OK
In the case of a credit card payment method, the name of the card holder.
In the case of a card payment method, the masked card number, compliant with PCI security standards.
In the case of a card payment method, the expiration date, in the format of MM/YY or MM/YYYY.
In the case of a card payment method, if the card will expire within the configured number of days.
Indicates if this payment method is used by any subscriptions that have not been finalised and would be cancelled if this payment method is deleted.
In the case of a card payment method, the last four digits of the card number.
A nonce that can be used for other payment method operations.
In the case of a card payment method, the zip code associated with the card.
[ { "token": "8m2kc5g", "default": false, "card_type": "Visa", "card_holder_name": "John Rambo", "card_number_masked": "654321******0987", "expiration_date": "07/22", "expired": false, "expiring_soon": false, "in_use": false, "last_4": "1111", "nonce": "086128f3-04c2-069e-78d2-3f4de98508e5", "type": "CreditCard", "zipcode": "123456" } ]
Request
Creates the Braintree payment method with the associated vaulted nonce, for the authenticated user.
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/payment/braintree/payment-methods
- https://demo-site/zephr/payment/braintree/payment-methods
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/payment/braintree/payment-methods \
-H 'Content-Type: application/json' \
-H 'cookie: `blaize_session=...` (string)' \
-b '`blaize_session=...` (string)' \
-d '{
"payment_method_nonce": "aa583cb8...and other characters...3a43796ef8e5"
}'OK. A new Braintree payment method has been created for the authenticated user.
In the case of a credit card payment method, the name of the card holder.
In the case of a card payment method, the masked card number, compliant with PCI security standards.
In the case of a card payment method, the expiration date, in the format of MM/YY or MM/YYYY.
In the case of a card payment method, if the card will expire within the configured number of days.
Indicates if this payment method is used by any subscriptions that have not been finalised and would be cancelled if this payment method is deleted.
In the case of a card payment method, the last four digits of the card number.
A nonce that can be used for other payment method operations.
{ "token": "8m2kc5g", "default": false, "card_type": "Visa", "card_holder_name": "John Rambo", "card_number_masked": "654321******0987", "expiration_date": "07/22", "expired": false, "expiring_soon": false, "in_use": false, "last_4": "1111", "nonce": "086128f3-04c2-069e-78d2-3f4de98508e5", "type": "CreditCard", "zipcode": "123456" }
Request
Updates the Braintree payment method details associated with the logged-in user. The details to update must first be captured from Braintree in a nonce and vaulted.
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/payment/braintree/payment-methods/{paymentMethodToken}
- https://demo-site/zephr/payment/braintree/payment-methods/{paymentMethodToken}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PATCH \
'https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/payment/braintree/payment-methods/{paymentMethodToken}' \
-H 'Content-Type: application/json' \
-H 'cookie: `blaize_session=...` (string)' \
-b '`blaize_session=...` (string)' \
-d '{
"payment_method_nonce": "aa583cb8...and other characters...3a43796ef8e5"
}'OK
In the case of a credit card payment method, the name of the card holder.
In the case of a card payment method, the masked card number, compliant with PCI security standards.
In the case of a card payment method, the expiration date, in the format of MM/YY or MM/YYYY.
In the case of a card payment method, if the card will expire within the configured number of days.
Indicates if this payment method is used by any subscriptions that have not been finalised and would be cancelled if this payment method is deleted.
In the case of a card payment method, the last four digits of the card number.
A nonce that can be used for other payment method operations.
{ "token": "8m2kc5g", "default": false, "card_type": "Visa", "card_holder_name": "John Rambo", "card_number_masked": "654321******0987", "expiration_date": "07/22", "expired": false, "expiring_soon": false, "in_use": false, "last_4": "1111", "nonce": "086128f3-04c2-069e-78d2-3f4de98508e5", "type": "CreditCard", "zipcode": "123456" }
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/payment/braintree/payment-methods/{paymentMethodToken}
- https://demo-site/zephr/payment/braintree/payment-methods/{paymentMethodToken}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/payment/braintree/payment-methods/{paymentMethodToken}' \
-H 'cookie: `blaize_session=...` (string)' \
-b '`blaize_session=...` (string)'Request
Sets the Braintree default payment method for the logged-in user. This must be a valid payment method already associated with the user.
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/payment/braintree/default-payment-method
- https://demo-site/zephr/payment/braintree/default-payment-method
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/payment/braintree/default-payment-method \
-H 'Content-Type: application/json' \
-H 'cookie: `blaize_session=...` (string)' \
-b '`blaize_session=...` (string)' \
-d '{
"payment_method_token": "payment-method-123"
}'- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/payment/braintree/plans
- https://demo-site/zephr/payment/braintree/plans
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/payment/braintree/plans?product_id=string' \
-H 'cookie: `blaize_session=...` (string)' \
-b '`blaize_session=...` (string)'{ "plan-id": { "id": "annual-plan", "name": "Sports+ Membership Annual", "currency_code": "USD", "base_price": 10.2, "billing_interval_unit": "MONTH", "billing_interval": 3, "billing_cycles": 12, "trial_duration_unit": "DAY", "trial_duration": 30, "discounts": [ … ], "zephr_product_id": "product-123" } }
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/promo-code
- https://demo-site/blaize/payment/braintree/promo-code
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/promo-code?code=string&paymentForm=string' \
-b blaize_session=YOUR_API_KEY_HERE{ "code": "promo-123", "discount": 20, "paymentOptions": [ { … } ] }
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/addons&promoCode={promoCode}
- https://demo-site/blaize/payment/braintree/addons&promoCode={promoCode}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/addons&promoCode={promoCode}?paymentForm=string' \
-b blaize_session=YOUR_API_KEY_HERE[ { "id": "add-123", "label": "Easy Add-on", "value": 12, "type": "PERCENT", "paymentOptions": [ … ] } ]
Request
** (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.
Payment method nonce from Braintree drop-in UI.
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.
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/subscribe
- https://demo-site/blaize/payment/braintree/subscribe
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/payment/braintree/subscribe \
-H 'Content-Type: application/json' \
-H 'cookie: `blaize_session=...` (string)' \
-b '`blaize_session=...` (string)' \
-d '{
"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"
}'{ "grant_id": "33d576c7-d036-40e7-8141-8a91998a5c79" }
Request
Generates a new preview of the price that Stripe will charge the customer if they create a new subscription for the specified plan. Note: This method does not create any entities in Stripe and does not result in any payments being made.
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/payment/stripe/subscriptions/{externalId}/change-previews
- https://demo-site/zephr/payment/stripe/subscriptions/{externalId}/change-previews
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/payment/stripe/subscriptions/{externalId}/change-previews' \
-H 'Content-Type: application/json' \
-b blaize_session=YOUR_API_KEY_HERE \
-d '{
"plan_id": "string"
}'{ "total": 5000, "sub_total": 4500 }