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

> ## Agent Instructions
> Taberna is a crypto payments API. Amounts are priced in fiat (USD or EUR) and paid in crypto.
> Fiat amounts are ALWAYS decimal strings ("9.99"), never numbers. Crypto amounts are integer strings in the asset's smallest unit.
> Authenticate merchant endpoints with `Authorization: Bearer tbrn_live_...`. Every key is bound to one store and carries an explicit scope set, so never pass a store id to a /v1 endpoint.
> A 401 means the credential is bad; a 403 means the key lacks a scope. Never retry or re-authenticate on a 403 — surface it as a configuration error.
> The /v1/checkouts endpoints are deliberately unauthenticated and run in the buyer's browser. Never send an API key to a browser.
> Verify webhook signatures over the RAW request body before parsing JSON, and treat delivery as at-least-once: handlers must be idempotent.
> Never grant value based on a browser redirect to successUrl. Fulfil on a signature-verified webhook, or on a server-side read of GET /v1/orders/{id} or GET /v1/invoices/{id}.
> There is no test mode: every payment method is a live chain moving real funds.

# Get a delivery download link

> Mints a short-lived presigned URL for a file delivered with a completed order item.

Every failure — unknown checkout, order not completed, wrong item, a delivery that is not a file, an invoice id — answers with the same 404 and the same message, so the endpoint never reveals which check failed.

Unauthenticated: possession of the checkout id is the credential, so send no API key. The id is unguessable and every payload is redacted for a buyer audience.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/checkouts/{id}/download/{orderItemId}
openapi: 3.1.0
info:
  title: Taberna API
  description: >-
    Accept crypto payments for digital goods. Create orders and invoices, hand
    the buyer a hosted checkout link, and let webhooks tell you when the money
    lands.


    Authenticate merchant endpoints with a store API key as a bearer token
    (`Authorization: Bearer tbrn_live_…`). Every key is bound to one store and
    carries an explicit set of scopes; the scope a route requires is stated in
    its description and in the `x-required-scope` extension. A key without the
    scope gets a 403 — mint one with the scope rather than retrying.


    The Checkout endpoints are the exception: they are unauthenticated and meant
    to be called from the buyer's browser. Possession of the checkout id is the
    credential there, so never ship an API key to a page.


    Conventions: ids in links are short ids; fiat amounts are decimal strings
    ("9.99"); crypto amounts are integer strings in the asset's smallest unit;
    timestamps are ISO-8601 UTC. Errors carry `{ "error": "…" }` unless
    documented otherwise.
  version: 1.0.0
servers:
  - url: https://api.taberna.io
    description: Taberna API
security: []
tags:
  - name: Orders
    description: Carts of products, paid through a hosted checkout.
  - name: Invoices
    description: Merchant-issued bills with their own payment page.
  - name: Invoice Templates
    description: Saved invoice presets, referenced by `templateId` when creating one.
  - name: Products
    description: Catalogue reads and delivery stock top-ups.
  - name: Store
    description: What the calling API key is and what it may do.
  - name: Webhook Deliveries
    description: Delivery history for the store webhook, and replay.
  - name: Checkout
    description: >-
      Buyer-facing hosted-page endpoints. Unauthenticated by design — never send
      an API key.
paths:
  /v1/checkouts/{id}/download/{orderItemId}:
    get:
      tags:
        - Checkout
      summary: Get a delivery download link
      description: >-
        Mints a short-lived presigned URL for a file delivered with a completed
        order item.


        Every failure — unknown checkout, order not completed, wrong item, a
        delivery that is not a file, an invoice id — answers with the same 404
        and the same message, so the endpoint never reveals which check failed.


        Unauthenticated: possession of the checkout id is the credential, so
        send no API key. The id is unguessable and every payload is redacted for
        a buyer audience.
      operationId: getV1CheckoutsByIdDownloadByOrderItemId
      parameters:
        - in: path
          name: id
          schema:
            type: string
            pattern: ^[1-9A-HJ-NP-Za-km-z]{21,22}$
          required: true
        - in: path
          name: orderItemId
          schema:
            type: string
            pattern: ^[1-9A-HJ-NP-Za-km-z]{21,22}$
          required: true
      responses:
        '200':
          description: A presigned download URL, valid for `expiresIn` seconds.
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                  fileName:
                    type: string
                  expiresIn:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: Link lifetime in seconds.
                required:
                  - url
                  - fileName
                  - expiresIn
        '400':
          description: The request failed validation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: Error response.
        '404':
          description: The download is not available.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: Error response.
      security: []

````