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

# Create Checkout Source



## OpenAPI

````yaml https://api.heydollr.app/openapi.json post /{version}/checkouts/create
openapi: 3.1.0
info:
  title: Dollr Open API
  version: 1.0.0
servers: []
security: []
paths:
  /{version}/checkouts/create:
    post:
      tags:
        - checkouts
      summary: Create Checkout Source
      operationId: create_checkout_source__version__checkouts_create_post
      parameters:
        - name: version
          in: path
          required: true
          schema:
            const: v1
            type: string
            title: API version
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCheckoutSourceRequestPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCheckoutSourceLinkResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
        - HTTPBearer: []
components:
  schemas:
    CreateCheckoutSourceRequestPayload:
      properties:
        mode:
          type: string
          title: Mode
        source_kind:
          type: string
          title: Source Kind
        party_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Party Name
        party_phone:
          type: string
          maxLength: 15
          minLength: 8
          pattern: ^[1-9]\d{7,14}$
          title: Phone number
          description: E.164 digits only, without '+' (e.g. 231771234567)
        party_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Party Email
        party_relationship:
          anyOf:
            - type: string
            - type: 'null'
          title: Party Relationship
        reference_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Reference Id
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        currency:
          type: string
          title: Currency
        items:
          items:
            $ref: '#/components/schemas/PaymentSourceItemInput'
          type: array
          title: Items
        due_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Due Date
        success_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Success Url
        cancel_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Cancel Url
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
        counterparty_id:
          anyOf:
            - type: number
            - type: integer
            - type: 'null'
          title: Counterparty Id
      type: object
      required:
        - mode
        - source_kind
        - party_phone
        - currency
        - items
      title: CreateCheckoutSourceRequestPayload
    CreateCheckoutSourceLinkResponse:
      properties:
        mode:
          type: string
          title: Mode
        source_type:
          type: string
          title: Source Type
        source_id:
          type: integer
          title: Source Id
        source_number:
          type: string
          title: Source Number
        source_status:
          type: string
          title: Source Status
        reference_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Reference Id
        counterparty_id:
          type: integer
          title: Counterparty Id
        party_id:
          type: integer
          title: Party Id
        currency:
          type: string
          maxLength: 3
          minLength: 3
          title: Currency
          description: Three-letter ISO-4217 currency code (e.g. USD, LRD, NGN)
        total_amount:
          anyOf:
            - type: number
            - type: integer
          title: Total Amount
          description: Amount
        due_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Due Date
        source_checkout_config_id:
          type: integer
          title: Source Checkout Config Id
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
        hosted_path_or_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Hosted Path Or Token
        success_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Success Url
        cancel_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Cancel Url
        url:
          type: string
          title: Url
      type: object
      required:
        - mode
        - source_type
        - source_id
        - source_number
        - source_status
        - counterparty_id
        - party_id
        - currency
        - total_amount
        - source_checkout_config_id
        - url
      title: CreateCheckoutSourceLinkResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PaymentSourceItemInput:
      properties:
        name:
          type: string
          title: Name
        currency:
          type: string
          maxLength: 3
          minLength: 3
          title: Currency
          description: Three-letter ISO-4217 currency code (e.g. USD, LRD, NGN)
        amount:
          anyOf:
            - type: number
              minimum: 0.01
            - type: integer
              minimum: 1
          title: Amount
          description: A positive, non-zero amount.
      type: object
      required:
        - name
        - currency
        - amount
      title: PaymentSourceItemInput
      description: >-
        Composite input type for a single line item in
        create_collection_source_openapi.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````