Cross-Provider Workflow

Shopify Order Refund to Stripe Refund to SendGrid Notice

Version 1.0.0

Look up a Shopify order, issue a Stripe refund, then email the customer a refund notice.

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

Providers Orchestrated

shopify stripe sendgrid

Workflows

refund-order-and-notify
Fetch a Shopify order, refund the Stripe charge, and email the customer.
Retrieves a Shopify order, creates a Stripe refund against the original charge, then emails the customer a refund confirmation via SendGrid.
3 steps inputs: chargeId, customerEmail, orderId, refundAmount outputs: noticeStatus, refundId
1
get-order
$sourceDescriptions.shopifyApi.getOrder
Retrieve the Shopify order being refunded.
2
create-refund
$sourceDescriptions.stripeApi.PostRefunds
Issue a Stripe refund against the original charge.
3
email-refund-notice
$sourceDescriptions.sendgridApi.SendMail
Email the customer a refund confirmation via SendGrid.

Source API Descriptions

Arazzo Workflow Specification

shop-refund-notify-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Shopify Order Refund to Stripe Refund to SendGrid Notice
  summary: Look up a Shopify order, issue a Stripe refund, then email the customer a refund notice.
  description: >-
    A refund workflow that retrieves a Shopify order, issues a refund against the
    original Stripe charge, and emails the customer a confirmation through
    SendGrid once the money is returned. Demonstrates coordinating a commerce
    platform, a payment provider's refund flow, and a communications provider.
  version: 1.0.0
sourceDescriptions:
  - name: shopifyApi
    url: https://raw.githubusercontent.com/api-evangelist/shopify/refs/heads/main/openapi/shopify-orders-api-openapi.yml
    type: openapi
  - name: stripeApi
    url: https://raw.githubusercontent.com/api-evangelist/stripe/refs/heads/main/openapi/stripe-refunds-api-openapi.yml
    type: openapi
  - name: sendgridApi
    url: https://raw.githubusercontent.com/api-evangelist/sendgrid/refs/heads/main/openapi/sendgrid-mail-send-api-openapi.yml
    type: openapi
workflows:
  - workflowId: refund-order-and-notify
    summary: Fetch a Shopify order, refund the Stripe charge, and email the customer.
    description: >-
      Retrieves a Shopify order, creates a Stripe refund against the original
      charge, then emails the customer a refund confirmation via SendGrid.
    inputs:
      type: object
      properties:
        orderId:
          type: string
        chargeId:
          type: string
        refundAmount:
          type: integer
        customerEmail:
          type: string
    steps:
      - stepId: get-order
        description: Retrieve the Shopify order being refunded.
        operationId: $sourceDescriptions.shopifyApi.getOrder
        parameters:
          - name: order_id
            in: path
            value: $inputs.orderId
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          orderName: $response.body#/order/name
      - stepId: create-refund
        description: Issue a Stripe refund against the original charge.
        operationId: $sourceDescriptions.stripeApi.PostRefunds
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            charge: $inputs.chargeId
            amount: $inputs.refundAmount
        successCriteria:
          - condition: $statusCode == 200
          - condition: $response.body#/status == "succeeded"
        outputs:
          refundId: $response.body#/id
          refundStatus: $response.body#/status
      - stepId: email-refund-notice
        description: Email the customer a refund confirmation via SendGrid.
        operationId: $sourceDescriptions.sendgridApi.SendMail
        requestBody:
          contentType: application/json
          payload:
            personalizations:
              - to:
                  - email: $inputs.customerEmail
                subject: Your refund has been processed
            from:
              email: support@example.com
            content:
              - type: text/plain
                value: Your refund has been issued and will appear shortly.
        successCriteria:
          - condition: $statusCode == 202
        outputs:
          noticeStatus: $statusCode
    outputs:
      refundId: $steps.create-refund.outputs.refundId
      noticeStatus: $steps.email-refund-notice.outputs.noticeStatus

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/shop-refund-notify-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.