Stripe API
Last updated
Was this helpful?
Last updated
Was this helpful?
We also support promo code tracking if you're not using Stripe Checkout. If you're creating Stripe subscriptions directly by calling the Stripe API, it's straightforward to apply a Stripe promo code to a subscription at the time of subscription creation. This is a great option for mobile apps using Stripe that want to do affiliate tracking. App stores generally block affiliate link tracking, and promo codes are a great workaround.
On your checkout screen, include a field where users can enter a promo code. On submission, call the , and include the code
parameter in your API call. From that API response, you will get the promo code ID, which looks like promo_...
Then, when calling the , include the promotion_code
parameter and set it equal to the promo code ID from the first step.
Note that you can also apply a promo code using the , and we will be able to attribute referrals the same way as if you used the subscription creation API.
Once you've added the ability to add promo codes to your subscriptions, move on to .