← Voltar para Flows
Cron: Subscription Renewal Check Flow
Name
Cron: Subscription Renewal Check Flow
Description
Job diário checa renovações e falhas de pagamento; notifica usuário.
Trigger Event
check_subscription_renewals
Validated
Not Validated
Steps
1
createSubscription
(Payment Service)
Input Mapping
{7}
planId
:
"$trigger.planId"
userId
:
"$trigger.userId"
idempotencyKey
:
"$trigger.idempotencyKey"
paymentMethodId
:
"$trigger.paymentMethodId"
trialPeriodDays
:
"$trigger.trialPeriodDays"
stripeCustomerId
:
"$trigger.stripeCustomerId"
authStripeSecretKeyRef
:
"$trigger.authStripeSecretKeyRef"
Output Handlers
Output Key
Next Step
Branch To Flow
Merge To Context
success
Step 2: sendNotification
—
Yes
2
sendNotification
(Notification Service)
Input Mapping
{7}
data
:
{3}
status
:
"$step1.status"
subscriptionId
:
"$step1.subscriptionId"
currentPeriodEnd
:
"$step1.currentPeriodEnd"
channel
:
"email"
priority
:
"normal"
template
:
"subscription_renewal_checked"
recipientId
:
"$trigger.userId"
correlationId
:
"$trigger.correlationId"
idempotencyKey
:
"sub_renewal_check:$trigger.userId:$trigger.eventId"
Output Handlers
Output Key
Next Step
Branch To Flow
Merge To Context
success
—
—
Yes