What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Using the API, how do I add submissions data on the product/payment field?Asked by godavid33 on June 13, 2014 at 12:31 PM
I set up one form to successfully submit and it submits all fields correctly (no payment). I have a second form I need to submit that has an auth.net integration in it. I set up the fields as submission[x] where x was the original value in the second  (so if it was q7_blahblah[id] then now it is submission[id] or if it was q7_blahblah[cc_number] it's now submissionp[cc_number]). This doesnt seem to be working (it sumbits successfully, but there is no data from the payemnt fields). Where can I find the correct values for this?
I really need an answer to this ASAP, as this is essentially one of the last things preventing me from launching my site and there seems to be zero documentation on this subject (specifically pertaining to products and payment gateways) :(
It's also very confusing that the submission fields in the cURL markup on the page http://api.jotform.com/docs/#post-form-id-submissions are set as submission[2_last] but in the actual fields below are shown as submission[last]
Arg, I hate to be that one impatient guy continually bumping his thread, but I really need an answer to this and it seems like submitting a payment form should be something y'all considered given you have integrations for payment forms....
I know SOMEONE from the jotform staff has seen this. Is there anyway I can get in contact with a developer that will respond?
Thank you for contacting us and we apologize for the delay in response to your inquiry.
As explained on the documentation, you have to get first your form questions IDs from https://api.jotform.com/form/41662066197964/questions replacing 41662066197964 with your form ID.
In your post script, it should be:
This means the ID of this certain field is 3. If it has group of fields (array), it'd be like the following.
Note that the sample post on the API page is specific to its sample form so you can't use it to test your actual form.
Let us know if you still need help. It'd also better if you can share with us your post script.
I have updated the script on my post, FYI. http://www.jotform.com/answers/391369
Let us know if you can't get it to work so we can assist you further.
Odd, I've tried all that you mentioned, and then some. Specifically, the first thing I tried was just using the values already there to designate which array the fields would be stored as (submission[cc_lastName]) with no luck.
One thing I noticed between the form that does and doesnt submit correctly, is when I retrieve the forms questions using your API, the one that works has something called "subfields" whereas the form that doesnt work only has "sublabels".
So it's the same for checkbox products? submission[id]? My guess would be maybe no product is being registered as selected because I'm not naming it correctly.
You can try it on there to see if maybe I'm being crazy and missing something else. Another odd thing I notice is that there is not even a cc_number field in correctly submitted payments when I retrieve submissions using the API
I believe the important distinction here to be one form is normal text data, the other requires a product and it seems the fundamental info architecture of a product is different than a normal form which you can observe through viewing successful submissions and/or questions of both types.
Yes, it is named correctly. The response shows multidimensional arrays and they're named that way just like how you name the first and last name fields.
For the Full Name field, you can identify each field using its sublabels array keys
"first": "First Name",
"middle": "Middle Name",
"last": "Last Name",
The same when you post answer on the payment field.
"cc_firstName": "First Name",
"cc_lastName": "Last Name",
"cc_number": "Credit Card Number",
"cc_ccv": "Security Code",
"cc_exp_month": "Expiration Month",
"cc_exp_year": "Expiration Year",
"addr_line1": "Street Address",
"addr_line2": "Street Address Line 2",
"state": "State \/ Province",
"postal": "Postal \/ Zip Code",
...and so on.
I've managed to get the full name to work, however the CC fields aren't populated with answers even with the same format so I am raising this thread to our developers so they can provide investigate and provide about this. Maybe I have missed something or there might be something wrong here.
They'll respond to you on this thread as soon as they're available.
Generally I try pretty hard to debug my own work before assuming something else (or someone else's work may be the problem) but I believe there may be a problem w/ accepting payments through the API. I only say this because it is still in beta and I have tried everything logical I could think of.
Btw, when I check submissions, the cc_number and other info is definitely received, just not archived as correct responses and no payment is made (which is particularly why I was assumign I was naming the product ID incorrectly, that is if everything else is working as it should that makes most sense as a possible cause of error).
Thanks for your input and apologies for this inconvenience.
I'll let our developers handle this particular case. We'll inform you here once there's any updates about this.
Thanks and Regards!
I will hold my breath.
(edited) Upon reviewing this ticket more closely we've decided to not implement it at this time due to security considerations. We may consider it in the future however.
Thanks for your understanding.