curl --request PATCH \
--url https://server.stage.overflow.co/api/v3/subscriptions/{donorId}/{subscriptionId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-client-id: <api-key>' \
--data '
{
"paymentMethodId": "6710f34fd5061afeec3eab57",
"amount": 50,
"startDate": "2025-01-15T05:00:00.000Z",
"timezone": "America/Chicago",
"anonymous": false,
"campaignId": "7710f34fd5061afeec3eab78",
"subcampaignId": "7710f34fd5061afeec3eab79",
"donorNotes": "Happy to support this cause!"
}
'import requests
url = "https://server.stage.overflow.co/api/v3/subscriptions/{donorId}/{subscriptionId}"
payload = {
"paymentMethodId": "6710f34fd5061afeec3eab57",
"amount": 50,
"startDate": "2025-01-15T05:00:00.000Z",
"timezone": "America/Chicago",
"anonymous": False,
"campaignId": "7710f34fd5061afeec3eab78",
"subcampaignId": "7710f34fd5061afeec3eab79",
"donorNotes": "Happy to support this cause!"
}
headers = {
"x-client-id": "<api-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-client-id': '<api-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
paymentMethodId: '6710f34fd5061afeec3eab57',
amount: 50,
startDate: '2025-01-15T05:00:00.000Z',
timezone: 'America/Chicago',
anonymous: false,
campaignId: '7710f34fd5061afeec3eab78',
subcampaignId: '7710f34fd5061afeec3eab79',
donorNotes: 'Happy to support this cause!'
})
};
fetch('https://server.stage.overflow.co/api/v3/subscriptions/{donorId}/{subscriptionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://server.stage.overflow.co/api/v3/subscriptions/{donorId}/{subscriptionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'paymentMethodId' => '6710f34fd5061afeec3eab57',
'amount' => 50,
'startDate' => '2025-01-15T05:00:00.000Z',
'timezone' => 'America/Chicago',
'anonymous' => false,
'campaignId' => '7710f34fd5061afeec3eab78',
'subcampaignId' => '7710f34fd5061afeec3eab79',
'donorNotes' => 'Happy to support this cause!'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-client-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://server.stage.overflow.co/api/v3/subscriptions/{donorId}/{subscriptionId}"
payload := strings.NewReader("{\n \"paymentMethodId\": \"6710f34fd5061afeec3eab57\",\n \"amount\": 50,\n \"startDate\": \"2025-01-15T05:00:00.000Z\",\n \"timezone\": \"America/Chicago\",\n \"anonymous\": false,\n \"campaignId\": \"7710f34fd5061afeec3eab78\",\n \"subcampaignId\": \"7710f34fd5061afeec3eab79\",\n \"donorNotes\": \"Happy to support this cause!\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-client-id", "<api-key>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://server.stage.overflow.co/api/v3/subscriptions/{donorId}/{subscriptionId}")
.header("x-client-id", "<api-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"paymentMethodId\": \"6710f34fd5061afeec3eab57\",\n \"amount\": 50,\n \"startDate\": \"2025-01-15T05:00:00.000Z\",\n \"timezone\": \"America/Chicago\",\n \"anonymous\": false,\n \"campaignId\": \"7710f34fd5061afeec3eab78\",\n \"subcampaignId\": \"7710f34fd5061afeec3eab79\",\n \"donorNotes\": \"Happy to support this cause!\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.stage.overflow.co/api/v3/subscriptions/{donorId}/{subscriptionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-client-id"] = '<api-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentMethodId\": \"6710f34fd5061afeec3eab57\",\n \"amount\": 50,\n \"startDate\": \"2025-01-15T05:00:00.000Z\",\n \"timezone\": \"America/Chicago\",\n \"anonymous\": false,\n \"campaignId\": \"7710f34fd5061afeec3eab78\",\n \"subcampaignId\": \"7710f34fd5061afeec3eab79\",\n \"donorNotes\": \"Happy to support this cause!\"\n}"
response = http.request(request)
puts response.read_bodyUpdate Subscription
Updates a donor subscription by its Id.
curl --request PATCH \
--url https://server.stage.overflow.co/api/v3/subscriptions/{donorId}/{subscriptionId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-client-id: <api-key>' \
--data '
{
"paymentMethodId": "6710f34fd5061afeec3eab57",
"amount": 50,
"startDate": "2025-01-15T05:00:00.000Z",
"timezone": "America/Chicago",
"anonymous": false,
"campaignId": "7710f34fd5061afeec3eab78",
"subcampaignId": "7710f34fd5061afeec3eab79",
"donorNotes": "Happy to support this cause!"
}
'import requests
url = "https://server.stage.overflow.co/api/v3/subscriptions/{donorId}/{subscriptionId}"
payload = {
"paymentMethodId": "6710f34fd5061afeec3eab57",
"amount": 50,
"startDate": "2025-01-15T05:00:00.000Z",
"timezone": "America/Chicago",
"anonymous": False,
"campaignId": "7710f34fd5061afeec3eab78",
"subcampaignId": "7710f34fd5061afeec3eab79",
"donorNotes": "Happy to support this cause!"
}
headers = {
"x-client-id": "<api-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-client-id': '<api-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
paymentMethodId: '6710f34fd5061afeec3eab57',
amount: 50,
startDate: '2025-01-15T05:00:00.000Z',
timezone: 'America/Chicago',
anonymous: false,
campaignId: '7710f34fd5061afeec3eab78',
subcampaignId: '7710f34fd5061afeec3eab79',
donorNotes: 'Happy to support this cause!'
})
};
fetch('https://server.stage.overflow.co/api/v3/subscriptions/{donorId}/{subscriptionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://server.stage.overflow.co/api/v3/subscriptions/{donorId}/{subscriptionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'paymentMethodId' => '6710f34fd5061afeec3eab57',
'amount' => 50,
'startDate' => '2025-01-15T05:00:00.000Z',
'timezone' => 'America/Chicago',
'anonymous' => false,
'campaignId' => '7710f34fd5061afeec3eab78',
'subcampaignId' => '7710f34fd5061afeec3eab79',
'donorNotes' => 'Happy to support this cause!'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-client-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://server.stage.overflow.co/api/v3/subscriptions/{donorId}/{subscriptionId}"
payload := strings.NewReader("{\n \"paymentMethodId\": \"6710f34fd5061afeec3eab57\",\n \"amount\": 50,\n \"startDate\": \"2025-01-15T05:00:00.000Z\",\n \"timezone\": \"America/Chicago\",\n \"anonymous\": false,\n \"campaignId\": \"7710f34fd5061afeec3eab78\",\n \"subcampaignId\": \"7710f34fd5061afeec3eab79\",\n \"donorNotes\": \"Happy to support this cause!\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-client-id", "<api-key>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://server.stage.overflow.co/api/v3/subscriptions/{donorId}/{subscriptionId}")
.header("x-client-id", "<api-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"paymentMethodId\": \"6710f34fd5061afeec3eab57\",\n \"amount\": 50,\n \"startDate\": \"2025-01-15T05:00:00.000Z\",\n \"timezone\": \"America/Chicago\",\n \"anonymous\": false,\n \"campaignId\": \"7710f34fd5061afeec3eab78\",\n \"subcampaignId\": \"7710f34fd5061afeec3eab79\",\n \"donorNotes\": \"Happy to support this cause!\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.stage.overflow.co/api/v3/subscriptions/{donorId}/{subscriptionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-client-id"] = '<api-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentMethodId\": \"6710f34fd5061afeec3eab57\",\n \"amount\": 50,\n \"startDate\": \"2025-01-15T05:00:00.000Z\",\n \"timezone\": \"America/Chicago\",\n \"anonymous\": false,\n \"campaignId\": \"7710f34fd5061afeec3eab78\",\n \"subcampaignId\": \"7710f34fd5061afeec3eab79\",\n \"donorNotes\": \"Happy to support this cause!\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Client ID for API authentication
API Key for API authentication
Path Parameters
The Id of the donor to update the subscription for.
"2ea1ae03ca521e437db76d76"
The Id of the subscription to update.
"2ea1ae03ca521e437db76d76"
Body
Subscription update details
Id of the payment method.
"6710f34fd5061afeec3eab57"
Subscription amount in dollars.
x > 050
ISO 8601 date string when the subscription should start.
"2025-01-15T05:00:00.000Z"
Timezone for the subscription start date. Defaults to UTC if not provided.
"America/Chicago"
Whether the donor wants the contribution to be anonymous.
false
Id of the campaign to allocate funds to
"7710f34fd5061afeec3eab78"
Id of the subcampaign for more specific allocation.
"7710f34fd5061afeec3eab79"
Notes from the donor.
"Happy to support this cause!"
biweekly, monthly, weekly Response
Subscription updated successfully.
Was this page helpful?