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

# Charge a payment line to the hotel room

> Adds a line of the activity still owed to the guest's folio in the hotel PMS. The stay is the cart's: the cart must be linked to one (`pms_reference`) with its room number. EatNow reads the stay again from the PMS and charges only that very stay, open to charges. Send an `Idempotency-Key` header: a replay of the key answers the charge's current state, never a second charge. An activity awaiting its payment is confirmed once nothing else is owed online on it. Cancelling the activity while the PMS's answer is awaited is refused (`capture_pending`); a refund or a cancellation with a refund reverses the charge on the folio. Requires `PAYMENTS_WRITE`; the line in full also needs `ACTIVITIES_READ_SENSITIVE`. Publishes `activity.updated` when the line moves.



## OpenAPI

````yaml https://app.eat-now.io/api/partner/v1/openapi.json post /api/partner/v1/activities/{id}/payments/{paymentId}/room-charge
openapi: 3.0.3
info:
  title: EatNow Partner API
  version: v1
  description: >-
    Version 1 of the EatNow partner API.


    This API is designed for trusted partner integrations that need
    restaurant-scoped access to availability, reservation management, and
    operational reference data.


    Authentication

    - Use `Authorization: Bearer <token>` with a partner API token created from
    the EatNow dashboard.

    - Access is controlled by credential scopes and each request is resolved to
    a single restaurant.


    Base URL

    - The server URL in this document is the canonical base URL for the current
    environment.


    Errors

    - Endpoint errors use `error.code`, `error.message`, and `error.request_id`.
    Errors raised before the endpoint, including rate limiting, may use another
    format.

    - Validation, authentication, authorization, conflicts, and not-found cases
    all use the same top-level error shape.


    Rate limits

    - An API key may send 300 requests per minute: past that, `429 RATE_LIMITED`
    with `Retry-After`, in seconds. The partner route rule also allows 600
    requests per minute per client IP. Back off on 429. When present,
    x-ratelimit-reset is an epoch timestamp in milliseconds.


    Public endpoints

    - `GET /api/partner/v1` and `GET /api/partner/v1/openapi.json` are public.

    - All business endpoints require Bearer authentication.
servers:
  - url: https://app.eat-now.io
security: []
tags:
  - name: Meta
    description: Platform metadata and schema endpoints
  - name: Authentication
    description: Credential validation and auth context endpoints
  - name: Availability
    description: Bookable slot search and exact slot validation
  - name: Catalog
    description: Reference data for restaurant tables, rooms, prescribers, and discounts
  - name: Reservations
    description: Reservation lookup, search, update, and cancellation
  - name: Customers
    description: >-
      Customer (CRM) records, independent of reservations: list, sync, create,
      update
  - name: Activities
    description: 'Booked activities (spa, excursions…): read and incremental sync'
  - name: Activity catalog
    description: >-
      Activity products, their slots and staff: what a reseller reads before it
      books
  - name: Gift cards
    description: >-
      Import and manage your own gift cards, or check and redeem any code at a
      till
  - name: Webhooks
    description: >-
      Webhook endpoints a key subscribes to V1 events (reservations, customers,
      activities, gift cards)
  - name: Missed Calls
    description: Report missed calls and trigger WhatsApp follow-up templates
externalDocs:
  description: Integration guides, authentication, errors, and webhook reference
  url: https://docs.eat-now.io/api-reference/introduction
paths:
  /api/partner/v1/activities/{id}/payments/{paymentId}/room-charge:
    post:
      tags:
        - Activities
      summary: Charge a payment line to the hotel room
      description: >-
        Adds a line of the activity still owed to the guest's folio in the hotel
        PMS. The stay is the cart's: the cart must be linked to one
        (`pms_reference`) with its room number. EatNow reads the stay again from
        the PMS and charges only that very stay, open to charges. Send an
        `Idempotency-Key` header: a replay of the key answers the charge's
        current state, never a second charge. An activity awaiting its payment
        is confirmed once nothing else is owed online on it. Cancelling the
        activity while the PMS's answer is awaited is refused
        (`capture_pending`); a refund or a cancellation with a refund reverses
        the charge on the folio. Requires `PAYMENTS_WRITE`; the line in full
        also needs `ACTIVITIES_READ_SENSITIVE`. Publishes `activity.updated`
        when the line moves.
      operationId: chargePartnerActivityPaymentToRoom
      parameters:
        - schema:
            type: string
            minLength: 1
            description: Activity identifier.
          required: true
          description: Activity identifier.
          name: id
          in: path
        - schema:
            type: string
            minLength: 1
            description: Payment line identifier.
          required: true
          description: Payment line identifier.
          name: paymentId
          in: path
        - schema:
            type: string
            minLength: 1
            maxLength: 255
            description: >-
              Your unique key for this write (1 to 255 visible ASCII
              characters).
          required: true
          description: Your unique key for this write (1 to 255 visible ASCII characters).
          name: Idempotency-Key
          in: header
      responses:
        '201':
          description: 'Posted: the activity, its line paid by the room'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiActivityResponse'
        '202':
          description: >-
            The PMS's answer is not known yet: the line stays pending and
            locked; EatNow asks again and the outcome follows by webhook (or a
            replay of the key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiActivityResponse'
        '400':
          description: >-
            `Idempotency-Key` missing or invalid (`details.reason:
            idempotency_key_required`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '403':
          description: 'Scope is insufficient. Required: `PAYMENTS_WRITE`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '404':
          description: No such activity, or no such line on it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '409':
          description: >-
            `details.reason`: `not_chargeable`, `not_accepted` (a request),
            `visit_closed` (cancelled, refused or over),
            `online_payment_in_progress` (the guest opened the payment page),
            `operation_in_progress` (a refund or capture is running),
            `not_linked`, `stay_not_verified`, `room_charge_not_allowed`,
            `no_connection`, `no_outlet`, `room_charge_refused` (with
            `refusal_code`, the PMS's reason), `request_in_progress`, or
            `idempotency_key_reused` (the key carried another request).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '429':
          description: >-
            Rate limit exceeded: at most 300 requests per minute per API key
            (`RATE_LIMITED`, with a `Retry-After` header in seconds), and 600
            per minute per client IP for the partner route rule, whose
            middleware response may not use the PartnerApiError envelope or
            include request_id. Back off before retrying.
        '500':
          description: >-
            Unexpected server error. Preserve error.request_id for support.
            Before retrying a write, check whether it already succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '503':
          description: >-
            The PMS could not be reached before anything was charged
            (`details.reason: pms_unavailable`): retry later with the same key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
      security:
        - PartnerBearerToken: []
components:
  schemas:
    PartnerApiActivityResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PartnerApiActivity'
      required:
        - data
    PartnerApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              $ref: '#/components/schemas/PartnerApiErrorCode'
            message:
              type: string
            request_id:
              type: string
            details:
              type: object
              additionalProperties:
                nullable: true
          required:
            - code
            - message
            - request_id
      required:
        - error
    PartnerApiActivity:
      type: object
      properties:
        id:
          type: string
        cart_id:
          type: string
          description: >-
            The guest's visit: activities booked together share it (one payment
            page, one customer, one room).
        external_id:
          type: string
          nullable: true
          description: Your reference of this activity, set when you booked it.
        cart_external_id:
          type: string
          nullable: true
          description: Your reference of its cart, set when you booked it.
        status:
          type: string
          enum:
            - PENDING
            - REJECTED
            - CONFIRMED_PENDING_PAYMENT
            - CONFIRMED
            - SHOWED_UP
            - NO_SHOW
            - CANCELED_BY_RESTAURANT
            - CANCELED_BY_USER
        start_at:
          type: string
          format: date-time
        party_size:
          type: integer
          minimum: 0
        source:
          type: string
          enum:
            - WALK_IN
            - WEBSITE
            - PHONE
            - EMAIL
            - RESERVE_WITH_GOOGLE
            - TRAVEL_AGENCIES
            - OTHER
            - INSTAGRAM
            - FACEBOOK
            - TIKTOK
            - SNAPCHAT
            - WHATSAPP
            - TRIPADVISOR
            - PRIVATIZATION
            - MISSED_CALL
        product:
          $ref: '#/components/schemas/PartnerApiActivityProduct'
        variant:
          $ref: '#/components/schemas/PartnerApiActivityVariant'
        variants:
          type: array
          items:
            $ref: '#/components/schemas/PartnerApiActivityBookedVariant'
          description: >-
            What is booked: each variant of the product and its quantity, extras
            left out.
        assigned_staff:
          $ref: '#/components/schemas/PartnerApiActivityStaff'
        prescriber:
          $ref: '#/components/schemas/PartnerApiPrescriber'
        customer:
          $ref: '#/components/schemas/PartnerApiCustomer'
        hotel_guest:
          type: object
          nullable: true
          properties:
            room_number:
              type: string
              nullable: true
            pms_reference:
              $ref: '#/components/schemas/PartnerApiPmsReference'
          required:
            - room_number
            - pms_reference
          description: >-
            Set when the guest stays at the hotel. `room_number` and
            `pms_reference` are null without the sensitive view.
        additional_comment:
          type: string
          nullable: true
        metadata:
          type: object
          nullable: true
          additionalProperties:
            $ref: '#/components/schemas/PartnerApiMetadataField'
        attached_files:
          type: array
          items:
            type: string
        tags:
          type: array
          items:
            type: string
        cancellation_reason:
          type: string
          nullable: true
        payment_summary:
          $ref: '#/components/schemas/PartnerApiPaymentSummary'
        payments:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/PartnerApiPayment'
        sensitive_data_included:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
          description: >-
            Last change of the activity, its cart or its payment lines. Not an
            order of events: read the activity again to know its current state.
      required:
        - id
        - cart_id
        - external_id
        - cart_external_id
        - status
        - start_at
        - party_size
        - source
        - product
        - variant
        - variants
        - assigned_staff
        - prescriber
        - customer
        - hotel_guest
        - additional_comment
        - metadata
        - attached_files
        - tags
        - cancellation_reason
        - payment_summary
        - payments
        - sensitive_data_included
        - created_at
        - updated_at
    PartnerApiErrorCode:
      type: string
      enum:
        - AUTHENTICATION_REQUIRED
        - INVALID_AUTHENTICATION
        - INSUFFICIENT_SCOPE
        - FEATURE_NOT_ENABLED
        - RESTAURANT_SUSPENDED
        - VALIDATION_ERROR
        - RESOURCE_NOT_FOUND
        - RESOURCE_CONFLICT
        - PAYMENT_REQUIRED
        - RATE_LIMITED
        - INTERNAL_ERROR
    PartnerApiActivityProduct:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
    PartnerApiActivityVariant:
      type: object
      nullable: true
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
      description: >-
        The variant booked when there is exactly one; null when there are
        several (see `variants`).
    PartnerApiActivityBookedVariant:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        quantity:
          type: integer
          minimum: 0
      required:
        - id
        - name
        - quantity
    PartnerApiActivityStaff:
      type: object
      nullable: true
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
      description: Who runs it (therapist, guide…), chosen by the staff.
    PartnerApiPrescriber:
      type: object
      nullable: true
      properties:
        id:
          type: string
        name:
          type: string
        phone_number:
          type: string
          nullable: true
      required:
        - id
        - name
        - phone_number
    PartnerApiCustomer:
      type: object
      nullable: true
      properties:
        id:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
          format: email
        phone_number:
          type: string
          nullable: true
        lang:
          type: string
          nullable: true
          enum:
            - FR
            - EN
            - IT
            - ES
            - DE
            - PT
            - null
      required:
        - id
        - name
        - email
        - phone_number
        - lang
    PartnerApiPmsReference:
      type: object
      nullable: true
      properties:
        stay_id:
          type: string
          minLength: 1
          maxLength: 128
      required:
        - stay_id
      description: >-
        The stay in the hotel's property management system (PMS), when the visit
        is linked to one. Read: null without the sensitive view. Write: links
        the visit to a PMS stay; null unlinks it.
    PartnerApiMetadataField:
      type: object
      properties:
        name:
          type: string
        value:
          anyOf:
            - type: string
            - type: number
            - type: boolean
            - nullable: true
            - type: array
              items:
                type: string
      required:
        - name
        - value
    PartnerApiPaymentSummary:
      type: object
      properties:
        currency:
          type: string
          nullable: true
          enum:
            - MAD
            - EUR
            - USD
            - XOF
            - null
        total_amount:
          type: integer
        paid_amount:
          type: integer
        gift_card_amount:
          type: integer
        authorized_amount:
          type: integer
        pending_amount:
          type: integer
        refunded_amount:
          type: integer
        statuses:
          type: array
          items:
            type: string
            enum:
              - FREE
              - PENDING
              - PAID
              - EXPIRED
              - REFUNDED
              - CANCELED
              - AUTHORIZED
              - CAPTURED
              - CAPTURE_FAILED
              - VOIDED
              - DECLINED
      required:
        - currency
        - total_amount
        - paid_amount
        - gift_card_amount
        - authorized_amount
        - pending_amount
        - refunded_amount
        - statuses
    PartnerApiPayment:
      type: object
      properties:
        id:
          type: string
        provider_id:
          type: string
          nullable: true
        payment_type:
          type: string
          enum:
            - DEPOSIT
            - PREPAYMENT
            - EXTRA
            - NO_SHOW_FEE
            - GIFT_CARD
        payment_mode:
          type: string
          enum:
            - SOFT_PREAUTH
            - PREAUTH
            - POSTAUTH
        provider:
          type: string
          enum:
            - PAYZONE
            - CMI
            - STRIPE
            - CASH
            - WIRE_TRANSFER
            - DEBTOR
            - CREDIT_CARD
            - PARTNER
            - ROOM_CHARGE
            - GIFT_CARD
        status:
          type: string
          enum:
            - FREE
            - PENDING
            - PAID
            - EXPIRED
            - REFUNDED
            - CANCELED
            - AUTHORIZED
            - CAPTURED
            - CAPTURE_FAILED
            - VOIDED
            - DECLINED
        amount:
          type: integer
        gift_card_amount:
          type: integer
        quantity:
          type: integer
        unit_price:
          type: integer
        percent_of_total:
          type: number
        currency:
          type: string
          enum:
            - MAD
            - EUR
            - USD
            - XOF
        is_refundable:
          type: boolean
        external_reference:
          type: string
          nullable: true
          description: >-
            Reference of money taken outside EatNow (provider `PARTNER`): the
            partner's payment or order id.
        expiration_date:
          type: string
          nullable: true
          format: date-time
        max_cancellation_date:
          type: string
          nullable: true
          format: date-time
        authorized_at:
          type: string
          nullable: true
          format: date-time
        capture_deadline:
          type: string
          nullable: true
          format: date-time
        captured_at:
          type: string
          nullable: true
          format: date-time
        voided_at:
          type: string
          nullable: true
          format: date-time
        linked_product:
          $ref: '#/components/schemas/PartnerApiPaymentProduct'
        linked_variant:
          $ref: '#/components/schemas/PartnerApiPaymentProduct'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - provider_id
        - payment_type
        - payment_mode
        - provider
        - status
        - amount
        - gift_card_amount
        - quantity
        - unit_price
        - percent_of_total
        - currency
        - is_refundable
        - external_reference
        - expiration_date
        - max_cancellation_date
        - authorized_at
        - capture_deadline
        - captured_at
        - voided_at
        - linked_product
        - linked_variant
        - created_at
        - updated_at
    PartnerApiPaymentProduct:
      type: object
      nullable: true
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
  securitySchemes:
    PartnerBearerToken:
      type: http
      scheme: bearer
      bearerFormat: API Token
      description: >-
        Restaurant-scoped partner API token passed as `Authorization: Bearer
        <token>`.
      x-default: your_token_here

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.