Cross-Provider Workflow

Stripe Payment to SMS Confirmation

Version 1.0.0

Charge a customer with Stripe, then text them a confirmation via Twilio.

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

Providers Orchestrated

stripe twilio

Workflows

charge-and-sms-confirm
Create a Stripe payment, then text an SMS confirmation on success.
Creates and confirms a PaymentIntent in Stripe and, on a succeeded charge, sends a confirmation SMS via Twilio Messaging.
2 steps inputs: accountSid, amount, currency, fromPhone, paymentMethod, toPhone outputs: messageSid, paymentId
1
create-payment
$sourceDescriptions.stripeApi.postPaymentIntents
Create and confirm a PaymentIntent for the customer's order.
2
send-confirmation
$sourceDescriptions.twilioMessagingApi.createMessage
Text the customer an order confirmation via Twilio Messaging.

Source API Descriptions

Arazzo Workflow Specification

geo-stripe-payment-twilio-sms-confirm.yml Raw ↑
arazzo: 1.0.1
info:
  title: Stripe Payment to SMS Confirmation
  summary: Charge a customer with Stripe, then text them a confirmation via Twilio.
  description: >-
    A high-value cross-domain workflow that takes a payment through Stripe's
    PaymentIntents API and, on success, sends an order confirmation to the customer as
    an SMS through Twilio's Messaging API. Demonstrates pairing a payments provider with
    a communications provider for transactional notifications.
  version: 1.0.0
sourceDescriptions:
  - name: stripeApi
    url: https://raw.githubusercontent.com/api-evangelist/stripe/refs/heads/main/openapi/stripe-payment-intents-api-openapi.yml
    type: openapi
  - name: twilioMessagingApi
    url: https://raw.githubusercontent.com/api-evangelist/twilio/refs/heads/main/openapi/twilio-messaging-openapi.yml
    type: openapi
workflows:
  - workflowId: charge-and-sms-confirm
    summary: Create a Stripe payment, then text an SMS confirmation on success.
    description: >-
      Creates and confirms a PaymentIntent in Stripe and, on a succeeded charge, sends
      a confirmation SMS via Twilio Messaging.
    inputs:
      type: object
      properties:
        amount:
          type: integer
        currency:
          type: string
        paymentMethod:
          type: string
        accountSid:
          type: string
        toPhone:
          type: string
        fromPhone:
          type: string
    steps:
      - stepId: create-payment
        description: Create and confirm a PaymentIntent for the customer's order.
        operationId: $sourceDescriptions.stripeApi.postPaymentIntents
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            amount: $inputs.amount
            currency: $inputs.currency
            confirm: true
            payment_method: $inputs.paymentMethod
        successCriteria:
          - condition: $statusCode == 200
          - condition: $response.body#/status == "succeeded"
        outputs:
          paymentId: $response.body#/id
          chargeStatus: $response.body#/status
      - stepId: send-confirmation
        description: Text the customer an order confirmation via Twilio Messaging.
        operationId: $sourceDescriptions.twilioMessagingApi.createMessage
        parameters:
          - name: AccountSid
            in: path
            value: $inputs.accountSid
        requestBody:
          contentType: application/x-www-form-urlencoded
          payload:
            To: $inputs.toPhone
            From: $inputs.fromPhone
            Body: Your payment was received. Thank you for your order.
        successCriteria:
          - condition: $statusCode == 201
        outputs:
          messageSid: $response.body#/sid
    outputs:
      paymentId: $steps.create-payment.outputs.paymentId
      messageSid: $steps.send-confirmation.outputs.messageSid