How can I handle donations through iOS?

But HOW does the organisation know the donations coming in, are from the app?

  1. Make a new page on the organization's site that has a URL that isn't linked to anywhere and non-indexable by search engines (robots.txt).
  2. In your app, make a UIWebView set to a URL on your own servers that redirects to the page you make in step 1. You should also make this URL non-indexable.

In that page

  1. Check that the referrer is your page
  2. Check that the user agent is whatever UIWebView sends
  3. Have the page log whatever happens somewhere (date/time, donation amount, etc) -- to reconcile with their data
  4. When a successful donation is made, it should record that it came from this page (and therefore, your app)

Someone could fake that they used your app by making the appropriate request, but why would they. Even if they did, you should probably get credit for that donation anyway.


You can't use IAP for any virtual good that are not consumed in the app as far as I know, apple will reject your app if you try it. (However i've seem some exceptions to that)

try www.stripe.com, they have the best payment interface i've seem so far.

someone even made an iOS SDK to help you with the implementation https://github.com/briancollins/stripe-ios


Update:

US non-profits can accept donations via Apple Pay:

Starting November 14, 2016, nonprofits based in the United States can use Apple Pay to provide a simple and secure way to accept donations from within their app and website. Similar to using Apple Pay to buy goods and services, users can donate without entering their billing, shipping, or contact details.

The App Store guidelines go on to say:

Acceptable

...

Approved nonprofits may fundraise directly within their own apps or third-party apps, provided those fundraising campaigns adhere to all App Review Guidelines and offer Apple Pay support. These apps must disclose how the funds will be used, abide by all required local and federal laws, and ensure appropriate tax receipts are available to donors. Additional information shall be provided to App Review upon request. Nonprofit platforms that connect donors to other nonprofits must ensure that every nonprofit listed in the app has also gone through the nonprofit approval process. Learn more about becoming an approved nonprofit.

Unacceptable

...

Unless you are an approved nonprofit or otherwise permitted under Section 3.2.1 (vi) above, collecting funds within the app for charities and fundraisers. Apps that seek to raise money for such causes must be free on the App Store and may only collect funds outside of the app, such as via Safari or SMS.

My old answer, below, predated this revision in the charitable giving policy.


As you note, section 21 of the App Store Review Guidelines says:

21.Charities and contributions

21.1 Apps that include the ability to make donations to recognized charitable organizations must be free

21.2 The collection of donations must be done via a web site in Safari or an SMS

You ask how you know if they're from your app: For Safari use a unique URL or include a HTTP parameter that you append to the URL when you invoke Safari, which their web server code will capture. As other have suggested, you might want to log the initiation of the transaction for your own reconciliation purposes, too. For SMS, I assume you'd have a dedicated SMS number for app donations.

Tags:

Ios

Donations