Skip to content

Donation form – automatic pre-filling

How to pre-fill the donation form automatically

If you want to implement your own donation form, simply send GET requests to the form page as described below. A code example of a custom form can be found here.

Note: if you have implemented a custom form for the old Darujme system (i.e. before 01/2017), the form will continue to work without any problems and there is no need to change anything.

Form URL

https://www.darujme.cz/darovat/{project-id}, for example https://www.darujme.cz/darovat/123

project-id: the project ID. Please note that this is not the “Project identification number” shown in the administration, but the ID that you can find in the administration, for example in the overview.

Parameters that can be sent

Parameter nameDescription
amountthe amount the donor wants to donate; a whole number
currencycurrency of the amount, allowed values CZK, EUR, USD, GBP
localelanguage, allowed values cs, en
paymentMethodpayment method, allowed values proxypay_charge (card payment), funds_transfer (bank transfer), gpay_charge (payment via Google Pay), apple_pay_charge (payment via Apple Pay – works only on Apple devices in the Safari browser). Discontinued payment methods: payu_transfer (instant transfer via PayU, available only for one-time payments).
payuMethodfor payu_transfer only. Allowed values cs, mp, kb, rf, pg, pv, pf, era, cb, psc, c, mo, bt, pt (bank codes)
frequencywhether the donor gives one-time or on a recurring basis, allowed values once, monthly. Default: once
monthsRecurringnumber of months the payment repeats. Please note that the number of payments is one higher than the number of months. Example: I enter a payment in January 2017 with monthsRecurring=2. The recurring payment will therefore be valid until March and the payments will be charged: immediately, then in February and then in March. In the donation form on Darujme.cz this option would be displayed as “03/2017 ‒ 3 payments”. Other allowed values: -1 = indefinitely (for both bank transfer and card transactions), -2 = until the card expires (for card transactions)
emaildonor's e-mail
firstNamedonor's first name
lastNamedonor's last name
phonedonor's phone number, minimum length 6 characters; besides digits, spaces and the characters -()x are allowed
streetstreet of the donor's address including the house number
citycity of the donor's address
postcodepostal code of the donor's address
wantDonationCertificatedoes the donor require a donation certificate? allowed values 0, 1. Default: 0
companyNamecorporate donation: company name
identificationNumbercorporate donation: Company ID (IČO)
vatIdentificationNumbercorporate donation: VAT ID

Custom fields

Each field has its own key set in the administration (it is set in the project's advanced settings).
In the URL, this key is passed in the custom field in the format
custom[fieldKey]
so for example
custom[naseId]

Automatic form submission:

Add the do parameter with the value submit to the URL

https://www.darujme.cz/darovat/?project=IDPROJEKTU&amount=CASTKA&currency=MENA&locale=JAZYK&paymentMethod=PLATEBNIMETODA&frequency=PRAVIDELNOST&email=EMAIL&firstName=JMENO&lastName=PRIJMENI&phone=TELEFON&street=ULICE&city=OBEC&postcode=PSC&wantDonationCertificate=HODNOTA&custom[naseId]=HODNOTA&do=submit

Example

https://www.darujme.cz/darovat/104?amount=1000&currency=CZK&locale=cs&paymentMethod=funds_transfer&frequency=once&email=john@doe.com&firstName=John&lastName=Doe&phone=777123456&street=Dlouhá%201&city=Praha%201&postcode=11000&wantDonationCertificate=1&custom[naseId]=123&do=submit

Questions and answers about custom forms

Can I set my own variable symbol?

It is not possible to set your own variable symbol (payment reference) for Darujme.cz (a technical limitation – it could collide with the system-generated ones). However, you can create a custom field for the project with a key such as naseId and send your variable symbol in it: custom[naseId]=123. Typically you set this field as hidden, so the donor will not see it even if you do not submit the Darujme.cz form automatically. We then store the custom field in our system, you will see it with the donation, and we can also pass it back to you when redirecting back to your website.

How to set up a custom return page?

Redirection to your own page after a successful or failed payment is again set up in the project's advanced settings. Below you will find a list of parameters that you can pass back to your website. The URL structure is up to you.

PlaceholderDescription
{klient}Organization name
{projekt}Project name
{cislo_uctu}Bank account number of the project
{cislo_projektu}Project number. The “Project identification number” shown in the administration
{nno_email}E-mail addresses for notifications about new donations, separated by commas
{datum_transakce}Date the transaction was entered into the system, in the format j.n.Y, e.g. 8.12.2016
{typ_transakce}One of the values: Běžným převodem (bank transfer), Platební kartou (payment card), Rychlý on-line převod přes internetové bankovnictví (instant online transfer via internet banking)
{technicky_typ_transakce}One of the values: prevod, sporitelna, payu
{typ_karty}As we do not store it, only an empty string is passed
{darujme_vs}Variable symbol (payment reference) generated by the Darujme.cz system
{castka}Amount entered by the user, without currency. E.g. 2555,00 (no thousands separator, comma as the decimal separator)
{mena}Currency of the donation. Values EUR, CZK, USD, GBP
{castka_s_menou}E.g. 2555,00 CZK
{cetnost}Jednorázově (one-time) or Měsíčně (monthly)
{datum_konce_opakovane_platby}Date on which the last payment is expected, in the format j.n.Y, e.g. 8.12.2018. For a one-time transaction, an empty string.
{datum_konce_opakovane_platby_pomlcka}Same as the previous one, but with a dash - instead of an empty string
{text_potvrzeni_o_daru}Does the donor want a donation certificate? value Ano (yes) or Ne (no)
{insert_day}Day from {datum_transakce}, e.g. 05
{insert_month}Month from {datum_transakce}, e.g. 09
{insert_year}Year from {datum_transakce}, e.g. 2016
{jmeno}Donor's first name
{prijmeni}Donor's last name
{telefon}Donor's phone number
{email}Donor's e-mail
{ulice}Street of the donor's address
{mesto}City of the donor's address
{psc}Postal code of the donor's address
{locale}Language, cs or en
{ic}Donor's Company ID (IČO)
{dic}Donor's VAT ID
{nazev_spolecnosti}Donor's company name
{donationCertificateUrl}URL for downloading the donation certificate (if the organization or project has certificates turned off, the value will be empty)
{utm_source}utm_source
{utm_medium}utm_medium
{utm_campaign}utm_campaign

All custom fields can also be used in the form {key}, where key is the key set in the project administration.

Code example – custom form

A code example of a custom form under the MIT license can be found in the GitHub repository: https://github.com/Darujme/vlastni-formular-priklad.

This is a code example of a custom form (plain HTML, CSS and JS) and the code is meant to be styled by you, i.e. the visual design is intentionally not addressed.