Skip to main content
POST
/
api
/
v3
/
subscriptions
/
{donorId}
Create Subscription
curl --request POST \
  --url https://server.stage.overflow.co/api/v3/subscriptions/{donorId} \
  --header 'Content-Type: application/json' \
  --header 'x-client-id: <api-key>' \
  --data '
{
  "paymentMethodId": "6710f34fd5061afeec3eab57",
  "amount": 50,
  "frequency": "month",
  "startDate": "2025-01-15T05:00:00.000Z",
  "timezone": "America/Chicago",
  "anonymous": false,
  "campaignId": "7710f34fd5061afeec3eab78",
  "subcampaignId": "7710f34fd5061afeec3eab79",
  "donorNotes": "Happy to support this cause!"
}
'
{
  "data": {
    "id": "6710f34fd5061afeec3eab57",
    "donorId": "6710f34fd5061afeec3eab57",
    "createdAt": "2025-01-01T00:00:00.000Z",
    "updatedAt": "2025-01-01T00:00:00.000Z",
    "startDate": "2025-01-01T00:00:00.000Z",
    "status": "active",
    "amount": 50,
    "anonymous": false,
    "frequency": "weekly",
    "nextPaymentDate": "2025-01-01T00:00:00.000Z",
    "paymentMethod": {
      "id": "6710f34fd5061afeec3eab57",
      "holderName": "John Doe",
      "type": "card",
      "last4": "4242",
      "expiration": "12/2025"
    },
    "campaign": {
      "id": "7710f34fd5061afeec3eab78",
      "name": "Mission 2025"
    },
    "subcampaign": {
      "id": "7710f34fd5061afeec3eab79",
      "name": "Toy Drive"
    },
    "donorCoveredFees": false
  }
}

Authorizations

x-client-id
string
header
required

Client ID for API authentication

Path Parameters

donorId
string
required

The Id of the donor to create the subscription for.

Example:

"2ea1ae03ca521e437db76d76"

Body

application/json

Subscription creation details

paymentMethodId
string
required

Id of the payment method.

Example:

"6710f34fd5061afeec3eab57"

amount
number
required

Subscription amount in dollars.

Required range: x > 0
Example:

50

frequency
enum<string>
required

Recurring frequency for the subscription.

Available options:
two-weeks,
1st-15th,
month,
one-time,
week
Example:

"month"

startDate
string<date-time>

ISO 8601 date string when the subscription should start.

Example:

"2025-01-15T05:00:00.000Z"

timezone
string

Timezone for the subscription start date. Defaults to UTC if not provided.

Example:

"America/Chicago"

anonymous
boolean

Whether the donor wants the contribution to be anonymous.

Example:

false

campaignId
string

Id of the campaign to allocate funds to

Example:

"7710f34fd5061afeec3eab78"

subcampaignId
string

Id of the subcampaign for more specific allocation.

Example:

"7710f34fd5061afeec3eab79"

donorNotes
string

Notes from the donor.

Example:

"Happy to support this cause!"

Response

Subscription created successfully

data
object
required

The subscription that was created