Commerce Layer · Arazzo Workflow

Commerce Layer Create Market with Payment Method

Version 1.0.0

Create a market tied to merchant, price list, and inventory model, then add a payment method to it.

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

Provider

commerce-layer

Workflows

create-market-with-payment-method
Create a market and add a payment method to it.
Creates a market with its required merchant, price list, and inventory model relationships, then creates a payment method bound to the market and gateway.
2 steps inputs: accessToken, inventoryModelId, merchantId, name, paymentGatewayId, paymentSourceType, priceAmountCents, priceListId outputs: marketId, paymentMethodId
1
createMarket
Create the market with its required relationships.
2
createPaymentMethod
Create a payment method scoped to the market and gateway.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Commerce Layer Create Market with Payment Method
  summary: Create a market tied to merchant, price list, and inventory model, then add a payment method to it.
  description: >-
    A Commerce Layer storefront configuration flow. The workflow creates a
    market wired to its required merchant, price list, and inventory model, then
    creates a payment method scoped to that market and a payment gateway. Every
    step spells out its JSON:API 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-4250.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-4250.40
      capability_name: Payment Collection & Dunning
      spec: commerce-layer-payment-methods-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: marketsApi
  url: ../openapi/commerce-layer-markets-api-openapi.yml
  type: openapi
- name: paymentMethodsApi
  url: ../openapi/commerce-layer-payment-methods-api-openapi.yml
  type: openapi
workflows:
- workflowId: create-market-with-payment-method
  summary: Create a market and add a payment method to it.
  description: >-
    Creates a market with its required merchant, price list, and inventory model
    relationships, then creates a payment method bound to the market and gateway.
  inputs:
    type: object
    required:
    - accessToken
    - name
    - merchantId
    - priceListId
    - inventoryModelId
    - paymentGatewayId
    - paymentSourceType
    - priceAmountCents
    properties:
      accessToken:
        type: string
        description: Bearer access token for the Commerce Layer organization.
      name:
        type: string
        description: The market name.
      merchantId:
        type: string
        description: The id of the merchant for the market.
      priceListId:
        type: string
        description: The id of the price list for the market.
      inventoryModelId:
        type: string
        description: The id of the inventory model for the market.
      paymentGatewayId:
        type: string
        description: The id of the payment gateway backing the payment method.
      paymentSourceType:
        type: string
        description: The payment source type for the payment method (e.g. credit_cards).
      priceAmountCents:
        type: integer
        description: The price amount in cents for the payment method.
  steps:
  - stepId: createMarket
    description: Create the market with its required relationships.
    operationId: POST/markets
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    requestBody:
      contentType: application/vnd.api+json
      payload:
        data:
          type: markets
          attributes:
            name: $inputs.name
          relationships:
            merchant:
              data:
                type: merchants
                id: $inputs.merchantId
            price_list:
              data:
                type: price_lists
                id: $inputs.priceListId
            inventory_model:
              data:
                type: inventory_models
                id: $inputs.inventoryModelId
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      marketId: $response.body#/data/id
  - stepId: createPaymentMethod
    description: Create a payment method scoped to the market and gateway.
    operationId: POST/payment_methods
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    requestBody:
      contentType: application/vnd.api+json
      payload:
        data:
          type: payment_methods
          attributes:
            payment_source_type: $inputs.paymentSourceType
            price_amount_cents: $inputs.priceAmountCents
          relationships:
            market:
              data:
                type: markets
                id: $steps.createMarket.outputs.marketId
            payment_gateway:
              data:
                type: payment_gateways
                id: $inputs.paymentGatewayId
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      paymentMethodId: $response.body#/data/id
  outputs:
    marketId: $steps.createMarket.outputs.marketId
    paymentMethodId: $steps.createPaymentMethod.outputs.paymentMethodId

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-create-market-with-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.