Cross-Provider Workflow

Stripe Refund to Slack Alert

Version 1.0.0

Issue a Stripe refund, then post an alert to a Slack channel.

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

Providers Orchestrated

stripe slack

Workflows

refund-and-slack-alert
Create a Stripe refund, then post a Slack alert.
Creates a refund against a charge or payment intent in Stripe, then posts an operational alert into a Slack channel with the refund details.
2 steps inputs: amount, channel, charge outputs: refundId, refundStatus, slackPosted
1
create-refund
$sourceDescriptions.stripeApi.PostRefunds
Create a refund in Stripe for the given charge.
2
slack-alert
$sourceDescriptions.slackApi.postChatPostmessage
Post a refund alert into a Slack channel.

Source API Descriptions

Arazzo Workflow Specification

pay-stripe-refund-to-slack-alert-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Stripe Refund to Slack Alert
  summary: Issue a Stripe refund, then post an alert to a Slack channel.
  description: >-
    A cross-provider workflow that processes a refund through Stripe's Refunds API
    and, on success, notifies the finance or support team by posting a message to a
    Slack channel via the Slack Web API. Keeps operations staff in the loop the
    moment money goes back to a customer.
  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: slackApi
    url: https://raw.githubusercontent.com/api-evangelist/slack/refs/heads/main/openapi/slack-chat-openapi.yml
    type: openapi
workflows:
  - workflowId: refund-and-slack-alert
    summary: Create a Stripe refund, then post a Slack alert.
    description: >-
      Creates a refund against a charge or payment intent in Stripe, then posts an
      operational alert into a Slack channel with the refund details.
    inputs:
      type: object
      properties:
        charge:
          type: string
        amount:
          type: integer
        channel:
          type: string
    steps:
      - stepId: create-refund
        description: Create a refund in Stripe for the given charge.
        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
          refundAmount: $response.body#/amount
      - stepId: slack-alert
        description: Post a refund alert into a Slack channel.
        operationId: $sourceDescriptions.slackApi.postChatPostmessage
        requestBody:
          contentType: application/json
          payload:
            channel: $inputs.channel
            text: Refund $steps.create-refund.outputs.refundId processed for charge $inputs.charge.
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          messageTs: $response.body#/ts
          posted: $response.body#/ok
    outputs:
      refundId: $steps.create-refund.outputs.refundId
      refundStatus: $steps.create-refund.outputs.refundStatus
      slackPosted: $steps.slack-alert.outputs.posted