Stripe · Arazzo Workflow

Stripe Capture and Partial Refund

Version 1.0.0

Create an uncaptured charge, capture it, then partially refund the captured amount.

1 workflow 1 source API 1 provider
View Spec View on GitHub CommerceFinancial-ServicesFintechPaymentsT1ArazzoWorkflows

Provider

stripe

Workflows

capture-and-partial-refund
Authorize a charge, capture it, then partially refund it.
Creates a Charge with capture set to false to authorize only, captures the charge to settle funds, then refunds part of the captured amount.
3 steps inputs: amount, currency, refundAmount, source outputs: chargeId, refundId, refundStatus
1
authorizeCharge
postCharges
Create a charge with capture disabled to authorize only.
2
captureCharge
postChargesChargeCapture
Capture the previously authorized charge to settle the funds.
3
partialRefund
postChargesChargeRefunds
Refund part of the captured charge.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Stripe Capture and Partial Refund
  summary: Create an uncaptured charge, capture it, then partially refund the captured amount.
  description: >-
    A delayed-capture charge pattern that also reverses part of the collected
    funds. The workflow creates a Charge with capture disabled, captures it to
    settle the funds, then issues a partial Refund against the captured charge.
    Every step spells out its form-encoded request inline so the flow can be read
    and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: chargesApi
  url: ../openapi/stripe-charges-api-openapi.yml
  type: openapi
workflows:
- workflowId: capture-and-partial-refund
  summary: Authorize a charge, capture it, then partially refund it.
  description: >-
    Creates a Charge with capture set to false to authorize only, captures the
    charge to settle funds, then refunds part of the captured amount.
  inputs:
    type: object
    required:
    - amount
    - currency
    - source
    - refundAmount
    properties:
      amount:
        type: integer
        description: Authorization amount in the smallest currency unit.
      currency:
        type: string
        description: Three-letter ISO currency code.
      source:
        type: string
        description: A payment source or token to charge (e.g. tok_visa).
      refundAmount:
        type: integer
        description: Amount to refund after capture, in the smallest currency unit.
  steps:
  - stepId: authorizeCharge
    description: Create a charge with capture disabled to authorize only.
    operationId: postCharges
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        amount: $inputs.amount
        currency: $inputs.currency
        source: $inputs.source
        capture: false
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      chargeId: $response.body#/id
  - stepId: captureCharge
    description: Capture the previously authorized charge to settle the funds.
    operationId: postChargesChargeCapture
    parameters:
    - name: charge
      in: path
      value: $steps.authorizeCharge.outputs.chargeId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      captured: $response.body#/captured
  - stepId: partialRefund
    description: Refund part of the captured charge.
    operationId: postChargesChargeRefunds
    parameters:
    - name: charge
      in: path
      value: $steps.authorizeCharge.outputs.chargeId
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        amount: $inputs.refundAmount
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      refundId: $response.body#/id
      refundStatus: $response.body#/status
  outputs:
    chargeId: $steps.authorizeCharge.outputs.chargeId
    refundId: $steps.partialRefund.outputs.refundId
    refundStatus: $steps.partialRefund.outputs.refundStatus

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/stripe-capture-and-partial-refund-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 email required.

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