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

# Get the receipt (JSON)



## OpenAPI

````yaml /v3-beta/api-reference/openapi.yaml get /v3/payments/{id}/receipt
openapi: 3.1.0
info:
  title: Suby.fi Merchant API
  version: 3.0.0-beta
  description: >
    The **v3** public merchant API for Suby.fi. RESTful (plural,
    resource-oriented

    endpoints under the `/v3` prefix). Authenticate every request

    with your secret API key in the `X-Suby-Api-Key` header.


    - `sk_live_…` keys operate in **production** (real funds).

    - `sk_sandbox_…` keys operate in a fully simulated **sandbox** (test cards,
      Base Sepolia crypto, no real money). The environment is derived from the
      key prefix.

    All monetary amounts are **integer cents** (except `priceCents` on some

    read shapes, which is a string) — token amounts are strings in the smallest

    unit (sats / lamports / wei). Fees are basis points.
  contact:
    email: dev@suby.fi
    url: https://suby.fi
servers:
  - url: https://api.beta.suby.fi
    description: Production + sandbox (environment selected by API key prefix)
security:
  - ApiKeyAuth: []
tags:
  - name: Products
    description: Manage your product catalog (one-time and recurring).
  - name: Checkout
    description: >-
      Hosted checkout — signed session tokens (`cs_…`) plus branding and
      appearance settings.
  - name: Payments
    description: >-
      Create, capture, void, and retrieve one-time & off-session payments (card,
      APM, and crypto).
  - name: Subscriptions
    description: Start and cancel recurring subscriptions.
  - name: Customers
    description: First-class customer records with billing address.
  - name: Payment Methods
    description: >-
      Save a payment method to a customer and manage saved instruments for
      off-session charges.
  - name: Webhook Endpoints
    description: Register outbound webhook destinations and rotate signing secrets.
  - name: Analytics
    description: Org-wide revenue analytics.
  - name: Health
    description: Unauthenticated liveness probe.
paths:
  /v3/payments/{id}/receipt:
    get:
      tags:
        - Payments
      summary: Get the receipt (JSON)
      operationId: getPaymentReceipt
      parameters:
        - $ref: '#/components/parameters/PaymentId'
      responses:
        '200':
          description: Receipt payload
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - properties:
                      data:
                        $ref: '#/components/schemas/Receipt'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    PaymentId:
      name: id
      in: path
      required: true
      schema:
        type: string
        example: pay_abc123
  schemas:
    SuccessEnvelope:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
        data:
          description: Endpoint-specific payload.
    Receipt:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
        currency:
          type: string
          nullable: true
        priceCents:
          type: string
          nullable: true
        displayName:
          type: string
          nullable: true
        displayDescription:
          type: string
          nullable: true
        displayImageUrl:
          type: string
          nullable: true
        grossAmountCents:
          type: integer
          nullable: true
        vatAmountCents:
          type: integer
          nullable: true
        vatRateBps:
          type: integer
          nullable: true
          description: >-
            Applied VAT rate in basis points (2000 = 20%); MoR + EU only, else
            null
        taxInclusive:
          type: boolean
          description: >-
            true = price is VAT-inclusive (gross = price); false = exclusive
            (gross = price + VAT)
        discountAmountCents:
          type: integer
          nullable: true
        discountCode:
          type: string
          nullable: true
        refundedAmountCents:
          type: integer
          nullable: true
        paymentProvider:
          type: string
          nullable: true
        invoiceNumber:
          type: string
          nullable: true
        depositAddress:
          type: string
          nullable: true
          description: Crypto deposit address (crypto payments only).
        createdAt:
          type: string
          format: date-time
        environment:
          type: string
          enum:
            - LIVE
            - SANDBOX
        sandbox:
          type: boolean
        merchant:
          type: object
          properties:
            name:
              type: string
              nullable: true
            imageUrl:
              type: string
              nullable: true
            legalName:
              type: string
              nullable: true
            operatingAs:
              type: string
              nullable: true
            websiteUrl:
              type: string
              nullable: true
            country:
              type: string
              nullable: true
            vatNumber:
              type: string
              nullable: true
            registrationNumber:
              type: string
              nullable: true
            legalAddressLine1:
              type: string
              nullable: true
            legalAddressLine2:
              type: string
              nullable: true
            legalCity:
              type: string
              nullable: true
            legalState:
              type: string
              nullable: true
            legalPostalCode:
              type: string
              nullable: true
            legalCountry:
              type: string
              nullable: true
        customer:
          type: object
          nullable: true
          properties:
            email:
              type: string
              nullable: true
            firstName:
              type: string
              nullable: true
            lastName:
              type: string
              nullable: true
            billingLine1:
              type: string
              nullable: true
            billingLine2:
              type: string
              nullable: true
            billingCity:
              type: string
              nullable: true
            billingState:
              type: string
              nullable: true
            billingPostalCode:
              type: string
              nullable: true
            billingCountry:
              type: string
              nullable: true
        lineItems:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              priceCents:
                type: string
              quantity:
                type: integer
        recurring:
          type: object
          nullable: true
          description: >-
            Billing cadence when the payment belongs to a subscription; null for
            one-time charges.
          properties:
            recurringInterval:
              type: string
              enum:
                - DAY
                - WEEK
                - MONTH
                - YEAR
            recurringIntervalCount:
              type: integer
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: Machine-readable error code.
          example: NOT_FOUND
        message:
          type: string
          example: Resource not found
        data:
          description: Optional error detail.
  responses:
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: UNAUTHORIZED
            message: Invalid or missing API key
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: NOT_FOUND
            message: Resource not found
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Suby-Api-Key
      description: Secret API key. `sk_live_…` (production) or `sk_sandbox_…` (sandbox).

````