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

# Send receipt

> For a payment intent created with `printVoucher: false`. After the approval the terminal holds the card voucher for 60 seconds; send your receipt as a PNG and the terminal prints it with the voucher right under it, on one paper. Accepted once, and only once the intent is `CONFIRMED`. A receipt that arrives after the 60 seconds is kept but not printed: the voucher has already printed on its own.



## OpenAPI

````yaml POST /developer/v1/payment-intent/{id}/receipt
openapi: 3.1.0
info:
  title: Compago API
  version: 1.0.0
  description: >-
    Public and private API endpoints for Compago's payment infrastructure. This
    specification currently includes endpoints for one-time payments. More
    endpoints will be added as the platform evolves.
servers:
  - url: https://demo-api-harmony.compago.com/api
  - url: https://api-harmony.compago.com/api
security: []
tags:
  - name: OneTimePayment
    description: Endpoints for creating and processing one-time payment links
  - name: PaymentMethod
    description: >-
      Endpoints for saving cards, charging saved payment methods, holding and
      capturing funds, and processing refunds
  - name: PaymentIntent
    description: >-
      Endpoints for creating and managing card-present payment intents for POS
      terminal integrations
  - name: Payments
    description: Read the payments your organization has taken
  - name: Subscriptions
    description: Read and manage recurring billing agreements
  - name: PaymentLinks
    description: Create, edit and retire hosted checkout links
  - name: Products
    description: Manage the catalogue behind product-based payment links
  - name: Promotions
    description: Read the promotions your organization funds or benefits from
  - name: Salespeople
    description: Read the point-of-sale operators in your organization
  - name: Organization
    description: Read your organization profile and its members
  - name: SavedCards
    description: Read saved payment methods and their payments
  - name: Payouts
    description: >-
      Read the transfers Compago sent to your bank accounts and what each one
      paid
  - name: Events
    description: >-
      Read the webhook events of the last 30 days, to reconcile after your
      endpoint was down
  - name: ApiKeys
    description: Manage your organization's API keys with a key that holds `apiKey:write`.
paths:
  /developer/v1/payment-intent/{id}/receipt:
    post:
      tags:
        - PaymentIntent
      summary: Send your receipt to the terminal
      description: >-
        For a payment intent created with `printVoucher: false`. After the
        approval the terminal holds the card voucher for 60 seconds; send your
        receipt as a PNG and the terminal prints it with the voucher right under
        it, on one paper. Accepted once, and only once the intent is
        `CONFIRMED`. A receipt that arrives after the 60 seconds is kept but not
        printed: the voucher has already printed on its own.
      operationId: sendPaymentIntentReceipt
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The unique identifier of the approved payment intent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - image
              properties:
                image:
                  type: string
                  maxLength: 524288
                  description: >-
                    Your receipt as a PNG in base64, without the `data:` prefix,
                    up to 512 KB. Draw it 384 px wide (58 mm paper, 8 dots per
                    millimetre) in black and white; a wider image is scaled down
                    to the paper.
            example:
              image: iVBORw0KGgoAAAANSUhEUgAAAYAAAAHgCAAAAAA...
      responses:
        '200':
          description: Receipt received; the terminal prints it with the voucher under it
          content:
            application/json:
              schema:
                type: object
              example: {}
        '400':
          description: The image is not a PNG in base64, or is larger than 512 KB
        '401':
          description: >-
            Unauthorized: the `x-api-key` or `Authorization: Bearer` credential
            was not accepted (missing, invalid, disabled, expired, or from the
            other environment).
        '404':
          description: Payment intent not found
        '409':
          description: >-
            The intent is not `CONFIRMED`, was created with `printVoucher:
            true`, or already has a receipt
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

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