Cross-Provider Workflow

Shopify Order to Stripe Charge to Twilio SMS Receipt

Version 1.0.0

Look up a Shopify order, charge it via Stripe, then text the customer an SMS receipt.

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

Providers Orchestrated

shopify stripe twilio

Workflows

charge-order-and-sms-receipt
Fetch a Shopify order, charge it with Stripe, and SMS an SMS receipt.
Retrieves a Shopify order, creates a Stripe charge against a payment source for its total, then texts the customer an SMS receipt via Twilio.
3 steps inputs: accountSid, amount, currency, fromPhone, orderId, source, toPhone outputs: chargeId, messageSid
1
get-order
$sourceDescriptions.shopifyApi.getOrder
Retrieve the Shopify order being charged.
2
create-charge
$sourceDescriptions.stripeApi.postCharges
Create a Stripe charge for the order total.
3
sms-receipt
$sourceDescriptions.twilioApi.createMessage
Text the customer an SMS receipt via Twilio.

Source API Descriptions

Arazzo Workflow Specification

shop-charge-sms-receipt-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Shopify Order to Stripe Charge to Twilio SMS Receipt
  summary: Look up a Shopify order, charge it via Stripe, then text the customer an SMS receipt.
  description: >-
    A point-of-sale style workflow that retrieves a Shopify order, creates a
    direct Stripe charge for its total, and texts the customer an SMS receipt
    through Twilio. Demonstrates combining a commerce platform, a payment
    provider's legacy charge flow, and a messaging provider for instant receipts.
  version: 1.0.0
sourceDescriptions:
  - name: shopifyApi
    url: https://raw.githubusercontent.com/api-evangelist/shopify/refs/heads/main/openapi/shopify-admin-rest-api-openapi.yml
    type: openapi
  - name: stripeApi
    url: https://raw.githubusercontent.com/api-evangelist/stripe/refs/heads/main/openapi/stripe-charges-api-openapi.yml
    type: openapi
  - name: twilioApi
    url: https://raw.githubusercontent.com/api-evangelist/twilio/refs/heads/main/openapi/twilio-messaging-openapi.yml
    type: openapi
workflows:
  - workflowId: charge-order-and-sms-receipt
    summary: Fetch a Shopify order, charge it with Stripe, and SMS an SMS receipt.
    description: >-
      Retrieves a Shopify order, creates a Stripe charge against a payment
      source for its total, then texts the customer an SMS receipt via Twilio.
    inputs:
      type: object
      properties:
        orderId:
          type: string
        amount:
          type: integer
        currency:
          type: string
        source:
          type: string
        accountSid:
          type: string
        toPhone:
          type: string
        fromPhone:
          type: string
    steps:
      - stepId: get-order
        description: Retrieve the Shopify order being charged.
        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-charge
        description: Create a Stripe charge for the order total.
        operationId: $sourceDescriptions.stripeApi.postCharges
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            amount: $inputs.amount
            currency: $inputs.currency
            source: $inputs.source
            description: $steps.get-order.outputs.orderName
        successCriteria:
          - condition: $statusCode == 200
          - condition: $response.body#/status == "succeeded"
        outputs:
          chargeId: $response.body#/id
          chargeStatus: $response.body#/status
      - stepId: sms-receipt
        description: Text the customer an SMS receipt via Twilio.
        operationId: $sourceDescriptions.twilioApi.createMessage
        parameters:
          - name: AccountSid
            in: path
            value: $inputs.accountSid
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            To: $inputs.toPhone
            From: $inputs.fromPhone
            Body: Payment received. Thank you for your order!
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          messageSid: $response.body#/sid
    outputs:
      chargeId: $steps.create-charge.outputs.chargeId
      messageSid: $steps.sms-receipt.outputs.messageSid