Swell · Arazzo Workflow

Swell Capture and Refund Payment

Version 1.0.0

Record a payment against an order, then issue a refund against that payment.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub CommerceHeadless CommerceAPI-FirstB2CB2BSubscriptionMarketplacesWholesaleStorefrontCheckoutPaymentsCartOrderCatalogInternationalizationArazzoWorkflows

Provider

swell-io

Workflows

capture-and-refund-payment
Create a payment, then refund it.
Posts a payment against an order and account, then posts a refund against the returned payment id.
2 steps inputs: account_id, amount, currency, method, order_id, refund_amount, refund_reason outputs: paymentId, refundId
1
createPaymentStep
Record a payment against the order with the supplied method and amount.
2
refundPaymentStep
Issue a refund against the captured payment.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Swell Capture and Refund Payment
  summary: Record a payment against an order, then issue a refund against that payment.
  description: >-
    A back-office money-movement flow. The workflow creates a payment tied to an
    order and account with a method and amount, captures the payment id, and then
    posts a refund against that payment for a given amount and reason. Each 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: paymentsApi
  url: ../openapi/swell-io-payments-api-openapi.yml
  type: openapi
- name: refundsApi
  url: ../openapi/swell-io-refunds-api-openapi.yml
  type: openapi
workflows:
- workflowId: capture-and-refund-payment
  summary: Create a payment, then refund it.
  description: >-
    Posts a payment against an order and account, then posts a refund against
    the returned payment id.
  inputs:
    type: object
    required:
    - order_id
    - amount
    properties:
      order_id:
        type: string
        description: The order the payment settles.
      account_id:
        type: string
        description: The account the payment belongs to.
      amount:
        type: number
        description: Payment amount in store currency.
      method:
        type: string
        description: Payment method (card, account, amazon, paypal, manual).
      currency:
        type: string
        description: ISO 4217 currency code.
      refund_amount:
        type: number
        description: Amount to refund against the payment.
      refund_reason:
        type: string
        description: Reason recorded on the refund.
  steps:
  - stepId: createPaymentStep
    description: Record a payment against the order with the supplied method and amount.
    operationId: createPayment
    requestBody:
      contentType: application/json
      payload:
        order_id: $inputs.order_id
        account_id: $inputs.account_id
        amount: $inputs.amount
        method: $inputs.method
        currency: $inputs.currency
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      paymentId: $response.body#/id
      amountRefundable: $response.body#/amount_refundable
  - stepId: refundPaymentStep
    description: Issue a refund against the captured payment.
    operationId: refundPayment
    parameters:
    - name: id
      in: path
      value: $steps.createPaymentStep.outputs.paymentId
    requestBody:
      contentType: application/json
      payload:
        amount: $inputs.refund_amount
        reason: $inputs.refund_reason
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      refundId: $response.body#/id
      refundAmount: $response.body#/amount
  outputs:
    paymentId: $steps.createPaymentStep.outputs.paymentId
    refundId: $steps.refundPaymentStep.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/swell-io-capture-refund-payment-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.