Stripe · Arazzo Workflow

Stripe Save Card and Charge

Version 1.0.0

Create a payment method, attach it to a customer, then charge it via a PaymentIntent.

1 workflow 4 source APIs 1 provider
View Spec View on GitHub CommerceFinancial-ServicesFintechPaymentsT1ArazzoWorkflows

Provider

stripe

Workflows

save-card-and-charge
Save a payment method to a customer and immediately charge it.
Creates a PaymentMethod, attaches it to the customer, then opens a PaymentIntent bound to that customer and method and confirms it off session.
4 steps inputs: amount, currency, customer, type outputs: paymentIntentId, paymentMethodId, status
1
createPaymentMethod
Create a PaymentMethod of the requested type.
2
attachToCustomer
Attach the payment method to the customer for reuse.
3
createPaymentIntent
Open a PaymentIntent bound to the customer and saved method.
4
confirmPaymentIntent
Confirm the PaymentIntent off session to charge the saved method.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Stripe Save Card and Charge
  summary: Create a payment method, attach it to a customer, then charge it via a PaymentIntent.
  description: >-
    The save-on-file-then-bill pattern for returning customers. The workflow
    creates a PaymentMethod, attaches it to the customer so it is reusable, then
    opens and confirms a PaymentIntent that charges the saved payment method off
    session. 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
  - BC-1340.10
  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
      capability_name: Payments & Card Management
      spec: stripe-methods-api-openapi.yml
      confidence: 0.8
    - capability_id: BC-1340.10
      capability_name: Payment Initiation Management
      spec: stripe-intents-api-openapi.yml
      confidence: 0.85
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: attachApi
  url: ../openapi/stripe-attach-api-openapi.yml
  type: openapi
- name: confirmApi
  url: ../openapi/stripe-confirm-api-openapi.yml
  type: openapi
- name: intentsApi
  url: ../openapi/stripe-intents-api-openapi.yml
  type: openapi
- name: methodsApi
  url: ../openapi/stripe-methods-api-openapi.yml
  type: openapi
workflows:
- workflowId: save-card-and-charge
  summary: Save a payment method to a customer and immediately charge it.
  description: >-
    Creates a PaymentMethod, attaches it to the customer, then opens a
    PaymentIntent bound to that customer and method and confirms it off session.
  inputs:
    type: object
    required:
    - type
    - customer
    - amount
    - currency
    properties:
      type:
        type: string
        description: The PaymentMethod type to create (e.g. card).
      customer:
        type: string
        description: ID of the customer to save the method to and charge.
      amount:
        type: integer
        description: Amount to charge in the smallest currency unit.
      currency:
        type: string
        description: Three-letter ISO currency code.
  steps:
  - stepId: createPaymentMethod
    description: Create a PaymentMethod of the requested type.
    operationId: postPaymentMethods
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        type: $inputs.type
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      paymentMethodId: $response.body#/id
  - stepId: attachToCustomer
    description: Attach the payment method to the customer for reuse.
    operationId: postPaymentMethodsPaymentMethodAttach
    parameters:
    - name: payment_method
      in: path
      value: $steps.createPaymentMethod.outputs.paymentMethodId
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        customer: $inputs.customer
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      attachedCustomer: $response.body#/customer
  - stepId: createPaymentIntent
    description: Open a PaymentIntent bound to the customer and saved method.
    operationId: postPaymentIntents
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        amount: $inputs.amount
        currency: $inputs.currency
        customer: $inputs.customer
        payment_method: $steps.createPaymentMethod.outputs.paymentMethodId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      paymentIntentId: $response.body#/id
  - stepId: confirmPaymentIntent
    description: Confirm the PaymentIntent off session to charge the saved method.
    operationId: postPaymentIntentsIntentConfirm
    parameters:
    - name: intent
      in: path
      value: $steps.createPaymentIntent.outputs.paymentIntentId
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        payment_method: $steps.createPaymentMethod.outputs.paymentMethodId
        off_session: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/status
  outputs:
    paymentMethodId: $steps.createPaymentMethod.outputs.paymentMethodId
    paymentIntentId: $steps.createPaymentIntent.outputs.paymentIntentId
    status: $steps.confirmPaymentIntent.outputs.status

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-save-card-and-charge-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.