Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
235 lines (184 sloc) 4.76 KB

Client Donation Pledges Status ⇄ Creation

GET https://api.betterplace.org/de/api_v4/clients/devk/donation_pledges/1170.json

For betterplace.org clients only:

After submitting a donation pledge, you should check the status of the asynchronous pledge job. It returns a JSON response, containing information about its status, including failure reasons in the case of a failure.

TODO: Be aware that you need a donation pledge ID to use this endpoint which is not fully implemented yet. Please contact us in case you need it!

URL Parameters

Parameter Example Required Description
language en yes

The donation is marked with the language you use in your URL.

client_id devk yes

The betterplace.org-internal client permalink.

id 1170 yes

The ID of the donation pledge.

TODO: In the future this will be returned within the response of a successful donation pledge POST.

Response Attributes

Root Attributes

Attribute Types Example Description
id number 1

An integer number ≥ 1

created_at string "1994-11-05T13:15:30Z"

DateTime (ISO8601 with Timezone)

updated_at string "1994-11-05T13:15:30Z"

DateTime (ISO8601 with Timezone)

confirmed_at undefined 2016-11-11T09:50:06+01:00

DateTime (ISO8601 with Timezone)

failed_at undefined 2016-11-11T09:50:06+01:00

DateTime (ISO8601 with Timezone)

state string "confirmed"

One of "pending", "confirmed" or "failed".

  • pending The system is still processing this donation. Please check again soon.
  • confirmed The donation is confirmed. This state is final.
  • failed The donation failed. Please check the failure_code. This state is final.
failure_code string pool_missing

A set of failure codes.
You could use this to choose follow up actions in your application. More details about each error are part of the failure_reason.

  • pool_missing No pool available
  • pool_empty Not enough money on the pool
  • receiver_prohibited_from_receiving_donations The forwarding request's receiver may not receive donations
  • donation_invalid Generic error, look at failure_reason for details
This list might be extended at any time. Please make sure you receive a notification if you encounter a new code. Codes will note be removed but might be depricated and not used anymore at some point in the future.
failure_reason string

A more detailed description of the failure.
This message is meant to be interpreted by a developer, not by a customer/user. The message might change at any time, don't use it to match actions based on the message string.

Response Links

Linkname Description

donation

Link to the related donation (client donation details)

Response Example

{
  "id": 1,
  "created_at": "2016-04-04T17:50:22+02:00",
  "updated_at": "2016-04-04T17:50:23+02:00",
  "confirmed_at": "2016-04-04T17:50:23+02:00",
  "failed_at": null,
  "state": "confirmed",
  "failure_code": null,
  "failure_reason": null,
  "links": [
    {
      "rel": "donation",
      "href": "https://api.betterplace.org/de/api_v4/clients/natehelps/client_donations/4b9b5d2b6e38f8102acb.json"
    }
  ]
}