Assuming you have custom fields already created for your site, you can add them to your API donation form.

First create the custom string in the shadow form:
  1. Log in as an administrator to your site.
  2. Navigate to Fundraising > Donation Management.
  3. Click Donation Forms.
  4. Find the donation form in question and click Edit.
  5. Click 3. Design Donor Screens.
  6. Under the Donor Screens list on the right, click Configure next to Donation Form.
  7. Under Select data elements to include in this form, click New.
  8. 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
  9. Under Select data elements to include in this form, select the field you just created and click Add>.
  10. Click Save Order and Edit Selected.
  11. 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.