Skip to main content
PUT
/
stripe
/
collections
/
settings
/
{id}
Update Stripe collection settings for Sequence account
curl --request PUT \
  --url https://eu.sequencehq.com/api/stripe/collections/settings/{id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "enableAutomaticPayments": false,
  "autoEnableStripePayments": true,
  "retryAnchor": "DUE_DATE",
  "retryOffsetDays": [
    0,
    7,
    14
  ]
}
'
import requests

url = "https://eu.sequencehq.com/api/stripe/collections/settings/{id}"

payload = {
"enableAutomaticPayments": False,
"autoEnableStripePayments": True,
"retryAnchor": "DUE_DATE",
"retryOffsetDays": [0, 7, 14]
}
headers = {"Content-Type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
enableAutomaticPayments: false,
autoEnableStripePayments: true,
retryAnchor: 'DUE_DATE',
retryOffsetDays: [0, 7, 14]
})
};

fetch('https://eu.sequencehq.com/api/stripe/collections/settings/{id}', 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://eu.sequencehq.com/api/stripe/collections/settings/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enableAutomaticPayments' => false,
'autoEnableStripePayments' => true,
'retryAnchor' => 'DUE_DATE',
'retryOffsetDays' => [
0,
7,
14
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$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://eu.sequencehq.com/api/stripe/collections/settings/{id}"

payload := strings.NewReader("{\n \"enableAutomaticPayments\": false,\n \"autoEnableStripePayments\": true,\n \"retryAnchor\": \"DUE_DATE\",\n \"retryOffsetDays\": [\n 0,\n 7,\n 14\n ]\n}")

req, _ := http.NewRequest("PUT", url, payload)

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.put("https://eu.sequencehq.com/api/stripe/collections/settings/{id}")
.header("Content-Type", "application/json")
.body("{\n \"enableAutomaticPayments\": false,\n \"autoEnableStripePayments\": true,\n \"retryAnchor\": \"DUE_DATE\",\n \"retryOffsetDays\": [\n 0,\n 7,\n 14\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://eu.sequencehq.com/api/stripe/collections/settings/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"enableAutomaticPayments\": false,\n \"autoEnableStripePayments\": true,\n \"retryAnchor\": \"DUE_DATE\",\n \"retryOffsetDays\": [\n 0,\n 7,\n 14\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "id": "018f6b0c-7e89-7b4a-8e47-1b2e2d5a4f6c",
  "sequenceAccountId": "683fe518-60c8-429f-9320-8aa7efc20bcc",
  "enableAutomaticPayments": true,
  "autoEnableStripePayments": false,
  "retryOffsetDays": []
}
This response has no body data.
This response has no body data.
This response has no body data.

Headers

Sequence-Version
enum<string>

Use this header to select an API version

Available options:
2024-07-30

Path Parameters

id
string
required

Stripe Collection Settings ID

Body

application/json
enableAutomaticPayments
boolean

Whether to automatically collect payments by default if payment details are available

Example:

false

autoEnableStripePayments
boolean

Whether to automatically enable Stripe payments for new billing schedules

Example:

true

retryAnchor
enum<string>

The invoice date that retry offsets are counted from. Null disables automatic retries.

Available options:
SENT_DATE,
DUE_DATE
Example:

"DUE_DATE"

retryOffsetDays
integer[]

Days after the anchor date on which to re-attempt collection, e.g. [0, 7, 14]

Example:
[0, 7, 14]

Response

OK

id
string
required
Example:

"018f6b0c-7e89-7b4a-8e47-1b2e2d5a4f6c"

sequenceAccountId
string
required
Example:

"683fe518-60c8-429f-9320-8aa7efc20bcc"

enableAutomaticPayments
boolean
required

Whether to automatically collect payments by default if payment details are available

Example:

true

autoEnableStripePayments
boolean
required

Whether to automatically enable Stripe payments for new billing schedules

Example:

false

retryOffsetDays
any[]
required

Days after the anchor date on which to re-attempt collection, e.g. [0, 7, 14]

Example:
[]