public

Create a checkout from a product (public)

Public (unauthenticated) checkout creation from a live, active product — the flow behind the "buy" button of product pages AND of charge pages (/c/{id}). For charges the amount is computed per visit (base + late fees for the current FIFO cycle — see ChargeState) and the settled cycle is stamped into metadata.charge_cycle. Optional body: payer metadata and payer_tax_number.

Errors on this operation are payer-scoped. The caller is an anonymous third party paying a merchant, so an error is only allowed to keep its response.errorMessage and its error.details when it describes the payer, the payer's input, or a fact about the thing being paid — which is every code documented below. Refusals that belong to the MERCHANT'S account (receive limits, onboarding gates, account configuration) answer a fixed neutral message ("Não foi possível gerar o pagamento. Fale com o vendedor.", or "…agora. Tente novamente em alguns minutos." for a 5xx) with error.details OMITTED. error.code is always the real one. Do not build a payer flow that reads error.details from a code not listed here: it is withheld by design, and the same call authenticated as the merchant (POST /api/checkouts) returns the full numbers.

post/api/products/{id}/checkout

Request

  • Base URL: https://api.depixapp.com
  • URL: https://api.depixapp.com/api/products/{id}/checkout
  • Auth: none required

Path parameters

idstring required

Product id (prd_*).

Request body

metadataobject

Extra metadata merged over the product's metadata (max 4KB combined).

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.

expected_discount_pctinteger

The DePix discount percentage the page showed the payer, 0–90. Send it on the depix rail to make a stale page fail loudly: if the merchant's current discount differs, the request is rejected with 409 discount_changed carrying the fresh values instead of charging a different price.

payer_tax_numberstring

CPF/CNPJ of the payer. Required on the pix rail — omitting it returns 400 tax_number_required. Ignored on the depix rail.

Response

Checkout created.

idstring required

Checkout id (chk_*).

amountinteger required

Charge amount in cents — the product price or, for charges (kind='charge'), the day's computed total (see charge).

descriptionstring nullable required

Product description carried onto the checkout.

expires_atstring required

Expiry timestamp (RFC 3339 UTC).

is_liveboolean required

Always true — only live products accept public checkouts.

payment_urlstring required

Hosted checkout page URL.

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.

Changes

No recorded changes to this operation across all 1 revision of this API.