---
title: "Public checkout data"
method: GET
path: "/api/pay/{id}"
tags: ["public"]
---

# Public checkout data

`GET /api/pay/{id}`

## Request

- Base URL: `https://api.depixapp.com`
- URL: `https://api.depixapp.com/api/pay/{id}`
- Auth: none required

Public (unauthenticated) checkout read — what the hosted checkout page polls. Terminal statuses are cached for 60 s. The payment payload (`pix` or `depix`, per `payment_method`) is present only while pending. On the depix rail, `depix.detected` flips to true as soon as a matching payment is seen on the network — the status still only moves at the first confirmation.

## Path parameters

- `id` string, required

## Response `200`

Public checkout state.

- PayCheckoutResponse: Public checkout data (no auth) — poll it to track payment from the payer side.
  - `id` string, required: Checkout id (chk_*).
  - `status` union, required: Checkout lifecycle status — the enum below is the complete, closed set. `completed` is the terminal SUCCESS state. Terminal states (safe to stop polling): completed, expired, cancelled.
    - 'pending': Awaiting payment; the PIX QR is active until expires_at.
    - 'processing': PIX paid; settlement in progress.
    - 'approved': Payment approved by the provider; DePix on the way to the merchant.
    - 'completed': TERMINAL — success: DePix delivered to the merchant.
    - 'expired': TERMINAL — QR expired unpaid.
    - 'cancelled': TERMINAL — cancelled upstream by the provider (refund/error).
  - `amount` integer, required: Charge amount in cents.
  - `currency` 'BRL', required: Always BRL.
  - `description` string, nullable, required: Checkout description.
  - `image_url` string, nullable, required: Checkout image URL.
  - `merchant_name` string, required: Merchant display name.
  - `merchant_username` string, required: Legacy alias of merchant_slug (kept for integrators; read merchant_slug instead).
  - `merchant_slug` string, required: Merchant public URL slug.
  - `remaining_seconds` integer, required: Seconds until expiry (0 when expired or not pending). On the depix rail a payment broadcast in the last seconds still settles: the checkout only turns `expired` 15 minutes after `expires_at`, so keep polling while remaining_seconds is 0 and the status is still `pending`.
  - `expires_at` string, nullable, required: Expiry timestamp (RFC 3339 UTC).
  - `redirect_url` string, nullable, required: Post-payment redirect URL.
  - `is_test` boolean, required: True for sandbox checkouts (non-payable placeholder payload).
  - `payment_method` 'pix' | 'depix': Which rail settles the checkout. `pix` (default): the payer pays a PIX QR and the provider delivers DePix to the merchant. `depix`: the payer sends DePix wallet-to-wallet on Liquid to an address dedicated to this merchant, and settlement is observed on-chain — no PIX QR exists on this rail.
  - `pix` object: PIX payment payload — present on the pix rail only, while status is "pending".
    - `qr_code` string, required: PIX copy-and-paste (BR Code) payload.
  - `depix` DepixPayment: Payment instructions for the depix rail — present only on checkouts created with payment_method=depix, and only while the checkout can still be paid. The payer must send EXACTLY `amount_cents` of the DePix asset to `address`: attribution is by exact amount, so any other value stays unattributed and cannot be credited automatically. An on-chain payment is irreversible.
    - `address` string, required: Confidential Liquid address (lq1…) dedicated to this merchant's direct DePix receipts. In sandbox it is a non-payable placeholder — never send funds to it.
    - `amount_cents` integer, required: EXACT amount to send, in cents. It is the face amount minus the merchant's discount and minus a per-checkout cents adjustment (at most 99 cents, always DOWNWARDS) that makes the value unique among the merchant's open checkouts — that uniqueness is how an incoming payment is matched to this checkout.
    - `amount` string, required: The same amount as the decimal string a wallet signs (e.g. "89.97"). Display and transmit this value verbatim; never round it.
    - `asset_id` string, required: Liquid asset id of DePix. Sending any other asset to this address loses the funds — they cannot be returned.
    - `uri` string, nullable, required: BIP21-style Liquid payment URI carrying address, amount, asset and this checkout's id (`liquidnetwork:<address>?amount=<amount>&assetid=<asset_id>&depixid=<checkout_id>`) — hand it to a wallet instead of asking the payer to type anything. Any BIP21 wallet ignores `depixid` (it is deliberately not `req-`-prefixed, which would make a wallet reject the whole URI); the DePix App uses it to re-read this checkout and confirm the address and status before offering to pay, so a URI written by someone else is refused rather than paid. The URI never carries a store name: a name in the URI is a name in the payer's clipboard, which anyone can write. Null in sandbox, which has no payable destination, and null on a checkout that is no longer payable (see the `depix` field on CheckoutDetail): the rest of the object is then a settlement record, not an instruction.
    - `discount_pct` integer, required: Merchant discount applied on this rail, 0–90 (0 when the merchant offers none).
    - `original_amount_cents` integer, required: Face amount in cents before discount and uniqueness adjustment — the same value as the checkout's `amount`.
    - `detected` boolean, required: True once a matching payment has been SEEN on the network but not yet confirmed. Informational only: the status stays `pending` and no webhook fires until the first confirmation.

## Other responses

- `404`: Checkout not found — includes rows owned by another account (ownership is never disclosed).
- `429`: Rate limited (per-IP, per-key or per-merchant window). Retry after `retry_after` seconds (also in the Retry-After header).

---

[API](https://skmtc.dev/depixapp/apis/depix-api.md) · [All operations](https://skmtc.dev/depixapp/apis/depix-api/llms.txt) · [OpenAPI document](https://skmtc.dev/depixapp/apis/depix-api/revisions/04094536dd0f?raw)
