# \#wix-marketing-backend

**URL:** https://forum.wixstudio.com/tag/wix-marketing-backend/97.md

[Latest](https://forum.wixstudio.com/latest.md) · [Categories](https://forum.wixstudio.com/categories.md) · [Tags](https://forum.wixstudio.com/tags.md)

---

## [Pricing Plan Coupon only for first billing cycle (programmatically)](https://forum.wixstudio.com/t/pricing-plan-coupon-only-for-first-billing-cycle-programmatically/55723)

<div class="topic-metadata">

**Author:** [@valentin\_wackermedia](https://forum.wixstudio.com/u/valentin_wackermedia)\
**Replies:** 0\
**Last updated:** [January 24, 2024, 2:47pm UTC](https://forum.wixstudio.com/t/pricing-plan-coupon-only-for-first-billing-cycle-programmatically/55723 "2024-01-24T14:47:31Z")

</div>

Question: How can I change the code, so that the generated coupon code only applies to the first billing cycle? Product: Wix Editor, Wix Pricing Plans, Wix Marketing Backend What are you trying to achieve: I’m trying to create a coupon programmatically with a fixed amount of payment cycles it can be applied to a pricing plan. At the moment, when I use it in checkout, it’s applied to all billing cycles of the pricing plan. What have you already tried: This code: export function initCouponCreating(amountOff, couponCode) { let couponInfo = { "name": "Gutschrift", "code": couponCode, "startTime": new Date(), "usageLimit": 1, "limitedToOneItem": true, "limitPerCustomer": 1, "active": true, "scope": { "namespace": "pricingPlans" }, "moneyOffAmount": amountOff }; return coupons.createCoupon(couponInfo); } But I can’t seem to find the option to set it only to the first payment cycle…
