Problem Creating a Subscription for a user for a Free Product

Mike Grouchy's Avatar

Mike Grouchy

10 Mar, 2010 02:43 PM via web

Hi There,
I am using the api to create customers and subscriptions.

My use case is that we have a Free product and paid products. I want to create subscriptions for users of both our free and paid products so they can easily downgrade and upgrade through products in our product line.

I have been trying to create subscriptions for our free users however I cannot create a subscription for a free product without a credit card(or any subscription at all for that matter) as per your Subscription API documentation.

Is there a way around this for Free Subscriptions, we don't want to have to collect credit cards from customers unless they are using a paid account.

Thanks,
Mike

  1. Support Staff 2 Posted by David H. - Chargify on 10 Mar, 2010 03:26 PM

    David H. - Chargify's Avatar

    Mike,

    You can create subscriptions to free products with out a credit card if you enable that on the product. Are you getting a failure when trying this via the API?

  2. 3 Posted by Mike Grouchy on 10 Mar, 2010 03:43 PM

    Mike Grouchy's Avatar

    Yes, I am getting an error when I do this currently.

    I was posting data to:
    https://mysubdomain.chargify.com/subscriptions.json
    {"subscription": {"customer_id": "1315", "product_handle": "swix_free_"}}

    swix_free_ is the handle for our free product
    The settings for that product are in the attached image.

    The response I get from the serve is a 422 error (Unprocessable Entity). It certainly could be something I am doing wrong so I am interested in hearing any comments or suggestions.

    Thanks,
    Mike

  3. Support Staff 4 Posted by David H. - Chargify on 10 Mar, 2010 03:46 PM

    David H. - Chargify's Avatar

    Mike,

    A developer will take a look at this

  4. 5 Posted by Mike Grouchy on 10 Mar, 2010 03:52 PM

    Mike Grouchy's Avatar

    Thanks for your quick response David.

  5. Support Staff 6 Posted by Michael K. - Chargify on 10 Mar, 2010 06:59 PM

    Michael K. - Chargify's Avatar

    Mike, did Chargify send any response to that API call? The response should have a listing of the errors that caused the 422.

    Also, are you sure that 1315 is a valid Chargify ID for the customer for whom you were trying to create the subscription?

  6. 7 Posted by Mike Grouchy on 10 Mar, 2010 07:17 PM

    Mike Grouchy's Avatar

    I'm sure it did, but for testing I am using a modified version of
    urlopen(python) which disregards the response on an error.

    I think the id may be valid, but I will try again to verify all the post
    data manually.

    Thanks for the response, you can close this ticket and I will reopen if I
    cannot track down the problem.

    Thanks,
    Mike

  7. Support Staff 8 Posted by Lance W. - Chargify on 11 Mar, 2010 03:17 AM

    Lance W. - Chargify's Avatar

    Okay, Mike, will close ticket. Let us know the outcome, though.

    Thx.

    --- Lance

  8. Lance W. - Chargify resolved this discussion on 11 Mar, 2010 03:17 AM.

Comments are currently closed for this discussion. You can start a new one.