Stripe · Arazzo Workflow

Stripe Attach Payment Method

Version 1.0.0

Create a payment method, attach it to a customer, then list the customer's saved methods.

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

Provider

stripe

Workflows

attach-payment-method
Create and attach a payment method, then verify it on the customer.
Creates a PaymentMethod of the supplied type, attaches it to the customer, then lists the customer's saved payment methods to confirm it is on file.
3 steps inputs: customer, type outputs: attachedCustomer, methods, paymentMethodId
1
createPaymentMethod
Create a PaymentMethod of the requested type.
2
attachToCustomer
Attach the new payment method to the customer for reuse.
3
listCustomerMethods
List the customer's saved card payment methods to confirm the attachment.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Stripe Attach Payment Method
  summary: Create a payment method, attach it to a customer, then list the customer's saved methods.
  description: >-
    The save-a-card-on-file pattern. The workflow creates a PaymentMethod from
    card details, attaches it to a customer so it can be reused, then lists the
    customer's saved card payment methods to confirm the attachment. 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
  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
    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: customerApi
  url: ../openapi/stripe-customer-api-openapi.yml
  type: openapi
- name: methodsApi
  url: ../openapi/stripe-methods-api-openapi.yml
  type: openapi
workflows:
- workflowId: attach-payment-method
  summary: Create and attach a payment method, then verify it on the customer.
  description: >-
    Creates a PaymentMethod of the supplied type, attaches it to the customer,
    then lists the customer's saved payment methods to confirm it is on file.
  inputs:
    type: object
    required:
    - type
    - customer
    properties:
      type:
        type: string
        description: The PaymentMethod type to create (e.g. card).
      customer:
        type: string
        description: ID of the customer to attach the payment method to.
  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 new 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: listCustomerMethods
    description: List the customer's saved card payment methods to confirm the attachment.
    operationId: getCustomersCustomerPaymentMethods
    parameters:
    - name: customer
      in: path
      value: $inputs.customer
    - name: type
      in: query
      value: card
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      methods: $response.body#/data
  outputs:
    paymentMethodId: $steps.createPaymentMethod.outputs.paymentMethodId
    attachedCustomer: $steps.attachToCustomer.outputs.attachedCustomer
    methods: $steps.listCustomerMethods.outputs.methods

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-attach-payment-method-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.