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

# Get payment details for generation.

> Get payment details for generation. This will include a lightning invoice, and follows the L402 standard for payment requests.



## OpenAPI

````yaml post /payment-request
openapi: 3.0.1
info:
  title: markdown2pdf
  version: '2025-06-10T15:55:31Z'
servers:
  - url: https://api.markdown2pdf.ai
security: []
paths:
  /payment-request:
    post:
      summary: Get payment details for generation.
      description: >-
        Get payment details for generation. This will include a lightning
        invoice, and follows the L402 standard for payment requests.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobPaymentRequest'
        required: true
      responses:
        '200':
          description: >-
            Payment request details including offer ID, payment request, and QR
            code SVG.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobPaymentRequestResponse'
        '404':
          description: If the payment request cannot be found or is invalid.
          content: {}
        '422':
          description: If the request body is invalid or missing required fields.
          content: {}
components:
  schemas:
    JobPaymentRequest:
      title: JobPaymentRequest
      required:
        - offer_id
        - payment_context_token
      type: object
      properties:
        offer_id:
          title: Offer Id
          type: string
          description: Unique identifier for the payment offer
        payment_methods:
          title: Payment Methods
          description: Payment method to be used
          type: string
          nullable: true
        payment_context_token:
          title: Payment Context Token
          type: string
          description: Token to identify the payment context
    JobPaymentRequestResponse:
      title: JobPaymentRequestResponse
      required:
        - payment_request
      type: object
      properties:
        version:
          title: Version
          type: string
          description: Version of the payment request response schema
        payment_request:
          title: Payment Request
          type: object
          additionalProperties:
            type: string
          description: Payment request details
        expires_at:
          title: Expires At
          description: Expiration time for the payment request
          type: string
          format: date-time
          nullable: true

````