Skip to main content

Create a donation

POST 

/v1/donations

Creates a new Donation of type direct. We will request payment from you for the Donations aggregated over a period. Goodstack and our associated foundations will then handle the ongoing safe and efficient disbursement of funds to the nonprofit.

Please note that if you are creating with a userId and no organisationId the user must be already supporting an organisation.

Request​

Header Parameters

    Idempotency-Key string

    Idempotency key.

Body

required

    oneOf

    amountintegerrequired

    Amount to be donated. A positive integer representing how much to donate in the smallest currency unit, for example 100 pence to donate £1.00.

    Example: 120
    currencyCodestringrequired

    Three-letter ISO currency code. Only currency codes supported by our foundations will be accepted.

    Example: GBP
    organisationIdstringrequired
    firstNamestring

    Possible values: <= 255 characters

    lastNamestring

    Possible values: <= 255 characters

    emailstring

    Possible values: <= 255 characters

    consentedToBeContactedByOrgstring

    Possible values: [yes, no]

    anonymousstring

    Possible values: [yes, no]

    metadataobject

    Key-value data that you can attach to a Donation.

    Example: {"key1":"value1","key2":"value2"}

Responses​

Successfully created a Donation

Schema

    data

    object

    idstring
    Example: donation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    userIdstringnullable
    organisationIdstringnullable
    amountinteger

    Donation amount. A positive integer representing donation amount in the smallest currency unit, for example 100 pence for a donation of £1.00.

    Example: 123
    currencyCodestring

    Three-letter ISO currency code

    Example: AUD
    createdAtdate-time
    Example: 2020-10-13T17:46:54.000Z
    statusstring

    Possible values: [ACTIVE, REQUESTED_PAYMENT, RECEIVED_PAYMENT, DISBURSED, CANCELLED]

    firstNamestringnullable

    Users first name.

    lastNamestringnullable

    Users last name.

    emailstringnullable

    Users email.

    consentedToBeContactedstringnullable

    Whether the user consented to be contacted by the benefitting organisation.

    Possible values: [yes, no]

    anonymousstringnullable

    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.

    property name*string
    giftAidIdstringnullable
    cancelledAtdate-timenullable
    Example: 2020-10-13T17:46:54.000Z
    donationRequestIdstringnullable
    Example: donationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    accountIdstringnullable
    Example: account_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    typestring

    Possible values: [direct]

    objectstring
    Example: donation