← 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.
Validated
Not Validated

Steps

  1. 1
    createSubscription(Payment Service)
    Input Mapping
    planId: "$trigger.planId"
    userId: "$trigger.userId"
    idempotencyKey: "$trigger.idempotencyKey"
    paymentMethodId: "$trigger.paymentMethodId"
    trialPeriodDays: "$trigger.trialPeriodDays"
    stripeCustomerId: "$trigger.stripeCustomerId"
    authStripeSecretKeyRef: "$trigger.authStripeSecretKeyRef"
    Output Handlers
    Output KeyNext StepBranch To FlowMerge To Context
    successStep 2: sendNotificationYes
  2. 2
    sendNotification(Notification Service)
    Input Mapping
    data:
    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 KeyNext StepBranch To FlowMerge To Context
    successYes