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

# Create Payment



## OpenAPI

````yaml https://api.notte.cc/openapi.json post /sessions/{session_id}/payments
openapi: 3.1.0
info:
  title: Notte API
  description: >-
    Notte API is a REST API that allows you to interact with Notte. It is used
    to create cloud browser sessions, scrape webpages, and run web ai agents to
    act on your behalf on the internet.
  version: 1.9.1
  x-logo:
    url: https://www.notte.cc/images/logo/logo-white.png
servers: []
security: []
tags:
  - name: agents
    description: Web AI agents (start, stop, status, replay, etc.)
  - name: sessions
    description: Session management (start, stop, status, etc.)
  - name: debug
    description: Session debugging tools (replay,logs, recording, etc.)
  - name: page
    description: Page operations withing a session (observe, step, scrape, etc.)
  - name: storage
    description: File storage interface (upload, download, list, etc.)
  - name: network
    description: Network requests/responses withing a session (intercept, etc.)
  - name: vaults
    description: >-
      Vault & Credentials management (create/delete vaults, create/delete
      credentials, etc.)
  - name: personas
    description: Persona management (create, delete, list emails, list sms, etc.)
  - name: scrape
    description: >-
      Webpage scraping (scrape, screenshot, etc.) with automatic session
      management.
  - name: health
    description: Health check endpoint.
  - name: usage
    description: Usage logs (usage, logs, etc.)
  - name: functions
    description: Functions management (create, delete, list, etc.)
paths:
  /sessions/{session_id}/payments:
    post:
      tags:
        - payments
      summary: Create Payment
      operationId: create_payment
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
        - name: update_metadata
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Update Metadata
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 200
            title: Idempotency-Key
        - name: x-notte-request-origin
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Notte-Request-Origin
        - name: x-notte-sdk-version
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Notte-Sdk-Version
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentRequest'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
      x-codeSamples: []
components:
  schemas:
    PaymentRequest:
      properties:
        amount:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: string
              pattern: >-
                ^(?!^[-+.]*$)[+-]?0*(?:\d{0,10}|(?=[\d.]{1,19}0*$)\d{0,10}\.\d{0,8}0*$)
          title: Amount
          description: >-
            Amount in currency units, e.g. 100.91 means USD 100.91. Never
            rounded.
        currency:
          type: string
          pattern: ^[a-z]{3}$
          title: Currency
        merchant_url:
          type: string
          maxLength: 2048
          title: Merchant Url
        merchant_name:
          type: string
          maxLength: 200
          minLength: 1
          title: Merchant Name
        description:
          type: string
          maxLength: 4000
          minLength: 100
          title: Description
        mode:
          type: string
          enum:
            - test
            - live
          title: Mode
          default: live
      additionalProperties: false
      type: object
      required:
        - amount
        - currency
        - merchant_url
        - merchant_name
        - description
      title: PaymentRequest
    PaymentResponse:
      properties:
        id:
          type: string
          title: Id
        session_id:
          type: string
          title: Session Id
        status:
          type: string
          title: Status
        mode:
          type: string
          title: Mode
        amount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount
          description: Amount in currency units, serialized as an exact decimal string.
        currency:
          type: string
          title: Currency
        merchant_name:
          type: string
          title: Merchant Name
        merchant_url:
          type: string
          title: Merchant Url
        vault_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Vault Id
        approval_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Approval Url
        connection_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Connection Url
        connection_phrase:
          anyOf:
            - type: string
            - type: 'null'
          title: Connection Phrase
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
        next_action:
          anyOf:
            - $ref: '#/components/schemas/PaymentNextAction'
            - type: 'null'
        purchase_status:
          type: string
          const: unverified
          title: Purchase Status
          default: unverified
      type: object
      required:
        - id
        - session_id
        - status
        - mode
        - amount
        - currency
        - merchant_name
        - merchant_url
      title: PaymentResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PaymentNextAction:
      properties:
        type:
          type: string
          enum:
            - ssn_verification
            - identity_verification
            - contact_support
            - select_payment_method
            - add_payment_method
            - update_payment_method
            - re_authorize
            - three_d_secure
            - three_d_secure_retry
          title: Type
        resolution:
          type: string
          enum:
            - auto_resume
            - create_new_spend_request
            - create_new_spend_request_after_completion
          title: Resolution
        action_url:
          anyOf:
            - type: string
              maxLength: 4096
            - type: 'null'
          title: Action Url
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
      type: object
      required:
        - type
        - resolution
      title: PaymentNextAction
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: token

````