Introduction

Payment-API

With the FundraisingBox-Payment-API you can send your collected data directly to the app/payment-endpoint or you build up a session with the Introduction and process a complete session. You get a JSON in return.

For a 1-step-form we recommend to send the data directly to the payment-endpoint.

Use the forms/config to check which fields and values are available in your form.

📘

Form-API

We also provide our Form-API, a Javascript-jQuery-Plugin, for easy implementation on your website.

Authentication

You just have to provide the hash of your form, there is no secret authentication, because the donation form is a public part of your website. You can find the hash of your form in the settings of your form in your FundraisingBox.

Errors

On a successful API-request you get a JSON with HTTP status 200. Even if there are e.g. current_fields_errors on your session or the payment_status is "error", it was a successful request and it returns a JSON with status "success".

Only if there is an error preventing the API from working you get a JSON with status "error" and the corresponding HTTP error code, 400, 404 or 500.

{
  "status": "error",
  "error": "error 105: no hash"
}

Possible errors:

ErrorDescription
error 101: general error
error 900: general error
something went wrong, please contact our support
error 102: not owneryou are not allowed to use forms
error 103: inactivethe selected form is inactive
error 104: not api owneryou are not allowed to use the form api
error 105: no hashform hash is missing
error 106: no configno form has been found for the given hash
error 201: session incompleteyou can only process complete session with doPayment()
error 202: session processedprocessed sessions cannot be read or updated
error 203: session not foundwrong or no session hash at updateSession
error 204: session exists alreadyhash of existing session used for createSession
error 205: new session requires valuesyou have to submit some values for createSession
error 404: server error
error 500: server error
something is wrong with the server
maintenance: ...translated maintenance message...the FundraisingBox is currently in maintenance mode

❗️

IP of donation

You have to provide the IP of the user (not of your server!). This is required to block spamming users/bots, otherwise your server will be blocked!