Incomplete methods to add initial (negative) charges
We have a promotion that gives first month of service for only $1. We tried to do this by applying a negative charge to the customer's account at signup time.
For users who have no CG record yet, we can use the charges[<user-defined>]
params in:
https://cheddargetter.com/developers#add-customer
For users with an existing CG record with a valid CC, we can use the add charge API method directly:
https://cheddargetter.com/developers#add-charge
BUT if the customer HAS a CG record but no CC on file (e.g. free plan), neither of these works.
The direct add-charge API method fails with error 401: "Cannot add a charge when the customer's subscribed plan is free and the subscription does not have current credit card information"
And the customer modification method (https://cheddargetter.com/developers#update-customer-subscription) seems to ignore the charges[<user-defined>]
params.
Please help. We actually sent out this promo to all of our customers, and it's not really working at all! Whoops!
Two possible solutions we can think of:
CG allows add-charge
API to apply to accounts without credit card if used with negative amounts.
or
CG allows update-customer-subscription
to take charges
params like add-customer
does.
Thank you.
Discussions are closed to public comments.
If you need help with Cheddar please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Marc Guyer on 13 Aug, 2010 08:04 PM
We're on it. We'll keep you posted.
Support Staff 2 Posted by Marc Guyer on 13 Aug, 2010 09:02 PM
We just deployed a patch that lifts the restriction of adding a charge when the customer does not have payment information. We determined this restriction was unnecessarily reducing functionality.
Please let us know how this solution works for you.
3 Posted by Dan Kamins on 16 Aug, 2010 05:59 PM
Hi Marc,
Thanks for the quick patch. It seems to be partly working now. But with a customer coming from free plan to $99 plan , we see both a -$98 charge (which we expect) AS WELL as a questionable +$1 charge with the exact same code and description. So our $1 plan ends up costing people $2 and the bill is sort of confusing.
This customer shows this:
https://cheddargetter.com/admin/customers/get/id/5c81829a-faaf-102d...
Is this residual debug code? Are we doing something wrong? Thanks for looking into this.
Support Staff 4 Posted by Marc Guyer on 16 Aug, 2010 07:28 PM
I get a 404 for that customer link. What's the customer's code?
5 Posted by Dan Kamins on 16 Aug, 2010 07:34 PM
It's in our "(Test)" product, not our main product. Customer code "dk_144".
Support Staff 6 Posted by Marc Guyer on 16 Aug, 2010 08:09 PM
We don't have debug logging turned on for your test account so it's hard to tell where that charge originated. Can you replicate?
Support Staff 7 Posted by Marc Guyer on 16 Aug, 2010 09:11 PM
Some assumptions based on timestamps:
So, it seems that the customer was created and the $1 custom charge was added in the same call (customers/new). 36 seconds later, the $98 custom credit was created (customers/add-charge). Then, the customer's subscription was immediately changed to a paid plan.
Based on these assumptions, the problem is either a bug in customers/new or the $1 charge information was sent in the customers/new call. Does this happen every time?
8 Posted by Dan Kamins on 16 Aug, 2010 10:37 PM
Yes it's 100% reproducible: Delete CG record. Sign up for free trial. Upgrade to paid plan with $1 coupon. Customer ends up with unexpected $1 charge applied immediately at creation timestamp. I re-ran this process with a $499 plan, so you can see similar results in the same customer now.
Support Staff 9 Posted by Marc Guyer on 17 Aug, 2010 02:27 PM
We've turned on debug logging on your test account. Could you replicate again and let us know?
10 Posted by Dan Kamins on 19 Aug, 2010 08:46 PM
I tried it again with this customer:
https://cheddargetter.com/admin/customers/get/id/12e271ec-fd22-102d...
This time it worked properly (i.e. no extra $1 charge). Did you push a fix already, or is this just less than 100% reproducible now?
Support Staff 11 Posted by Marc Guyer on 19 Aug, 2010 08:58 PM
There have not been any updates to customers/new for quite some time. Is there a production customer that had this behavior?
12 Posted by Dan Kamins on 19 Aug, 2010 09:06 PM
https://cheddargetter.com/admin/customers/get/code/u_585895 (production customer) used this coupon, and it worked correctly.
Prior to this, several customers tried it but ran into the original problem of this thread ("Cannot add a charge when the customer's subscribed plan is free and the subscription does not have current credit card information").
I just re-ran my test on the test account, and was able to reproduce the problem (extra $1 charge). See this test customer:
https://cheddargetter.com/admin/customers/get/id/85a8f702-fd25-102d...
Hopefully your logs should allow you to get to the bottom of this now.
Support Staff 13 Posted by Marc Guyer on 19 Aug, 2010 09:54 PM
Here's the raw post to
customers/new
at2010-08-19 21:04:21 UTC
:And a nicely formatted representation:
14 Posted by Dan Kamins on 23 Aug, 2010 05:37 PM
Thank you Marc, that was very helpful.
From this info it looks like this might actually be a side-effect of the workaround code we pushed to address the original issue (Cannot add a charge when the customer's subscribed plan is free)! Hopefully we'll be able to simply remove that code which is no longer needed, and this should go away. I'll update this thread with final results when we have them.
15 Posted by Dan Kamins on 31 Aug, 2010 11:41 PM
This problem is solved. The thread can be resolved/closed. Thanks very much for your help, Marc.
Marc Guyer closed this discussion on 01 Sep, 2010 01:08 PM.