The Dynamic Offer Decision Engine can be invoked via the Public API to calculate a decision output response based upon each property rule under the Dynamic Offer created in the Zephr Console.
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.
The dynamic offer to evaluate, must specify the slug of the dynamic offer, and any custom input to be used in the rules.
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/public/decisions/v2/dynamic-offers
- https://demo-site/zephr/public/decisions/v2/dynamic-offers
- 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/public/decisions/v2/dynamic-offers \
-H 'Content-Type: application/json' \
-b blaize_session=YOUR_API_KEY_HERE \
-d '{
"dynamic_offer": {
"slug": "offerX",
"inputs": {}
},
"session": "xxx-xxx-xxx",
"foreign_keys": {},
"ip": "x.x.x.x",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11)...",
"jwt": "xxx-xxx-xxx",
"path": "/x.html",
"content_id": "xxx-xxx-xxx"
}'OK
The processed output for mainly the Product rule. Price and Discount, if present, the output of those would be nested under each product element according to the rule specification.
key value pair of any custom property rule output. The key would be the property id, the value would be its rule output
The rule outcome for each property rule within the offer. If you wish to record user conversion data, you would need to send these outcome data back to Zephr upon when the conversion is happening.
{ "products": [ { … } ], "tagline": "string", "custom": {}, "outcomes": [ { … } ], "errors": [ { … } ] }
Request
The Dynamic Offer Decision Engine can be tested via this endpoint to calculate a decision output response based on the criteria of the provided validation ID. Validation criteria is configured on the Zephr Console and determines the version of the dynamic offer being used.
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/public/decisions/v2/dynamic-offers/{offerId}/validations/{validationId}
- https://demo-site/zephr/public/decisions/v2/dynamic-offers/{offerId}/validations/{validationId}
- 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/public/decisions/v2/dynamic-offers/{offerId}/validations/{validationId}' \
-b blaize_session=YOUR_API_KEY_HEREOK
The processed output for mainly the Product rule. Price and Discount, if present, the output of those would be nested under each product element according to the rule specification.
key value pair of any custom property rule output. The key would be the property id, the value would be its rule output
The rule outcome for each property rule within the offer. If you wish to record user conversion data, you would need to send these outcome data back to Zephr upon when the conversion is happening.
{ "products": [ { … } ], "tagline": "string", "custom": {}, "outcomes": [ { … } ], "errors": [ { … } ] }
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 }