Payments

Create Public Payment

Create a payment on behalf of a guest (unauthenticated) customer.

The caller must supply the project's public_key matching project.data.config.payment_widget.public_payment_key. Only intent=sale is allowed; the destination wallet and recipient_project_id are taken from the project's payment_widget config — the caller cannot override them.

Returns the same shape as POST /api/payments/: { payment_id, client_secret } (Stripe) or { payment_id, payment_url } (Tochka).

post/api/payments/public

Request

  • Base URL: https://api.agentstack.tech (the document declares no server; this is the origin it was published from)
  • URL: https://api.agentstack.tech/api/payments/public
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer

Headers

Idempotency-Keystring

Client-generated key to make mutating requests idempotent.

Request body

project_idinteger required

Project to pay

public_keystring required

Must match project.data.config.payment_widget.public_payment_key

amountnumber required

Payment amount in major units

currencystring

ISO currency code

descriptionstring

Description shown to the payer

countrystring nullable

ISO country for provider matrix

preferred_methodstring nullable

card | stripe | tochka

success_urlstring nullable

Redirect URL on success (Tochka)

fail_urlstring nullable

Redirect URL on failure (Tochka)

base_urlstring nullable

Deployment base URL to derive notification_url

use_project_keysboolean nullable

If true and project has use_project_keys in widget, use BYOK keys (same rules as POST /payments)

Response

Successful Response

unknown required

Changes

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