Cancel a Donation
POST/v1/donations/:id/cancel
Applicable only to direct type Donations created directly through the Create A Donation API.
Request​
Path Parameters
Id of the Donation to cancel.
Responses​
- 200
- 400
- 401
- 403
Successfully cancelled a Donation
- application/json
- Schema
- Example (from schema)
Schema
data
object
donation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxDonation amount. A positive integer representing donation amount in the smallest currency unit, for example 100 pence for a donation of £1.00.
123Three-letter ISO currency code
AUD2020-10-13T17:46:54.000ZPossible values: [ACTIVE, REQUESTED_PAYMENT, RECEIVED_PAYMENT, DISBURSED, CANCELLED]
Users first name.
Users last name.
Users email.
Whether the user consented to be contacted by the benefitting organisation.
Possible values: [yes, no]
Whether the user wants to share their donation publicly or not.
Possible values: [yes, no]
metadata
object
nullable
Key-value data that you can attach to an object.
2020-10-13T17:46:54.000Zdonationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxaccount_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxPossible values: [direct]
donation{
"data": {},
"object": "donation"
}
Bad request
- application/json
- Schema
- Example (from schema)
- InvalidState
Schema
error
object
{
"error": {
"code": "string",
"title": "string",
"message": "string",
"reasons": [
"string"
]
}
}
Donation - Invalid state
{
"error": {
"code": "donation/invalid_state",
"title": "Bad request",
"message": "Donation is not in a valid state to update"
}
}
Unauthorized
Forbidden (scope)
- application/json
- Schema
- Example (from schema)
Schema
error
object
forbiddenForbiddenAccess is denied due to missing scope permissions{
"error": {
"code": "forbidden",
"title": "Forbidden",
"message": "Access is denied due to missing scope permissions"
}
}