> ## Documentation Index
> Fetch the complete documentation index at: https://docs.batchrelay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Start hosted payment-method setup

> Creates a server-side Stripe-hosted setup session for an authorized account. No card data is accepted by Batch Relay. A completed browser redirect does not activate billing; the verified Stripe webhook does.



## OpenAPI

````yaml https://api.batchrelay.com/openapi.json post /v1/api-account/billing/setup-sessions
openapi: 3.1.0
info:
  title: Batch Relay API
  version: 1.0.0
  description: >-
    Provider-neutral print catalog and prepared-media validation. This document
    covers only routes owned by the Go service; it deliberately excludes
    migration-proxied order lifecycle routes and all provider payloads.
servers:
  - url: https://api.batchrelay.com
security: []
tags:
  - name: System
  - name: Catalog
  - name: Print orders
  - name: API accounts
paths:
  /v1/api-account/billing/setup-sessions:
    post:
      tags:
        - API accounts
      summary: Start hosted payment-method setup
      description: >-
        Creates a server-side Stripe-hosted setup session for an authorized
        account. No card data is accepted by Batch Relay. A completed browser
        redirect does not activate billing; the verified Stripe webhook does.
      operationId: createBillingSetupSession
      parameters:
        - name: account_id
          in: query
          required: true
          schema:
            type: string
            minLength: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetupSessionRequest'
      responses:
        '201':
          description: Hosted setup session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetupSession'
        '400':
          $ref: '#/components/responses/InvalidRequestJSON'
        '401':
          $ref: '#/components/responses/ManagementAuthenticationRequired'
        '403':
          $ref: '#/components/responses/APIAccountForbidden'
        '503':
          $ref: '#/components/responses/ManagementUnavailable'
components:
  schemas:
    SetupSessionRequest:
      type: object
      required:
        - success_url
        - cancel_url
      properties:
        success_url:
          type: string
          format: uri
          pattern: ^https://
        cancel_url:
          type: string
          format: uri
          pattern: ^https://
      additionalProperties: false
    SetupSession:
      type: object
      required:
        - id
        - url
      properties:
        id:
          type: string
        url:
          type: string
          format: uri
        expires_at:
          type: integer
      additionalProperties: false
    Error:
      type: object
      required:
        - error
        - code
        - message
        - docs_url
        - request_id
      properties:
        error:
          type: string
          description: Backward-compatible human-readable error.
        code:
          type: string
          description: Stable machine-readable error code.
        message:
          type: string
        docs_url:
          type: string
          format: uri
        request_id:
          type: string
      additionalProperties: false
  responses:
    InvalidRequestJSON:
      description: >-
        The body was malformed, contained unknown fields, or was not exactly one
        JSON object.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ManagementAuthenticationRequired:
      description: A verified Batch Relay dashboard session is required.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    APIAccountForbidden:
      description: The authenticated user cannot operate this API account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ManagementUnavailable:
      description: >-
        The management auth, account, or billing command bridge is not
        configured or temporarily unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'

````