First create the custom string in the shadow form:
- Log in as an administrator to your site.
- Navigate to Fundraising > Donation Management.
- Click Donation Forms.
- Find the donation form in question and click Edit.
- Click 3. Design Donor Screens.
- Under the Donor Screens list on the right, click Configure next to Donation Form.
- Under Select data elements to include in this form, click New.
- Fill out the fields in the Data Form Designer. For 5. Update Contact, select "Save on an existing profile field". Select "Additional Information" as the field type. Select the field name. Click Apply
- Under Select data elements to include in this form, select the field you just created and click Add>.
- Click Save Order and Edit Selected.
- Click Finish.
After the custom field is created, you'll need to derive the name of the element to put into your API form. The name of the API parameter is derived from the Data Element Name provided for the custom field. The Data Element Name is converted into a valid identifier by converting all letters to lower case and replacing all non-alphanumeric characters with underscores. So a Data Element Name of "My Custom String" should be passed into the donation API as "my_custom_string". Note that the "Data Element Name" is the same across all donation forms, and is not the same as the label that you actually specify in the form.
For more information on creating a custom donation API form, see http://open.convio.com/api/#donation_api.donate_method.html.