Stripe · Arazzo Workflow

Stripe Charge and Refund

Version 1.0.0

Create a direct charge, then refund all or part of it.

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

Provider

stripe

Workflows

charge-and-refund
Create a charge and refund it via the charge refunds endpoint.
Creates a Charge for the supplied amount and source, then issues a Refund on that charge for an optional partial amount.
2 steps inputs: amount, currency, refundAmount, source outputs: chargeId, refundId, refundStatus
1
createCharge
Create a direct charge against the supplied source.
2
refundCharge
Refund the charge, optionally for a partial amount.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Stripe Charge and Refund
  summary: Create a direct charge, then refund all or part of it.
  description: >-
    The classic charge-then-reverse pattern using the legacy Charges API. The
    workflow creates a Charge against a source or customer, then issues a Refund
    on that charge for the requested amount. 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
  x-realizes-capability-ids:
  - BC-1340.70
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-1340.70
      capability_name: Card Transaction Processing Management
      spec: stripe-charges-api-openapi.yml
      confidence: 0.8
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: chargesApi
  url: ../openapi/stripe-charges-api-openapi.yml
  type: openapi
workflows:
- workflowId: charge-and-refund
  summary: Create a charge and refund it via the charge refunds endpoint.
  description: >-
    Creates a Charge for the supplied amount and source, then issues a Refund on
    that charge for an optional partial amount.
  inputs:
    type: object
    required:
    - amount
    - currency
    - source
    properties:
      amount:
        type: integer
        description: Charge 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: Optional amount to refund; omit to refund the full charge.
  steps:
  - stepId: createCharge
    description: Create a direct charge against the supplied source.
    operationId: PostCharges
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        amount: $inputs.amount
        currency: $inputs.currency
        source: $inputs.source
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      chargeId: $response.body#/id
      paid: $response.body#/paid
  - stepId: refundCharge
    description: Refund the charge, optionally for a partial amount.
    operationId: PostChargesChargeRefunds
    parameters:
    - name: charge
      in: path
      value: $steps.createCharge.outputs.chargeId
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        amount: $inputs.refundAmount
        reason: requested_by_customer
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      refundId: $response.body#/id
      refundStatus: $response.body#/status
  outputs:
    chargeId: $steps.createCharge.outputs.chargeId
    refundId: $steps.refundCharge.outputs.refundId
    refundStatus: $steps.refundCharge.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-charge-and-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 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.