Record the subscription texts choice
Keeps the shopper’s choice about recurring subscription texts on the
cart. Each call replaces the previous choice, so the last one before
checkout wins. When the checkout creates subscriptions, the choice is
copied into the company’s consent record with the disclosure text the
shopper saw, their IP address and their user agent. A shopper who
unchecks the box is recorded as declined, and a decline never opts a
phone out. The choice is separate from sms_marketing, which this call
never changes.
Send opted_in, the phone the shopper typed, and the
disclosure_version from GET on this path. Only US and Canadian phone
numbers are accepted. The response repeats the choice with the phone in
E.164 form and never carries the IP address or user agent.
Returns 404 when Subscription Pro text reminders are not available to
the cart’s company, the same as for an unknown cart token. Returns
422 with an error_code of invalid_params for a missing or malformed
field, stale_disclosure for an opt-in whose disclosure_version is
not current (the response names the current one in current_version;
a decline is recorded whatever version it names), and
unsupported_phone_country for a phone that is not a valid US or
Canadian number. A cart that is charged but not yet processed still
accepts the choice and returns 200. Returns 410 for a cart that is
processed or in an authorized enrollment, and 409 while a redirect
payment is open.
curl --request PUT \
--url https://api.fluid.app/api/checkout/v2026-04/carts/{cart_token}/sms-consent \
--header 'Content-Type: application/json' \
--data '
{
"opted_in": true,
"phone": "(415) 555-2671",
"disclosure_version": "2026-10-draft-1"
}
'import requests
url = "https://api.fluid.app/api/checkout/v2026-04/carts/{cart_token}/sms-consent"
payload = {
"opted_in": True,
"phone": "(415) 555-2671",
"disclosure_version": "2026-10-draft-1"
}
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({opted_in: true, phone: '(415) 555-2671', disclosure_version: '2026-10-draft-1'})
};
fetch('https://api.fluid.app/api/checkout/v2026-04/carts/{cart_token}/sms-consent', 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://api.fluid.app/api/checkout/v2026-04/carts/{cart_token}/sms-consent",
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([
'opted_in' => true,
'phone' => '(415) 555-2671',
'disclosure_version' => '2026-10-draft-1'
]),
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://api.fluid.app/api/checkout/v2026-04/carts/{cart_token}/sms-consent"
payload := strings.NewReader("{\n \"opted_in\": true,\n \"phone\": \"(415) 555-2671\",\n \"disclosure_version\": \"2026-10-draft-1\"\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://api.fluid.app/api/checkout/v2026-04/carts/{cart_token}/sms-consent")
.header("Content-Type", "application/json")
.body("{\n \"opted_in\": true,\n \"phone\": \"(415) 555-2671\",\n \"disclosure_version\": \"2026-10-draft-1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/checkout/v2026-04/carts/{cart_token}/sms-consent")
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 \"opted_in\": true,\n \"phone\": \"(415) 555-2671\",\n \"disclosure_version\": \"2026-10-draft-1\"\n}"
response = http.request(request)
puts response.read_body{
"sms_consent": {
"opted_in": true,
"phone": "+14155552671"
},
"meta": {
"request_id": "6f1c2a9e-3b7d-4e58-9a21-c4d8e0b7f312",
"timestamp": "2026-10-12T15:22:08Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "payment_in_progress",
"shop_url": "<string>",
"cart": "<unknown>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"shop_url": "<string>",
"cart": "<unknown>"
}
}{
"error_message": "The disclosure is out of date",
"error_code": "stale_disclosure",
"errors": {},
"current_version": "2026-10-draft-1",
"meta": {
"request_id": "6f1c2a9e-3b7d-4e58-9a21-c4d8e0b7f312",
"timestamp": "2026-10-12T15:22:08Z"
}
}Path Parameters
Cart token
Body
Whether the customer agrees to receive recurring subscription texts.
The phone number to text, in any format a customer types. Only US and Canadian numbers are accepted.
The version of the disclosure the customer saw, from the GET on the same path.
curl --request PUT \
--url https://api.fluid.app/api/checkout/v2026-04/carts/{cart_token}/sms-consent \
--header 'Content-Type: application/json' \
--data '
{
"opted_in": true,
"phone": "(415) 555-2671",
"disclosure_version": "2026-10-draft-1"
}
'import requests
url = "https://api.fluid.app/api/checkout/v2026-04/carts/{cart_token}/sms-consent"
payload = {
"opted_in": True,
"phone": "(415) 555-2671",
"disclosure_version": "2026-10-draft-1"
}
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({opted_in: true, phone: '(415) 555-2671', disclosure_version: '2026-10-draft-1'})
};
fetch('https://api.fluid.app/api/checkout/v2026-04/carts/{cart_token}/sms-consent', 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://api.fluid.app/api/checkout/v2026-04/carts/{cart_token}/sms-consent",
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([
'opted_in' => true,
'phone' => '(415) 555-2671',
'disclosure_version' => '2026-10-draft-1'
]),
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://api.fluid.app/api/checkout/v2026-04/carts/{cart_token}/sms-consent"
payload := strings.NewReader("{\n \"opted_in\": true,\n \"phone\": \"(415) 555-2671\",\n \"disclosure_version\": \"2026-10-draft-1\"\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://api.fluid.app/api/checkout/v2026-04/carts/{cart_token}/sms-consent")
.header("Content-Type", "application/json")
.body("{\n \"opted_in\": true,\n \"phone\": \"(415) 555-2671\",\n \"disclosure_version\": \"2026-10-draft-1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/checkout/v2026-04/carts/{cart_token}/sms-consent")
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 \"opted_in\": true,\n \"phone\": \"(415) 555-2671\",\n \"disclosure_version\": \"2026-10-draft-1\"\n}"
response = http.request(request)
puts response.read_body{
"sms_consent": {
"opted_in": true,
"phone": "+14155552671"
},
"meta": {
"request_id": "6f1c2a9e-3b7d-4e58-9a21-c4d8e0b7f312",
"timestamp": "2026-10-12T15:22:08Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "payment_in_progress",
"shop_url": "<string>",
"cart": "<unknown>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"shop_url": "<string>",
"cart": "<unknown>"
}
}{
"error_message": "The disclosure is out of date",
"error_code": "stale_disclosure",
"errors": {},
"current_version": "2026-10-draft-1",
"meta": {
"request_id": "6f1c2a9e-3b7d-4e58-9a21-c4d8e0b7f312",
"timestamp": "2026-10-12T15:22:08Z"
}
}