← Voltar para Flows

Billing History and Invoice Flow

Name
Billing History and Invoice Flow
Description
Consulta de histórico de pagamentos e geração/download de fatura.
Validated
Not Validated

Steps

  1. 1
    getPaymentHistory(Payment Service)
    Input Mapping
    type: "$trigger.type"
    limit: "$trigger.limit"
    userId: "$trigger.userId"
    endingBefore: "$trigger.endingBefore"
    startingAfter: "$trigger.startingAfter"
    stripeCustomerId: "$trigger.stripeCustomerId"
    authStripeSecretKeyRef: "$trigger.authStripeSecretKeyRef"
    Output Handlers
    Output KeyNext StepBranch To FlowMerge To Context
    successStep 2: generateInvoiceYes
  2. 2
    generateInvoice(Payment Service)
    Input Mapping
    invoiceId: "$trigger.invoiceId"
    paymentId: "$trigger.paymentId"
    stripeCustomerId: "$trigger.stripeCustomerId"
    authStripeSecretKeyRef: "$trigger.authStripeSecretKeyRef"
    Output Handlers
    Output KeyNext StepBranch To FlowMerge To Context
    successStep 3: sendNotificationYes
  3. 3
    sendNotification(Notification Service)
    Input Mapping
    userId: "$context.systemUserId"
    payload:
    invoice: "$step2"
    payments: "$step1.payments"
    channels:
    0"in_app"
    authToken: "$context.systemAuthToken"
    templateKey: "billing_history_ready"
    correlationId: "$trigger.correlationId"
    idempotencyKey: "$trigger.idempotencyKey"
    recipientUserId: "$trigger.userId"
    Output Handlers
    Output KeyNext StepBranch To FlowMerge To Context
    successYes