Cross-Provider Workflow

Stripe Refund to Mailchimp Transactional Email

Version 1.0.0

Issue a Stripe refund, then email confirmation via Mailchimp Transactional.

1 workflow 2 source APIs 2 providers
View Spec View on GitHub ArazzoWorkflowsCross-Provider

Providers Orchestrated

stripe mailchimp

Workflows

refund-transactional-email
Create a Stripe refund, then send a Mailchimp Transactional email.
Creates a refund in Stripe and sends the customer a confirmation email via the Mailchimp Transactional API.
2 steps inputs: amount, apiKey, charge, customerEmail, fromEmail outputs: emailSendStatus, refundId, refundStatus
1
create-refund
$sourceDescriptions.stripeApi.PostRefunds
Create a refund against the charge in Stripe.
2
confirm-email
$sourceDescriptions.mailchimpTransactionalApi.postMessagesSend
Send a refund confirmation via Mailchimp Transactional.

Source API Descriptions

Arazzo Workflow Specification

pay-stripe-refund-to-mailchimp-transactional-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Stripe Refund to Mailchimp Transactional Email
  summary: Issue a Stripe refund, then email confirmation via Mailchimp Transactional.
  description: >-
    A cross-provider workflow that processes a refund through Stripe's Refunds API
    and then sends the customer a refund confirmation email through the Mailchimp
    Transactional (Mandrill) API. Ensures customers receive a clear paper trail
    whenever money is returned.
  version: 1.0.0
sourceDescriptions:
  - name: stripeApi
    url: https://raw.githubusercontent.com/api-evangelist/stripe/refs/heads/main/openapi/stripe-refunds-api-openapi.yml
    type: openapi
  - name: mailchimpTransactionalApi
    url: https://raw.githubusercontent.com/api-evangelist/mailchimp/refs/heads/main/openapi/mailchimp-transactional-api-openapi.yml
    type: openapi
workflows:
  - workflowId: refund-transactional-email
    summary: Create a Stripe refund, then send a Mailchimp Transactional email.
    description: >-
      Creates a refund in Stripe and sends the customer a confirmation email via the
      Mailchimp Transactional API.
    inputs:
      type: object
      properties:
        charge:
          type: string
        amount:
          type: integer
        apiKey:
          type: string
        customerEmail:
          type: string
        fromEmail:
          type: string
    steps:
      - stepId: create-refund
        description: Create a refund against the charge in Stripe.
        operationId: $sourceDescriptions.stripeApi.PostRefunds
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            charge: $inputs.charge
            amount: $inputs.amount
        successCriteria:
          - condition: $statusCode == 200
          - condition: $response.body#/status == "succeeded"
        outputs:
          refundId: $response.body#/id
          refundStatus: $response.body#/status
      - stepId: confirm-email
        description: Send a refund confirmation via Mailchimp Transactional.
        operationId: $sourceDescriptions.mailchimpTransactionalApi.postMessagesSend
        requestBody:
          contentType: application/json
          payload:
            key: $inputs.apiKey
            message:
              from_email: $inputs.fromEmail
              subject: Your refund has been processed
              to:
                - email: $inputs.customerEmail
                  type: to
              text: Refund $steps.create-refund.outputs.refundId has been processed.
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          sendStatus: $statusCode
    outputs:
      refundId: $steps.create-refund.outputs.refundId
      refundStatus: $steps.create-refund.outputs.refundStatus
      emailSendStatus: $steps.confirm-email.outputs.sendStatus