Commerce Layer · Arazzo Workflow

Commerce Layer Add Payment Method and Place Order

Version 1.0.0

Attach a payment method to an order and then transition the order to placed.

1 workflow 1 source API 1 provider
View Spec View on GitHub Headless CommerceComposable CommerceAPI-FirstE-CommerceJSON:APIAuthenticationMulti-MarketMulti-CurrencyB2CB2BSubscriptionPromotionsInventoryOrder ManagementCheckoutArazzoWorkflows

Provider

commerce-layer

Workflows

order-add-payment-method-place
Attach a payment method to an order and place it.
Updates the order with a payment method relationship, then patches the order again with the documented _place transition flag to submit it.
2 steps inputs: accessToken, orderId, paymentMethodId outputs: orderId, placedAt, status
1
attachPaymentMethod
Associate the payment method with the order.
2
placeOrder
Toggle the documented _place transition flag to submit the order.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Commerce Layer Add Payment Method and Place Order
  summary: Attach a payment method to an order and then transition the order to placed.
  description: >-
    The Commerce Layer checkout completion flow. The workflow patches an order
    to attach a payment method, then issues a second patch that toggles the
    order's place transition flag to submit the order. Every step spells out its
    JSON:API request inline, including the documented order state-transition
    attribute, so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-520.40
  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-520.40
      capability_name: Order Fulfilment Management
      spec: commerce-layer-orders-api-openapi.yml
      confidence: 0.7
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: ordersApi
  url: ../openapi/commerce-layer-orders-api-openapi.yml
  type: openapi
workflows:
- workflowId: order-add-payment-method-place
  summary: Attach a payment method to an order and place it.
  description: >-
    Updates the order with a payment method relationship, then patches the order
    again with the documented _place transition flag to submit it.
  inputs:
    type: object
    required:
    - accessToken
    - orderId
    - paymentMethodId
    properties:
      accessToken:
        type: string
        description: Bearer access token for the Commerce Layer organization.
      orderId:
        type: string
        description: The id of the order to complete.
      paymentMethodId:
        type: string
        description: The id of the payment method to attach to the order.
  steps:
  - stepId: attachPaymentMethod
    description: Associate the payment method with the order.
    operationId: PATCH/orders/orderId
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: orderId
      in: path
      value: $inputs.orderId
    requestBody:
      contentType: application/vnd.api+json
      payload:
        data:
          type: orders
          id: $inputs.orderId
          relationships:
            payment_method:
              data:
                type: payment_methods
                id: $inputs.paymentMethodId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/data/attributes/status
  - stepId: placeOrder
    description: Toggle the documented _place transition flag to submit the order.
    operationId: PATCH/orders/orderId
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: orderId
      in: path
      value: $inputs.orderId
    requestBody:
      contentType: application/vnd.api+json
      payload:
        data:
          type: orders
          id: $inputs.orderId
          attributes:
            _place: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/data/attributes/status
      placedAt: $response.body#/data/attributes/placed_at
  outputs:
    orderId: $inputs.orderId
    status: $steps.placeOrder.outputs.status
    placedAt: $steps.placeOrder.outputs.placedAt

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/commerce-layer-order-add-payment-method-place-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.