Uses the payment info captured by the payment provider drop-in UI and create a customer with a recurring payment. When the payment provider responds successfully, the logged-in user will be temporarily granted all entitlements in the product's associated bundle.
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.
Parameters specific to the payment provider in-use.
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/subscribe
- https://demo-site/zephr/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/zephr/subscribe \
-H 'Content-Type: application/json' \
-H 'cookie: `blaize_session=...` (string)' \
-b '`blaize_session=...` (string)' \
-d '{
"product_id": "premium-access-monthly-recurring",
"plan_id": "plan-5",
"discount_code": "SAVE10",
"vendor_fields": {
"payment_nonce": "eyJ2ZXmsaW5nQW...(lots more random-looking characters)...dyZWmVubW8iOiJvZmYifQ==",
"skip_trial_period": true,
"start_date": "2021-01-01T00:00:00Z",
"payment_method": "pm_123456789",
"vault_payment_method": false
}
}'{ "grant_id": "33d576c7-d036-40e7-8141-8a91998a5c79", "client_secret": "src_client_secret_QfsM25CJ2uCMon72MiOmUNTj`", "payment_intent_id": "pi_1GYZYWLgUJT2XNPAYQMomeqf" }
Request
Updates an existing subscription to change the associated product and plan. Updating the subscription may modify the price of the subscription, and if so the balance will be billed immediately at a pro-rated amount. Parameters specific to the vendor may be specified to change the payment method for the subscription. Changing to a plan with a different billing frequency from the existing subscription is not supported for some payment providers (Braintree).
Parameters specific to the payment provider in-use.
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/subscriptions/:subscriptionId
- https://demo-site/zephr/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/zephr/subscriptions/:subscriptionId \
-H 'Content-Type: application/json' \
-H 'cookie: `blaize_session=...` (string)' \
-b '`blaize_session=...` (string)' \
-d '{
"product_id": "premium-access-monthly-recurring",
"plan_id": "plan-5",
"vendor_fields": {
"payment_nonce": "eyJ2ZXmsaW5nQWdyZWmVubW8iOiJvZmYifQ=="
},
"navigated_from": "/some/path"
}'{ "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 }