<p>You could have them make a one-time payment, then generate a gift code that can be redeemed when a user fills out the subscription payment form.</p>

<p>I did that by creating a plugin and utilizing the charge.onCharge event, it makes sure it was a gift code purchase, then generates a code that is stored in the charge's coupon code table and you can either have it send an email with the code to person who is to redeem it or just display it on the screen.</p>

CC BY-SA 3.0
2018-02-22T21:40:56.037Z
2018-02-22T21:40:56.037Z
Brad
<p>Here is the scenario: I'm trying to create a gift membership subscription for 3 or 6 months of site access that you can send to somebody. Since the most common scenario is that someone else will be paying &amp; sending this to someone as a gift, we obviously don't want the charge their card again at the end of the period, and the membership access should end unless they update their card details &amp; renew with one of our regular subscription plans. </p>

<p>Charge 2 handles subscriptions (which recurring by definition) and it also handles 1-off charges. It's well documented how to create a membership site that is tied to subscriptions. What I’m trying to figure out is how to provide 3 or 6 months of membership, that does not renew at the end. </p>

<p>The Subscription Model offers planInterval and planIntervalCount, but I don't see an option for something like 'endAfterCount' or something similar. </p>

<p>The one-off charges (1 time charge of $39 for 3 months of access, for example) I don't think have a time interval attached to them. </p>

<p>I feel like I'm probably missing something obvious here... any help is greatly appreciated. </p>

<plugin-charge>
Is it possible to create a 3 month membership instead of a subscription using Charge 2 for Craft CMS?
# Is it possible to create a 3 month membership instead of a subscription using Charge 2 for Craft CMS?

(Asked by: username_0 on 2017-12-07)

Here is the scenario: I'm trying to create a gift membership subscription for 3 or 6 months of site access that you can send to somebody. Since the most common scenario is that someone else will be paying & sending this to someone as a gift, we obviously don't want the charge their card again at the end of the period, and the membership access should end unless they update their card details & renew with one of our regular subscription plans.

Charge 2 handles subscriptions (which recurring by definition) and it also handles 1-off charges. It's well documented how to create a membership site that is tied to subscriptions. What I’m trying to figure out is how to provide 3 or 6 months of membership, that does not renew at the end.

The Subscription Model offers planInterval and planIntervalCount, but I don't see an option for something like 'endAfterCount' or something similar.

The one-off charges (1 time charge of $39 for 3 months of access, for example) I don't think have a time interval attached to them.

I feel like I'm probably missing something obvious here... any help is greatly appreciated.

**Tags:** plugin-charge

---

## 1 answers

### Answer by username_1 on 2018-02-22. Score: 1

You could have them make a one-time payment, then generate a gift code that can be redeemed when a user fills out the subscription payment form.

I did that by creating a plugin and utilizing the charge.onCharge event, it makes sure it was a gift code purchase, then generates a code that is stored in the charge's coupon code table and you can either have it send an email with the code to person who is to redeem it or just display it on the screen.


---

