Recued
Menu
← Back to recipes

Swap tier on subscription change

by recued-core v2 43 views

Use “Swap tier on subscription change” in Recued. When a Stripe subscription this server sold changes, converge the customer onto the tier their entitlements now say they hold.

Complete workflow

Use Seller Subscription Payment Events in Recued for payment observer and provider source truth. It includes 1 related pack in one install.

You are viewing one recipe in this workflow. Installing it opens the complete pack so its other recipes and background automations arrive together.

Swap tier on subscription change
This recipe Background automation

Use “Swap tier on subscription change” in Recued. When a Stripe subscription this server sold changes, converge the customer onto the tier their entitlements now say they hold.

pack:seller-subscription-eventsrecipe-role:webhookpayment-observerprovider-source-truth
by recued-core pinned v2

Use “Observe seller subscription payment event” in Recued. It carries out the named workflow using the connections and settings you choose.

pack:seller-subscription-eventsrecipe-role:webhookpayment-observerprovider-source-truth
by recued-core pinned v4
Renew subscription access order
Background automation

Use “Renew subscription access order” in Recued. It carries out the named workflow using the connections and settings you choose.

pack:seller-subscription-eventsrecipe-role:webhookrenewalprovider-source-truth
by recued-core pinned v3

Use “Signal access on subscription payment failure” in Recued. When a Stripe subscription invoice fails to collect, report the subscription's provider-confirmed status against the paying customer's access on this door.

pack:seller-subscription-eventsrecipe-role:webhookpayment-observerprovider-source-truth
by recued-core pinned v2

Use “Close access on subscription cancellation” in Recued. When a Stripe subscription this server sold is deleted, close the paying customer's access on this door.

pack:seller-subscription-eventsrecipe-role:webhookpayment-observerprovider-source-truth
by recued-core pinned v2
Converge tier on entitlement change
Background automation

Use “Converge tier on entitlement change” in Recued. When a Stripe customer's active entitlement summary changes, converge their access onto the tier those entitlements now say they hold.

pack:seller-subscription-eventsrecipe-role:webhookpayment-observerprovider-source-truth
by recued-core pinned v2
View pack details, dependencies, and permissions →
How it works 42 steps

Inspect the data fetches, transforms, gates, and output this recipe runs.

Process (42 steps)
◆ webhook_event core.webhook.event.get
Get webhook event
■ profile_exact compare
Check if webhook event delivery profile id is one of stripe.event.v1
■ decoded_schema_exact compare
Check if webhook event delivery decoded schema id is one of stripe.event.v1
■ transport_exact compare
Check if webhook event delivery transport assurance is one of authenticated
■ source_truth_policy_exact compare
Check if webhook event delivery minimum source truth policy is one of provider_readback_required
■ freshness_exact compare
Check if webhook event delivery freshness checked is one of true
■ payload_object_exact compare
Check if webhook event payload object is one of event
■ payload_event_id_exact compare
Check if webhook event payload id is one of webhook event event provider event id
■ payload_event_type_exact compare
Check if webhook event payload type is one of webhook event event provider event type
■ envelope_shared_valid all
Check if all conditions are true
■ door_id trim
Trim whitespace from setting door id
■ door_id_present compare
Check if door id has data
■ event_type_supported compare
Check if webhook event event provider event type is one of customer.subscription.updated
■ subscription_payload_object_exact compare
Check if webhook event payload data object object is one of subscription
■ subscription_resource_id_matches compare
Check if webhook event payload data object id is one of webhook event event provider resource id
■ subscription_id_prefix starts_with
Check if webhook event event provider resource id starts with sub_
■ subscription_id_truncated truncate
Truncate webhook event event provider resource id to a max length
■ subscription_id_bounded compare
Check if webhook event event provider resource id is one of subscription id truncated
■ change_envelope_valid all
Check if all conditions are true
◆ subscription_read recued-core.seller-stripe.subscription.read
Read subscription on seller stripe
skip: step.change_envelope_valid equal false
■ subscription_object_exact compare
Check if subscription read result object is one of subscription
■ subscription_id_exact compare
Check if subscription read result id is one of webhook event event provider resource id
■ subscription_customer default
Apply default
■ subscription_customer_prefix starts_with
Check if subscription customer starts with cus_
■ subscription_workflow_key default
Apply default
■ subscription_is_ours compare
Check if subscription workflow key has data
■ subscription_live compare
Check if subscription read result status is one of active,trialing,past_due
■ entitlement_read_allowed all
Check if all conditions are true
◆ entitlements_read recued-core.seller-stripe.active_entitlement.search
Search active entitlement on seller stripe
skip: step.entitlement_read_allowed equal false
■ active_entitlement_keys pluck
Extract lookup_key from each item
◆ door_tiers_read core.seller.tier.list
List seller tier
skip: step.entitlement_read_allowed equal false
■ matched_door_tiers filter
Filter by condition
■ matched_tier_count count
Count items in matched door tiers
■ single_matched_tier compare
Check if matched tier count equals 1
■ target_entitlement_key default
Apply default
■ target_key_present compare
Check if target entitlement key has data
■ swap_allowed all
Check if all conditions are true
◆ swap_tier core.seller.customer-access.swap-tier
Swap tier seller customer access
skip: step.swap_allowed equal false
■ entitlements_ambiguous all
Check if all conditions are true
■ no_tier_on_this_door all
Check if all conditions are true
■ foreign_subscription_ignored all
Check if all conditions are true
■ event_summary to_summary
Format results as a summary card
▼
Output
summary event_summary
Settings 1 configurable

Configurable at install. Defaults shown — change them anytime in Recued.

door id setting = main

Uses (5 operations)

Webhooks Get webhook event core.webhook.event.get
Pack operation Read subscription on seller stripe recued-core.seller-stripe.subscription.read
Pack operation Search active entitlement on seller stripe recued-core.seller-stripe.active_entitlement.search
Selling List seller tier core.seller.tier.list
Selling Swap tier seller customer access core.seller.customer-access.swap-tier

Trust & control

What installing this recipe would let it do. Recued grants these permissions at install — review them there before approving.

What it's allowed to do

Read Webhooks core.webhook.event.get read-only
Read Selling core.seller.tier.list read-only
Write Selling core.seller.customer-access.swap-tier external change

2 more aren't listed here. You'll see them at install.

Data it touches

SurfacesWebhooksSelling
Warehousedata.object

About

Tags

pack:seller-subscription-eventsrecipe-role:webhookpayment-observerprovider-source-truthsellersubscriptiond-196

Details

42 steps 1 configurable settings recipe_id: swap-tier-on-subscription-change