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

# Create a contactless payment

> Create a pending contactless payment for collecting an in-person
appointment payment. When `amount` is omitted, the appointment's
remaining balance is used.



## OpenAPI

````yaml /api-reference/Payments/openapi.yaml post /appointments/{appointmentId}/contactlessPayments
openapi: 3.0.0
info:
  title: Payments
  version: 0.1.0
  contact:
    name: Guile Engineering
    url: https://www.guile.app
    email: engineering@guile.app
  license:
    name: MIT
    url: https://opensource.org/license/mit
  description: In-person payment operations
servers:
  - url: https://api.guile.app
    variables: {}
  - url: https://guile.fly.dev
    variables: {}
security: []
tags:
  - name: Payments
    description: In-person terminal and contactless card payments
paths:
  /appointments/{appointmentId}/contactlessPayments:
    post:
      tags:
        - Payments
      summary: Create a contactless payment
      description: |-
        Create a pending contactless payment for collecting an in-person
        appointment payment. When `amount` is omitted, the appointment's
        remaining balance is used.
      operationId: createContactlessPayment
      parameters:
        - $ref: '#/components/parameters/idempotencyKeyRequest'
        - name: appointmentId
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/resourceId'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createContactlessPaymentRequest'
            example:
              amount: '45.00'
      responses:
        '201':
          description: Created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/contactlessPayment'
              example:
                id: 0190f0c0-7777-7777-8777-777777777777
                appointment:
                  id: 0190f0c0-4444-7444-8444-444444444444
                  occursOn: '2026-08-15T15:30:00.000Z'
                  barber:
                    id: 0190f0c0-1111-7111-8111-111111111111
                    givenName: Marcus
                    surname: Lee
                  location:
                    id: 0190f0c0-2222-7222-8222-222222222222
                    name: SoHo
                    shopName: Guile Cuts
                amount: '45.00'
                state: created
                clientSecret: pi_secret_example
                createdAt: '2026-08-01T16:00:00.000Z'
                updatedAt: '2026-08-01T16:00:00.000Z'
        '400':
          description: >-
            Bad Request.

            The request body, request headers, and/or query parameters are not
            well-formed.



            This problem response may have one of the following `type` values:

            *
            [https://docs.guile.app/problems/badRequest](https://docs.guile.app/problems/badRequest)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/apiProblem'
        '401':
          description: >-
            Unauthorized.

            The operation requires authentication but no authentication or
            insufficient authentication was given.



            This problem response may have one of the following `type` values:

            *
            [https://docs.guile.app/problems/unauthorized](https://docs.guile.app/problems/unauthorized)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/apiProblem'
        '403':
          description: >-
            Forbidden.

            The authenticated caller is not authorized to perform the requested
            operation.



            This problem response may have one of the following `type` values:

            *
            [https://docs.guile.app/problems/forbidden](https://docs.guile.app/problems/forbidden)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/apiProblem'
        '404':
          description: >-
            Not Found.

            There is no such resource at the request URL.



            This problem response may have one of the following `type` values:

            *
            [https://docs.guile.app/problems/notFound](https://docs.guile.app/problems/notFound)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/apiProblem'
        '409':
          description: >-
            Conflict.

            The request conflicts with the state of the application.



            This problem response may have one of the following `type` values:

            *
            [https://docs.guile.app/problems/conflict](https://docs.guile.app/problems/conflict)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/apiProblem'
              example:
                id: 0190f0c0-cccc-7ccc-8ccc-cccccccccccc
                type: https://docs.guile.app/problems/appointmentAlreadyPaid
                title: Appointment Already Paid
                status: 409
                detail: The appointment is already paid.
                occurredAt: '2026-08-01T16:00:00.000Z'
        '422':
          description: >-
            Unprocessable Entity.

            The request body and/or query parameters were well-formed but
            otherwise invalid.



            This problem response may have one of the following `type` values:

            *
            [https://docs.guile.app/problems/unprocessableEntity](https://docs.guile.app/problems/unprocessableEntity)

            *
            [https://docs.guile.app/problems/paymentProviderNotSetup](https://docs.guile.app/problems/paymentProviderNotSetup)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/apiProblem'
        '429':
          description: >-
            Too Many Requests.

            The client has sent too many requests in a given amount of time.



            This problem response may have one of the following `type` values:

            *
            [https://docs.guile.app/problems/tooManyRequests](https://docs.guile.app/problems/tooManyRequests)
          headers:
            Retry-After:
              required: true
              description: The number of seconds to wait before retrying the request.
              schema:
                type: integer
                format: uint32
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/apiProblem'
      security:
        - BearerAuth: []
components:
  parameters:
    idempotencyKeyRequest:
      name: Idempotency-Key
      in: header
      required: true
      description: >-
        A client-generated idempotency key to ensure operations are only
        processed once

        even if a client retries the operation.

        The V4 UUID format, as defined in [RFC
        4122](https://tools.ietf.org/html/rfc4122), is

        recommended to avoid collisions but is not required.
      schema:
        type: string
        maxLength: 255
  schemas:
    resourceId:
      type: string
      description: >-
        The unique, opaque system identifier for a resource.

        This case-sensitive ID is also used as path parameters in URLs or in
        other

        properties or parameters that reference a resource by ID rather than
        URL.
    createContactlessPaymentRequest:
      type: object
      properties:
        amount:
          allOf:
            - $ref: '#/components/schemas/money'
          description: >-
            The amount to collect. When omitted, the appointment's remaining
            balance is used.
      description: Request body for creating a contactless payment.
    contactlessPayment:
      type: object
      required:
        - id
        - appointment
        - amount
        - state
        - clientSecret
        - createdAt
        - updatedAt
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/resourceId'
          description: The unique identifier for this contactless payment.
        appointment:
          allOf:
            - $ref: '#/components/schemas/appointmentReference'
          description: The appointment this payment collects.
        amount:
          allOf:
            - $ref: '#/components/schemas/money'
          description: The amount to collect.
        state:
          allOf:
            - $ref: '#/components/schemas/contactlessPaymentState'
          description: The payment state.
        externalPaymentReference:
          allOf:
            - $ref: '#/components/schemas/externalPaymentReference'
          description: The payment processor's reference for this payment.
        clientSecret:
          type: string
          description: The client secret associated with the payment processor integration.
        card:
          allOf:
            - $ref: '#/components/schemas/card'
          description: The card-present payment method summary.
        authorizedAt:
          type: string
          format: date-time
          description: The date-time when the payment was authorized.
        capturedAt:
          type: string
          format: date-time
          description: The date-time when the payment was captured.
        expiresAt:
          type: string
          format: date-time
          description: The expiration date-time for this payment session.
        createdAt:
          type: string
          format: date-time
          description: |-
            The date-time when this resource was created, in
            [RFC 3339](https://tools.ietf.org/html/rfc3339) date-time
            `YYYY-MM-DDThh:mm:ss.sssZ` format, UTC. This is derived and
            immutable.
        updatedAt:
          type: string
          format: date-time
          description: |-
            The date-time when this resource was updated, in
            [RFC 3339](https://tools.ietf.org/html/rfc3339) date-time
            `YYYY-MM-DDThh:mm:ss.sssZ` format, UTC. This is derived and
            immutable.
      description: A pending or collected in-person payment for an appointment.
    apiProblem:
      type: object
      required:
        - type
        - title
        - occurredAt
        - id
        - status
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/uri'
          description: A URI reference that identifies the problem type.
        title:
          type: string
          maxLength: 120
          description: >-
            A short, human-readable summary of the problem type. The title is
            usually the same for all

            problems with the same `type`.
        occurredAt:
          type: string
          format: date-time
          description: >-
            The date-time when this problem occurred, in [RFC
            3339](https://tools.ietf.org/html/rfc3339)

            date-time `YYYY-MM-DDThh:mm:ss.sssZ` format, UTC. This is derived
            and immutable.
        detail:
          type: string
          maxLength: 256
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
        id:
          allOf:
            - $ref: '#/components/schemas/resourceId'
          description: >-
            The unique identifier for this problem. This is an immutable opaque
            string.
        status:
          allOf:
            - $ref: '#/components/schemas/statusCode'
          description: >-
            The [HTTP status
            code](https://datatracker.ietf.org/doc/html/rfc7231#section-6)for
            this

            occurrence of the problem.
        instance:
          allOf:
            - $ref: '#/components/schemas/uri'
          maxLength: 2048
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem. This is the URI of an

            API resource that the problem is related to, with a unique error
            correlation ID URI fragment.
        attributes:
          type: object
          additionalProperties: {}
          description: >-
            Additional optional attributes related to the problem. This data
            conforms to the schema

            associated with the error type.
        recovery:
          allOf:
            - $ref: '#/components/schemas/clientFailureRecovery'
          description: The recovery contract for this problem occurrence.
        problems:
          type: array
          items:
            $ref: '#/components/schemas/problem'
          maxItems: 128
          description: |-
            Optional root-causes if there are multiple problems in the request
            or API call processing.
      description: >-
        API problem or error response, as per

        [RFC 9457
        application/problem+json](https://tools.ietf.org/html/rfc9457).
    money:
      type: string
      pattern: ^-?(0|[1-9][0-9]*)\.[0-9][0-9]$
      format: decimal
      description: >-
        A monetary amount in the lowest denomination for the given currency.

        The numeric value is represented as a string so that it can be exact
        with no

        loss of precision. Values may be positive or negative.
      example: '456.78'
    appointmentReference:
      type: object
      required:
        - id
        - occursOn
        - barber
        - location
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/resourceId'
          description: The unique identifier for the appointment.
        occursOn:
          type: string
          format: date-time
          description: |-
            The date and time the appointment occurs on. This is expressed in
            [RFC 3339](https://tools.ietf.org/html/rfc3339)
            `YYYY-MM-DDThh:mm:ss.sssZ` date-time format in UTC time zone.
        timeZone:
          type: string
          allOf:
            - $ref: '#/components/schemas/ianaTimeZone'
          nullable: true
          description: The IANA time zone for the appointment occurrence.
        barber:
          allOf:
            - $ref: '#/components/schemas/Common.BarberReference'
          description: The barber for this appointment.
        location:
          allOf:
            - $ref: '#/components/schemas/Common.ShopLocationReference'
          description: The location for this appointment.
      description: |-
        A reference to an appointment. This contains a subset of properties
        for the appointment.
    contactlessPaymentState:
      type: string
      enum:
        - created
        - processing
        - authorized
        - captured
        - failed
        - canceled
      description: State of a contactless payment.
    externalPaymentReference:
      type: object
      required:
        - id
        - paymentProcessor
      properties:
        id:
          type: string
          maxLength: 255
          description: The payment identifier in the payment processor's system.
        paymentProcessor:
          allOf:
            - $ref: '#/components/schemas/paymentProcessor'
          description: The payment processor holding the payment.
      description: A reference to a payment in the payment processor's system.
    card:
      type: object
      required:
        - maskedPersonalAccountNumber
        - network
        - fundingType
        - expirationMonth
        - expirationYear
      properties:
        maskedPersonalAccountNumber:
          type: string
          minLength: 5
          maxLength: 5
          pattern: ^\*\d{4}$
          description: >-
            A masked card personal account number: an asterisk `*` followed by
            the last

            four digits of the full Personal Account Number (PAN).
        network:
          $ref: '#/components/schemas/cardNetwork'
        fundingType:
          $ref: '#/components/schemas/cardFundingType'
        expirationMonth:
          $ref: '#/components/schemas/cardExpirationMonth'
        expirationYear:
          $ref: '#/components/schemas/cardExpirationYear'
        tokenizationMethod:
          $ref: '#/components/schemas/cardTokenizationMethod'
      description: Representation of a card for an account at a financial institution.
    uri:
      type: string
      maxLength: 1024
      format: uri
      description: A URI reference to an internal or external resource.
    statusCode:
      type: integer
      format: uint16
      minimum: 100
      maximum: 599
      description: The HTTP status code for a response.
    clientFailureRecovery:
      type: object
      required:
        - outcome
        - retry
      properties:
        outcome:
          allOf:
            - $ref: '#/components/schemas/clientFailureOutcome'
          description: The known outcome of the request.
        retry:
          allOf:
            - $ref: '#/components/schemas/clientRetryDirective'
          description: The safe retry action for the request.
        sessionAction:
          allOf:
            - $ref: '#/components/schemas/clientSessionAction'
          description: The session action required before the request can continue.
        rateLimit:
          allOf:
            - $ref: '#/components/schemas/rateLimit'
          description: The rate limit state that prevented the request.
      description: The recovery contract for a failed client request.
    problem:
      type: object
      required:
        - type
        - title
        - occurredAt
        - id
        - status
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/uri'
          description: A URI reference that identifies the problem type.
        title:
          type: string
          maxLength: 120
          description: >-
            A short, human-readable summary of the problem type. The title is
            usually the same for all

            problems with the same `type`.
        occurredAt:
          type: string
          format: date-time
          description: >-
            The date-time when this problem occurred, in [RFC
            3339](https://tools.ietf.org/html/rfc3339)

            date-time `YYYY-MM-DDThh:mm:ss.sssZ` format, UTC. This is derived
            and immutable.
        detail:
          type: string
          maxLength: 256
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
        id:
          allOf:
            - $ref: '#/components/schemas/resourceId'
          description: >-
            The unique identifier for this problem. This is an immutable opaque
            string.
        status:
          allOf:
            - $ref: '#/components/schemas/statusCode'
          description: >-
            The [HTTP status
            code](https://datatracker.ietf.org/doc/html/rfc7231#section-6)for
            this

            occurrence of the problem.
        instance:
          allOf:
            - $ref: '#/components/schemas/uri'
          maxLength: 2048
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem. This is the URI of an

            API resource that the problem is related to, with a unique error
            correlation ID URI fragment.
        attributes:
          type: object
          additionalProperties: {}
          description: >-
            Additional optional attributes related to the problem. This data
            conforms to the schema

            associated with the error type.
      description: >-
        Standard problem or error response, as per

        [RFC 9457
        application/problem+json](https://tools.ietf.org/html/rfc9457).
    ianaTimeZone:
      type: string
      description: An IANA time-zone identifier.
    Common.BarberReference:
      type: object
      required:
        - id
        - givenName
        - surname
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/resourceId'
          description: The unique identifier of the barber profile.
        givenName:
          type: string
          minLength: 1
          maxLength: 55
          format: text
          description: The given name of the barber.
        surname:
          type: string
          minLength: 1
          maxLength: 55
          format: text
          description: The surname of the barber.
        preferredName:
          type: string
          maxLength: 55
          format: text
          description: The preferred name of the barber.
        biography:
          type: string
          maxLength: 2000
          format: text
          description: A short biography of the barber.
        spokenLanguages:
          type: array
          items:
            $ref: '#/components/schemas/spokenLanguageTag'
          minItems: 1
          description: Languages the barber speaks, as IETF BCP 47 language tags.
        experience:
          type: integer
          format: int32
          minimum: 0
          maximum: 100
          description: |-
            Years of professional barbering experience.

            Omitted when the barber has not set a value.
        instagram:
          type: string
          minLength: 1
          maxLength: 30
          pattern: ^[A-Za-z0-9](?:[A-Za-z0-9._]{0,28}[A-Za-z0-9])?$
          description: |-
            Public Instagram username for the booking page, without a leading @.
            Absent when unset. Not a private messaging channel.
        urlSlug:
          allOf:
            - $ref: '#/components/schemas/bookingSlug'
          description: The barber's public booking slug, used in profile links.
        profileImage_URL:
          type: string
          maxLength: 255
          format: uri
          description: A URL to the barber's profile image.
      description: |-
        A reference to a barber resource. This contains a subset of properties
        for the barber. Use Barber for the full resource entity.
    Common.ShopLocationReference:
      type: object
      required:
        - id
        - name
        - shopName
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/resourceId'
          description: |-
            The unique identifier for this shop location reference.
            This is an immutable opaque string.
        name:
          type: string
          description: The name of this location for a shop.
        shopName:
          type: string
          description: The name of the shop business entity.
      description: |-
        A reference to a shop location. This contains a subset of properties
        for the location. Use ShopLocation for the full resource entity.
    paymentProcessor:
      type: string
      enum:
        - stripe
      description: Supported payment processors within the Guile platform.
    cardNetwork:
      type: string
      enum:
        - visa
        - discover
        - mastercard
        - amex
        - other
      description: The card payment processing network.
    cardFundingType:
      type: string
      enum:
        - debit
        - credit
        - prepaid
        - other
      description: Indicates how a card is funded.
    cardExpirationMonth:
      type: string
      minLength: 2
      maxLength: 2
      pattern: ^(0[1-9]|1[012])$
      description: The month portion of the card's MM/YYYY expiration in MM format.
    cardExpirationYear:
      type: string
      minLength: 4
      maxLength: 4
      pattern: ^\d{4}$
      description: >-
        The year portion of the year of the card's MM/YYYY expiration, in YYYY
        format.
    cardTokenizationMethod:
      type: string
      enum:
        - androidPay
        - applePay
        - masterPass
        - visaCheckout
      description: >-
        For digital cards with dynamic tokenization, this is the tokenization
        method.
    clientFailureOutcome:
      type: string
      enum:
        - notApplied
        - unknown
      description: The known outcome of a failed client request.
    clientRetryDirective:
      type: string
      enum:
        - doNotRetry
        - retrySameRequest
        - retrySameRequestAfterDelay
      description: The safe retry action for a failed client request.
    clientSessionAction:
      type: string
      enum:
        - refresh
        - signIn
      description: The session action required before a failed request can continue.
    rateLimit:
      type: object
      required:
        - limit
        - remaining
        - resetsAt
      properties:
        limit:
          type: integer
          format: uint64
          description: The maximum number of requests allowed in the active window.
        remaining:
          type: integer
          format: uint64
          description: The number of requests remaining in the active window.
        resetsAt:
          type: string
          format: date-time
          description: >-
            The date-time when the active window resets, in [RFC
            3339](https://tools.ietf.org/html/rfc3339) date-time
            `YYYY-MM-DDThh:mm:ss.sssZ` format, UTC.
      description: The rate limit state for the request.
    spokenLanguageTag:
      type: string
      enum:
        - ar
        - de
        - en
        - es
        - fr
        - ko
        - ru
        - tl
        - vi
        - zh
      description: An IETF BCP 47 language tag supported on barber profiles.
    bookingSlug:
      type: string
      minLength: 3
      maxLength: 40
      pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
      description: A barber's public booking slug, used in profile links.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````