WooCommerce · Arazzo Workflow

WooCommerce Customer Order Refund Lifecycle

Version 1.0.0

Onboard a customer, place and complete their order, then refund it end to end.

1 workflow 3 source APIs 1 provider
View Spec View on GitHub E-CommerceOpen-SourceOrderProductWordPressArazzoWorkflows

Provider

woocommerce

Workflows

customer-order-refund-lifecycle
Create customer, place order, complete it, and refund it.
Creates a customer, creates and completes an order for them, and issues a refund against that order.
4 steps inputs: email, firstName, lastName, productId, quantity, refundAmount, refundReason outputs: customerId, orderId, refundId
1
createCustomer
Create the customer account that the order will be placed against.
2
createOrder
Place an order for the customer with a single product line item.
3
completeOrder
Transition the order to completed so it becomes eligible for a refund.
4
createRefund
Issue a refund against the completed order for the supplied amount.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: WooCommerce Customer Order Refund Lifecycle
  summary: Onboard a customer, place and complete their order, then refund it end to end.
  description: >-
    Walks a buyer through a full commerce lifecycle in one flow. The workflow
    creates a customer account, places an order for that customer with a line
    item, transitions the order to completed, and finally issues a refund
    against it. Every step spells out its request inline so the flow can be read
    and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: customersApi
  url: ../openapi/woocommerce-customers-api-openapi.yml
  type: openapi
- name: orderRefundsApi
  url: ../openapi/woocommerce-order-refunds-api-openapi.yml
  type: openapi
- name: ordersApi
  url: ../openapi/woocommerce-orders-api-openapi.yml
  type: openapi
workflows:
- workflowId: customer-order-refund-lifecycle
  summary: Create customer, place order, complete it, and refund it.
  description: >-
    Creates a customer, creates and completes an order for them, and issues a
    refund against that order.
  inputs:
    type: object
    required:
    - email
    - productId
    - quantity
    - refundAmount
    properties:
      email:
        type: string
        description: Email address for the new customer account.
      firstName:
        type: string
        description: Customer first name.
      lastName:
        type: string
        description: Customer last name.
      productId:
        type: integer
        description: ID of the product to add as a line item on the order.
      quantity:
        type: integer
        description: Quantity of the product to order.
      refundAmount:
        type: string
        description: Amount to refund as a decimal string.
      refundReason:
        type: string
        description: Optional reason for the refund.
  steps:
  - stepId: createCustomer
    description: >-
      Create the customer account that the order will be placed against.
    operationId: createCustomer
    requestBody:
      contentType: application/json
      payload:
        email: $inputs.email
        first_name: $inputs.firstName
        last_name: $inputs.lastName
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      customerId: $response.body#/id
  - stepId: createOrder
    description: >-
      Place an order for the customer with a single product line item.
    operationId: createOrder
    requestBody:
      contentType: application/json
      payload:
        status: processing
        customer_id: $steps.createCustomer.outputs.customerId
        line_items:
        - product_id: $inputs.productId
          quantity: $inputs.quantity
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      orderId: $response.body#/id
  - stepId: completeOrder
    description: >-
      Transition the order to completed so it becomes eligible for a refund.
    operationId: updateOrder
    parameters:
    - name: id
      in: path
      value: $steps.createOrder.outputs.orderId
    requestBody:
      contentType: application/json
      payload:
        status: completed
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      orderStatus: $response.body#/status
  - stepId: createRefund
    description: >-
      Issue a refund against the completed order for the supplied amount.
    operationId: createOrderRefund
    parameters:
    - name: order_id
      in: path
      value: $steps.createOrder.outputs.orderId
    requestBody:
      contentType: application/json
      payload:
        amount: $inputs.refundAmount
        reason: $inputs.refundReason
        api_refund: false
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      refundId: $response.body#/id
      refundAmount: $response.body#/amount
  outputs:
    customerId: $steps.createCustomer.outputs.customerId
    orderId: $steps.createOrder.outputs.orderId
    refundId: $steps.createRefund.outputs.refundId

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/woocommerce-customer-order-refund-lifecycle-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.