API reference · Recurring Donations
Create a recurring donation
POST/v1/recurring-donations
This recurring donation will then have to be claimed i.e linked to a Charity by the donor.
Requires a Bearer access token.
Body
CreateRecurringDonationDtocampaignId#stringrequiredUUIDId of the campaign
amount#integer (int64)requiredminimum 1Donation amount in minor currency unit i.e cents.
donorFirstName#stringrequiredFirst name of the donor. Will be used for email communications.
donorLastName#stringrequiredLast name of the donor. Will be used for email communications.
donorEmail#stringrequiredEmail of the donor. Will be used for email communications.
externalId#stringAn optional internal id of your system e.g orderId or customerId. Can be used to link a recurring donation to an entity in your system.
uniqueExternalId#stringSimilar to externalId but should be unique across all recurring donations. Can be used to prevent duplicate recurring donations.
language#stringLocale to be used to communicate with the donor. Default to the campaign's language value.
fren
Response
201 · RecurringDonationNo field is described in the spec.
recurringDonationId#stringalways returnedtype#RecurringDonationTypealways returnedFREQUENCYMANUALamountType#RecurringDonationAmountTypealways returnedFIXED_AMOUNTRATEstatus#RecurringDonationStatusalways returnedPENDINGACTIVEPAUSEDCANCELEDhasBeenCharged#booleanalways returnedfeeType#FeeTypealways returnedEXCLUDEDINCLUDEDamount#integer (int64)always returnedrate#numberbaseAmount#integer (int64)withRounding#booleanalways returnedfrequency#stringsecret#stringalways returnedexternalId#stringuniqueExternalId#stringsendingMode#CampaignSendingModealways returnedMANUALEMAILPHYSICALSLACKPOSTALsendingDate#string (date-time)sendingStatus#DonationSendingStatusalways returnedPENDINGFAILEDDONElastReminderId#stringmessage#stringreminderMessage#stringfrom#stringlanguage#Languagealways returnedfrenaccountId#stringalways returnedcampaignId#stringalways returnedcharityId#stringdonorId#stringalways returnedcreatedAt#string (date-time)always returnedupdatedAt#string (date-time)always returned
Errors
- 400 Bad Request
Recurring donations can only be created for FREE_AMOUNT campaigns
{ "statusCode": 400, "message": "Recurring donations can only be created for FREE_AMOUNT campaigns", "error": "Bad Request" }A field is missing, has the wrong type, or is not part of the request schema.
Every request with a body or query is validated.
{ "statusCode": 400, "message": [ "amount must not be less than 1", "property foo should not exist" ], "error": "Bad Request" }Bad Request
No resource with this id on your account: the API answers as if it did not exist.
{ "statusCode": 400, "message": "Bad Request" }- 401 Unauthorized
Unauthorized
Missing, expired or invalid access token.
{ "statusCode": 401, "message": "Unauthorized" }- 402 Payment Required
Missing payment method
{ "message": "Missing payment method", "code": "MISSING_PAYMENT_METHOD" }- 403 Forbidden
Campaign has ended.
{ "statusCode": 403, "message": "Campaign has ended.", "error": "Forbidden" }Recurring donations can only be created for recurring frequency campaigns.
{ "statusCode": 403, "message": "Recurring donations can only be created for recurring frequency campaigns.", "error": "Forbidden" }Campaign has to be activated first.
{ "statusCode": 403, "message": "Campaign has to be activated first.", "error": "Forbidden" }Account not validated
{ "statusCode": 403, "message": "Account not validated", "error": "Forbidden" }Account closed
{ "message": "Account closed", "code": "ACCOUNT_CLOSED" }- 409 Conflict
Unique constraint failed on uniqueExternalId
{ "statusCode": 409, "message": "Unique constraint failed on uniqueExternalId" }
curl -X POST https://api.sandbox.charitips.com/v1/recurring-donations \ -H "Authorization: Bearer $CHARITIPS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "campaignId": "<campaignId>", "amount": 2000, "donorFirstName": "Jane", "donorLastName": "Doe", "donorEmail": "jane.doe@example.com", "uniqueExternalId": "subscription_2291" }'Request bodies are written for this docs and checked against the API's validation; ids in angle brackets are placeholders. Response values are placeholders built from the schema.