Use the Zephr Public API
You can use the Zephr API to do the following:
- Apply the promo code to your payment form using the /blaize/payment/braintree/promo-code{?code,paymentForm} GET request. This validates the promo code, for example the claim limit and whether the promo code is present in the table, and calculates the new payment option price based on the discount amount
- Start a Braintree subscription request using the /blaize/payment/braintree/subscribe POST request. This includes a discount on the subscription request, which points to the discount ID in Braintree, the discounted amount and the number of billing cycles. For further information on specifying these details, refer to the Braintree documentation
For further information on the Zephr Public API, see the Public API Specification.