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

# Get the Checkout Page

> Get the Stripe Checkout page of an unpaid engagement at /api/v1/hack-me/engagements/{id}/checkout

## Overview

Returns `checkoutUrl`, the Stripe Checkout page of an engagement that is `awaiting_payment`; the action behind `morph hackme pay`. It returns the open page when there is one, and a new page when the last one expired, so call it whenever you need the link again. The amount and tax are set by Morph and Stripe: the body is ignored.

The host is checked again first: one that no longer resolves only to public addresses is refused with `409`. Once the payment is submitted, this route returns `409` and the engagement moves to `paid` when Stripe confirms it. Organization keys require an organization admin.


## OpenAPI

````yaml POST /api/v1/hack-me/engagements/{id}/checkout
openapi: 3.1.0
info:
  title: Morph API
  version: 1.2.0
  description: >-
    The Morph public API at api.morphllm.com: OpenAI- and Anthropic-compatible
    inference (chat completions, messages), Fast Apply code editing, Compact
    context compression, System One typed decisions, speech to text (audio
    transcription and translation), model listing, and dedicated endpoint
    management, agentic credit top-ups paid over x402, account usage and billing
    settings, and organization member budgets. Model ids, prices, and context
    windows are served live at https://www.morphllm.com/api/models/json.
  contact:
    name: Morph
    url: https://morphllm.com
    email: info@morphllm.com
  license:
    name: Proprietary
    url: https://morphllm.com/privacy/tos
servers:
  - url: https://api.morphllm.com
    description: Production
security: []
tags:
  - name: chat
    description: >-
      OpenAI- and Anthropic-compatible chat inference, including Fast Apply and
      WarpGrep models.
  - name: compact
    description: Context compression for long agent conversations.
  - name: systemone
    description: 'Typed decisions: a state in, a probability distribution per question out.'
  - name: audio
    description: >-
      Speech to text: transcription and translation of audio files,
      OpenAI-compatible.
  - name: models
    description: Model listing.
  - name: dedicated
    description: Dedicated endpoint discovery, status, and cancellation.
  - name: compute
    description: >-
      Dedicated compute: reserve whole GPU nodes by the month, manage SSH keys,
      give notice. Limited preview.
  - name: hack-me
    description: >-
      Hack me: an automated black-box penetration test of one public host you
      control, run by MindFort, Morph’s security testing partner.
  - name: credits
    description: Agentic credit top-ups paid in USDC over x402.
  - name: account
    description: >-
      Usage and spend per day; billing settings: extra usage, spend limit and
      alert, auto-reload.
  - name: organization
    description: Organization member budgets.
  - name: telemetry
    description: Usage reporting hooks.
paths:
  /api/v1/hack-me/engagements/{id}/checkout:
    post:
      tags:
        - hack-me
      summary: Get the checkout page of a Hack me engagement
      description: >-
        Returns the Stripe Checkout page of an unpaid engagement: the open one,
        or a new one when it has expired. The amount and tax are set by the
        server; the body is ignored. With an organization key, requires an
        organization admin.
      operationId: checkoutHackMeEngagement
      parameters:
        - schema:
            type: string
            format: uuid
            description: Id of an engagement that is `awaiting_payment`.
            example: c3a1f9d2-6b4e-4f7a-9e21-5d8b0c7a4e16
          required: true
          description: Identifies the engagement to pay for.
          name: id
          in: path
      responses:
        '200':
          description: The checkout page.
          content:
            application/json:
              example:
                checkoutUrl: https://checkout.stripe.com/c/pay/cs_live_b2C3d4E5f6G7h8I9j0K1
              schema:
                $ref: '#/components/schemas/HackMeCheckout'
        '401':
          $ref: '#/components/responses/HackMeUnauthorized'
        '403':
          $ref: '#/components/responses/HackMeAdminRequired'
        '404':
          $ref: '#/components/responses/HackMeNotFound'
        '409':
          description: >-
            The engagement cannot be paid for: it is already paid or closed, a
            payment was already submitted, it is a draft from a retired flow, or
            the host does not resolve only to public addresses. The message says
            which.
          content:
            application/json:
              example:
                error: This engagement is already paid or closed.
              schema:
                $ref: '#/components/schemas/HackMeError'
        '503':
          description: >-
            Checkout is paused, or the check that the host is public could not
            run. Retry later.
          content:
            application/json:
              example:
                error: Assessment checkout is paused.
              schema:
                $ref: '#/components/schemas/HackMeError'
      security:
        - bearerAuth: []
components:
  schemas:
    HackMeCheckout:
      type: object
      properties:
        checkoutUrl:
          type: string
          format: uri
          description: The engagement’s Stripe Checkout page. Open it in a browser.
          example: https://checkout.stripe.com/c/pay/cs_live_b2C3d4E5f6G7h8I9j0K1
      required:
        - checkoutUrl
      description: Where to pay for an engagement.
      example:
        checkoutUrl: https://checkout.stripe.com/c/pay/cs_live_b2C3d4E5f6G7h8I9j0K1
    HackMeError:
      type: object
      properties:
        error:
          type: string
          description: Why the request was refused and what to do instead, in plain text.
          example: >-
            Engagement not found. List yours with GET
            /api/v1/hack-me/engagements.
      required:
        - error
      description: Error body returned by the Hack me routes.
      example:
        error: Engagement not found. List yours with GET /api/v1/hack-me/engagements.
  responses:
    HackMeUnauthorized:
      description: Missing or invalid Morph API key on a Hack me request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HackMeError'
          example:
            error: >-
              Missing or invalid API key. Send "Authorization: Bearer <key>"
              with a key from https://www.morphllm.com/dashboard/api-keys
    HackMeAdminRequired:
      description: >-
        The key is an organization key whose owner is not an admin of the
        organization. With an organization key, every write needs a key created
        by an organization admin.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HackMeError'
          example:
            error: >-
              An organization admin must authorize and pay for an engagement.
              Use an API key created by an admin of this organization.
    HackMeNotFound:
      description: >-
        No engagement with this id belongs to the key’s account. Another
        account’s engagement also returns 404, so existence is never leaked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HackMeError'
          example:
            error: >-
              Engagement not found. List yours with GET
              /api/v1/hack-me/engagements.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque
      description: >-
        Morph API key, passed as `Authorization: Bearer sk-...`. Create keys at
        https://www.morphllm.com/dashboard/api-keys.

````

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