Stripe Payments

Preview the Stripe subscription price

Generates a preview of the total price and tax amount 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.

post/zephr/payment/stripe/create-subscription-previews

Request

  • Base URL
    https://demo-site
  • URL
    https://demo-site/zephr/payment/stripe/create-subscription-previews
  • Auth
    • API key in cookie blaize_session
    • or API key in query parameter jwt
    • or API key in header x-blaize-jwt
    • or API key in header x-zephr-jwt
    • or HTTP bearer
    • or API key in cookie blaize_jwt

Request body

product_idstring required

The ID of the new Zephr product.

plan_idstring required

The new Stripe price plan ID.

promo_codestring

The Stripe promo code that will be attached to the subscription.

billing_countrystring

The user's billing country, for tax calculation purposes.

billing_post_codestring

The user's billing postal code, for tax calculation purposes.

Example request

{
  "product_id": "zephr-prod-1",
  "plan_id": "price_H8eIeMFwMawg6w",
  "promo_code": "discount15",
  "billing_country": "US",
  "billing_post_code": "90210"
}

Response

OK

totalnumber

The total amount the user will be initially charged for the subscription in the relevant currency's lowest denomination (e.g. pence), i.e. for a monthly subscription, the first month's cost.

sub_totalnumber

The total amount minus tax for the initial charge in the relevant currency's lowest denomination (e.g. pence).

taxnumber

The tax amount for the initial charge in the relevant currency's lowest denomination (e.g. pence).

discountnumber

The discount amount for the initial charge in the relevant currency's lowest denomination (e.g. pence).

Example response

{
  "total": 5000,
  "sub_total": 4500,
  "tax": 500
}

Changes

No recorded changes to this operation across all 2 revisions of this API.