Tracked Charges Using C# API?

Kader Belbina's Avatar

Kader Belbina

26 Oct, 2011 12:43 AM

I'm trying to add a tracked charge using the C# API but am unsure how to specify them in the url based on the api - docs and the C# code. Here is the C# code to create a new customer:

string urlBase = "https://cheddargetter.com/xml";

            string urlPath = string.Format("/customers/new/productCode/{0}", _productCode);
            string postParams = string.Format(
                "code={0}" +
                "&firstName={1}" +
                "&lastName={2}" +
                "&email={3}" +
                "&company={4}" +
                "&subscription[planCode]={5}" +
                "&subscription[ccFirstName]={6}" +
                "&subscription[ccLastName]={7}" +
                "&subscription[ccNumber]={8}" +
                "&subscription[ccExpiration]={9}" +
                "&subscription[ccCardCode]={10}" +
                "&subscription[ccZip]={11}"
               .....

There is nothing for tracked items and I am unsure where or how to specify this in the post params.

  1. Support Staff 1 Posted by Marc Guyer on 26 Oct, 2011 03:53 PM

    Marc Guyer's Avatar

    Hi Kader -- I think you're asking how to specify item quantities when creating a new customer. You just need to use the items sub hash. Documentation on that here: https://cheddargetter.com/developers#add-customer See the last two params in the table.

    You might benefit by getting in touch with the guys at @getdonedone. They've been working on an updated C# wrapper. They might even have added support for items in the new customer call already. Either way, you guys should combine forces.

  2. 2 Posted by Kader on 26 Oct, 2011 05:17 PM

    Kader's Avatar

    Cool, I contacted them.

    I did see in the docs 'items[][itemCode]' but I don't know what that means in terms of post params / a url.

  3. 3 Posted by mustafa.shabib on 26 Oct, 2011 09:56 PM

    mustafa.shabib's Avatar

    Hey Guys

    We're still in the midst of implementing a variety of things for the billing system - it may be a while before we can extract any generic updates to the public C# wrapper and contribute back to it; I will mention that we didn't update the createCustomer call to accept subscription items - we bundled up subscription items in the subscription node and handle them in relation to that parent subscription - in our scheme, we always create a customer with the default plan items.

    -M

  4. Marc Guyer closed this discussion on 05 Dec, 2011 03:38 PM.

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

Recent Discussions

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM