Start the subscription

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.

SecurityCookieBlaizeSession or JwtQuery or JwtHeaderXBlaizeJwt or JwtHeaderXZephrJwt or JwtBearer or JwtCookie
Request
header Parameters
cookie
string

The session cookie.

Example: `blaize_session=...` (string)
Request Body schema: application/json
product_id
required
string

Product Id/slug

plan_id
string

Plan Id/slug

discount_code
string

Discount/promotion code

object

Parameters specific to the payment provider in use

Responses
200

OK

400

Bad Request

401

Unauthorized

post/zephr/subscribe
Request samples
application/json
{
  • "product_id": "premium-access-monthly-recurring",
  • "plan_id": "plan-5",
  • "discount_code": "SAVE10",
  • "vendor_fields": {
    }
}
Response samples
application/json
{
  • "grant_id": "33d576c7-d036-40e7-8141-8a91998a5c79",
  • "client_secret": "src_client_secret_QfsM25CJ2uCMon72MiOmUNTj`",
  • "payment_intent_id": "pi_1GYZYWLgUJT2XNPAYQMomeqf"
}