customer_portal_settings
This resource controls all aspects of the Foxy customer portal and /s/customer endpoint. It configures session lifespans, allowed origins for CORS, SSO settings, JWT authentication, customer self-registration, and subscription modification rules.
Required Scopes
store_full_access customer_portal_settings_read customer_portal_settings_write Actions
Properties (24)
sessionLifespanInMinutes Number Life span of the customer portal session in minutes. Maximum 40320 (4 weeks).
allowedOrigins Array An array of domains. No trailing slashes, must be https unless it's localhost. Can accept a port. Allow up to 10 entries.
sso Boolean If this field is true, the legacy API key or SSO key from the store is saved in settings. For false, it is dropped.
ssoSecret String · Read-only SSO secret for SSO URLs.
jwtSharedSecret String Shared secret key for JWT authentication. Must be more than 40 and less than 100 characters.
jwtPrivateKey String · Read-only Private key for JWT signing.
signUp Object Object with settings to allow customers to register, sign up, and create new accounts.
signUp.enabled Boolean True to allow customers to create a user from the front end in the customer portal. Default false.
signUp.verification Object Object with settings for customer verification (e.g. CAPTCHA) on the signup form. A Foxy-provided default hCaptcha account is used for convenience, but you can use your own hCaptcha account if desired.
signUp.verification.type String The type of verification. Currently only supports hcaptcha.
signUp.verification.siteKey String The site key from hCaptcha. Note that site_key is also accepted. Max length 100 characters.
signUp.verification.secretKey String The secret key from hCaptcha. Note that secret_key is also accepted. Max length 100 characters.
subscriptions Object Object containing subscription modification settings with allowFrequencyModification and allowNextDateModification fields.
subscriptions.allowFrequencyModification Array An array of objects, each with a jsonataQuery (valid JSONata query, max 200 characters) and values (array of frequency strings matching sub_frequency regex, max 20 entries, max 4 characters each). Max 10 entries.
subscriptions.allowNextDateModification Boolean or Array Controls whether customers can modify the next payment date. Can be a simple boolean or an array of objects with min, max, jsonataQuery, disallowedDates, and allowedDays properties.
subscriptions.allowNextDateModification.min String Beginning of the time period this rule applies to as a frequency. Example: 2w (at least 2 weeks from now). Max 50 characters.
subscriptions.allowNextDateModification.max String End of the time period this rule applies to as a frequency. Example: 1y (at most 1 year from now). Max 50 characters.
subscriptions.allowNextDateModification.jsonataQuery String Subscription selector that should be a valid JSONata query. Max 200 characters.
subscriptions.allowNextDateModification.disallowedDates Array List of dates (YYYY-MM-DD) that customers can't pick as next payment date. Also accepts YYYY-MM-DD..YYYY-MM-DD as a range. Max 10 entries.
subscriptions.allowNextDateModification.allowedDays Object A pattern defining the days available for customers to pick as the next payment date.
subscriptions.allowNextDateModification.allowedDays.type String Constraint type. If day, contains days of week only. If month, contains days of month only.
daymonth subscriptions.allowNextDateModification.allowedDays.days Array Days of week (1-7 where 1 is Monday and 7 is Sunday) or days of month (1-31).
date_created String (nullable) · Read-only The date this resource was created.
date_modified String (nullable) · Read-only The date this resource was last modified.
Link Relations (2)
self Store Customer Portal Settings Example Representation
{
"_links": {
"curies": [
{
"name": "fx",
"href": "https://api.foxycart.com/rels/{rel}",
"templated": true
}
],
"self": {
"href": "https://api.foxycart.com/stores/456/customer_portal_settings",
"title": "Store Customer Portal Settings"
},
"fx:store": {
"href": "https://api.foxycart.com/stores/456",
"title": "This Store"
}
},
"sessionLifespanInMinutes": 90,
"allowedOrigins": [
"https://themancan.com"
],
"subscriptions": {
"allowFrequencyModification": [
{
"jsonataQuery": "$contains(frequency, \"w\")",
"values": [
"1w",
"2w",
"3w",
"4w",
"5w",
"6w",
"7w",
"8w",
"9w",
"10w",
"11w",
"12w"
]
}
],
"allowNextDateModification": [
{
"allowedDays": {
"days": [
1,
2,
3
],
"type": "day"
},
"disallowedDates": [
"2020-09-02",
"2020-09-01..2020-09-03",
"2020-09-01"
],
"jsonataQuery": "$contains(frequency, \"w\")",
"max": "1y",
"min": "2w"
}
]
},
"jwtSharedSecret": "ac733fbd-76c0-4cde-8a4c-5c1842e4fb9a-df5d119e-eaec-4967-9fc9-1d4414c55adb",
"sso": true,
"date_created": "2020-04-13T08:44:09-0700",
"date_modified": "2020-04-13T08:46:03-0700"
}