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

# Connect Stripe for a specific program



## OpenAPI

````yaml /openapi.json post /programs/{id}/connect-stripe
openapi: 3.1.0
info:
  title: AgentRef REST API
  version: 1.0.0
  description: >-
    REST API v1 for merchants and affiliates. Authentication via API keys
    (Authorization: Bearer ak_...).
servers:
  - url: /api/v1
    description: Current API version
security:
  - ApiKeyAuth: []
tags:
  - name: Auth
  - name: Onboarding
  - name: Programs
  - name: Merchant
  - name: Applications
  - name: Affiliates
  - name: Me
  - name: Coupons
  - name: Invites
  - name: Conversions
  - name: Payouts
  - name: Flags
  - name: Billing
  - name: Marketplace
  - name: Marketing Resources
  - name: Notifications
  - name: Webhooks
  - name: Docs
  - name: Meta
paths:
  /programs/{id}/connect-stripe:
    post:
      tags:
        - Programs
      summary: Connect Stripe for a specific program
      operationId: connectProgramStripe
      parameters:
        - $ref: '#/components/parameters/UuidPathId'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  enum:
                    - oauth_url
                  default: oauth_url
      responses:
        '200':
          description: Program-scoped Stripe connect result
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ConnectProgramStripeResponse'
                  meta:
                    $ref: '#/components/schemas/RequestMeta'
                required:
                  - data
                  - meta
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '409':
          $ref: '#/components/responses/ErrorResponse'
components:
  parameters:
    UuidPathId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    ConnectProgramStripeResponse:
      type: object
      properties:
        connected:
          type: boolean
        method:
          type: string
          enum:
            - oauth_url
        programId:
          type: string
          format: uuid
        programReadiness:
          $ref: '#/components/schemas/ProgramReadiness'
        authUrl:
          type: string
          format: uri
        message:
          type: string
      required:
        - connected
        - method
        - programId
        - message
    RequestMeta:
      type: object
      properties:
        requestId:
          type: string
      required:
        - requestId
    ProgramReadiness:
      type: string
      enum:
        - setup
        - partial
        - ready
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
              additionalProperties: true
          required:
            - code
            - message
        meta:
          $ref: '#/components/schemas/RequestMeta'
      required:
        - error
        - meta
  responses:
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Use API key as Bearer token, for example: Bearer ak_live_xxx'

````