Skip to main content
All CollectionsDonation Forms
Donation Forms (DEPRECATED)
Donation Forms (DEPRECATED)

How can I create a donation form and integrate it into my website?

Erdi avatar
Written by Erdi
Updated over 2 months ago

What is the donation form?

Donation forms are an infrastructure that allows you to receive donations by integrating them into your website. You can create a donation form by entering Donations > Donation Form in the left menu.

What should be paid attention to?

The most important point to consider when creating the donation form is to enter the website address where you will use the form. When entering the address, you must include https:// at the beginning. And if your website has multiple versions, you should make it unique. Donation forms only work with HTTPS.

For example;

If your site works as both https://www.adimadim.org and https://adimadim.org, please select only one and direct the domain you did not choose to the other.

Website Integration

ATTENTION! Integration requires basic software development skills. If you are not familiar with HTML and Javascript, please use our standart donation pages.

First, you can get the API key (api_key) and Campaign Code (campaign) required to use the form on your page from the Operations > Integration Information section in the donation form list.

Just before the </head> part of your web page, add our script to the page as follows.

<meta name="Referrer" content="origin"><script type="text/javascript" src="https://s.fonzip.com/js/fonzip.loader.js"></script>

After you have prepared the sections on your web page where you will receive the amount and regular donation parameters, you should call the fz.bagis function when the donate button is clicked.

Parameters

  • api_key: Your API Key (Required)

  • amount: Donation Amount (Required)

  • currency: Currency ISO code, default institution currency

  • recurring: Is it monthly donation (Required)

  • campaign: Your Campaign Code (Required)

  • lang: Blank or "tr" for Turkish, "en" for English, browser language by default

  • get_news: Granting communication permission, true if granted, false if not

  • referring: If you want to open donation on behalf of someone true, otherwise false

  • cardholder_name: If the donor's name and surname are requested, it must be filled in

  • email: If the e-mail address is requested to be filled, it must be filled in

  • ref_to: If you want the name of the person on whose behalf you are donating to be filled, it must be filled in

  • ref_email: If you want the e-mail of the person on whose behalf you are donating to be filled, it must be filled in

  • tckno: If you want the ID number to be filled, it should be filled in 11 digits.

  • phone: If you want the phone to come in full, it should be filled, just with numbers

  • birthday: Date of birth must be in DD / MM / YYYY format and must be filled in if desired

  • details: Description field must be filled in if it is desired to be filled

  • api_tracking_id: The code required to follow the opened form

  • fundraising_campaign_id: It should be sent if the opened form is requested to be linked to a fundraising campaign.

  • name_hidden: Should the name be hidden in the donation to the fundraising campaign?

  • amount_visible: Do the donation amount appear in the donation made to the fundraising campaign?

  • onload: When the donation form is opened, the actions you want to be done on your page

  • success: When the donation is completed, the transactions you want to be done on your page return the successful donation information

  • error: Actions you want to be done on your page when donation fails

  • close: When the form is closed, if the actions you want to be done on your page are closed after a successful donation, the result parameter returns true

fz.bagis({        api_key: "YOUR API KEY",    amount: "Amount",    currency: "Currency ISO code",    recurring: false || true,    campaign: "YOUR CAMPAIGN CODE",    lang:"tr",    get_news: true,    referring: false,    cardholder_name: "Donor's name/surname",    email: "E-mail address",    ref_to: "Name of the person on whose behalf being donated",    ref_email: "E-mail of the person on whose behalf being donated",    tckno: "ID No",    phone: "Phone",    birthday: "DD/MM/YYYY",    details: "Details",    api_tracking_id: "Tracking Code",    fundraising_campaign_id: "Fundraising Campaign id",    name_hidden: false || true,    amount_visible: false || true,    onload: function() {        //YOUR ACTIONS WHEN THE INSTALLATION IS COMPLETED    },    success: function(data) {        var donor_name = data.name;        var donation_amount = data.amount;        var donor_email = data.email;        var campaign_id = data.campaign_id;        var address = data.address;        var phone = data.phone;        var identity_no = data.tckno;        var birthday = data.birthday;        var city = data.city;        var district = data.district;        var details = data.details;        var in_honor_of_someone = data.referring;        var honoree_name = data.referring_name;        var honoree_email = data.referring_email;        var recurring = data.recurring;        var order_id = data.order_id;        var transaction_id = data.transaction_id;        var provision_no = data.provision_no;        var api_tracking_id = data.api_tracking_id;        // ACTIONS IF TRANSACTION IS SUCCESSFUL    },    error: function(data) {        var error_code = data.error_code;        var error_description = data.error_description;        // ACTIONS IF TRANSCACTION FAILED    },    close: function(result) {        //if true successful donation, if not others        //Actions to be taken when the form is closed    }});

Code Example

You can get exapmle HTML, CSS and Javascript files from https://bitbucket.org/erdifonzip/fonzip-donation-form-integration.

Did this answer your question?