App Endpoints

Blocks, files, email, and storage for installed apps.

Endpoints for installed apps. They require an app access token (pat_test_… / pat_live_…) from the POST /oauth/token exchange described in the Building apps guide — a merchant API key is refused with 403 and code app_required. Blocks and app data need no scope (the write is already bounded by the app’s own install); files needs files:write and emails needs emails:send.

These are the only endpoints in the reference with no Try it button. The playground signs requests with one of this workspace’s API keys, and no API key can call them — run them from your app with a token from the exchange instead.

Attach a block

Attach (or replace) a block on an object. Paysio renders it with its own components wherever that object is shown: a transaction block reaches the buyer (confirmation page, customer portal, receipt email) and the merchant (the transaction page in the dashboard); customer and subscription blocks reach the merchant on that record's page. Upserts on (app install, object, block type): re-posting the same type for the same object corrects the block instead of adding a second one, so retrying webhook handlers are safe.

POSThttps://paysio.com/api/v1/blocks

Authorizations

Authorizationstringheaderrequired

App access token (pat_) only. Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

Body

object_typestringrequired

"transaction", "customer" or "subscription"

object_idstringrequired

Must belong to the merchant workspace (404 otherwise)

typestringrequired

"details", "download", "status" or "link"

payloadobjectrequired

Block content. details/download: { title, description?, items: [{ label, value?, url?, copyable?, expires_at? }] }. status: { title, status, description?, items? }. link: { url, label, title?, description? }. Text is plain text; urls must be https or mailto

positioninteger

Sort order 0-999 (default 0)

List blocks

List this app's own blocks on one object. An app only ever sees the blocks it attached itself.

GEThttps://paysio.com/api/v1/blocks

Authorizations

Authorizationstringheaderrequired

App access token (pat_) only. Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

Query parameters

object_typestring

Required. "transaction", "customer" or "subscription"

object_idstring

Required. The object to inspect

Remove a block

Remove one of this app's blocks. Scoped to the install, so an app can only ever delete its own.

DELETEhttps://paysio.com/api/v1/blocks/:id

Authorizations

Authorizationstringheaderrequired

App access token (pat_) only. Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

Upload a file

Upload a file (multipart form, field name 'file') to hand to a buyer — a licence key text file, a receipt PDF, a small image. Max 10 MB. Allowed types: application/pdf, image/png, image/jpeg, image/gif, image/webp, text/plain, text/csv, application/json, application/zip (no HTML or SVG — those could run script on the CDN origin). The returned id is the storage key and the url is public and immutable. There is no list endpoint — keep the returned ids in your own storage. Requires the files:write scope.

POSThttps://paysio.com/api/v1/files

Authorizations

Authorizationstringheaderrequired

App access token (pat_) only. Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

Body

filefilerequired

The file to upload (multipart form field)

Delete a file

Delete an uploaded file. :id is the storage key returned at upload — it is path-shaped, so append it verbatim after /files/. 404 for any key outside this app's own prefix. Requires the files:write scope.

DELETEhttps://paysio.com/api/v1/files/:id

Authorizations

Authorizationstringheaderrequired

App access token (pat_) only. Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

Send an email

Send an email to one of the merchant's customers, as the merchant. The sender address is resolved from the workspace (and its white-label brand) exactly as campaigns and invoices resolve it — it is never a parameter — and the recipient must already be a customer of the workspace, so an app can reach the merchant's customers and nobody else. Rate limited to 500 sends per app install per hour (429 beyond that). The body is plain text rendered into a branded shell; paragraphs split on blank lines. Test-mode sends succeed but are never delivered (delivered: false with a note). Requires the emails:send scope.

POSThttps://paysio.com/api/v1/emails

Authorizations

Authorizationstringheaderrequired

App access token (pat_) only. Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

Body

customer_idstring

The customer to email (preferred). One of customer_id / to is required

tostring

Alternative: a raw address, which must match an existing customer of the workspace (403 with code "recipient_not_allowed" otherwise)

subjectstringrequired

Max 200 chars

bodystringrequired

Plain text, max 100,000 chars

headingstring

Optional heading shown in the email (defaults to the subject)

List stored keys

List this app's stored keys for the token's mode. Values are omitted — fetch a single key for its value. Storage is per install and per mode: a test token physically cannot read or write live rows, and rows are deleted 30 days after the app is uninstalled.

GEThttps://paysio.com/api/v1/app-data

Authorizations

Authorizationstringheaderrequired

App access token (pat_) only. Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

Retrieve a value

Retrieve one stored value. 404 when nothing is stored under the key.

GEThttps://paysio.com/api/v1/app-data/:key

Authorizations

Authorizationstringheaderrequired

App access token (pat_) only. Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

Store a value

Create or replace the value stored under a key. Keys are 1-128 characters of letters, digits and ._:- only; values are any JSON up to 64KB; an install can hold at most 500 keys per mode (400 with code 'limit_exceeded' beyond that). This is a settings/state store for zero-backend apps, not a database.

PUThttps://paysio.com/api/v1/app-data/:key

Authorizations

Authorizationstringheaderrequired

App access token (pat_) only. Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.

Body

valueany JSONrequired

The value to store, verbatim — returned as-is by GET

Delete a key

Delete a stored key. Idempotent — deleting a missing key succeeds with deleted: false.

DELETEhttps://paysio.com/api/v1/app-data/:key

Authorizations

Authorizationstringheaderrequired

App access token (pat_) only. Prepend your key with Bearer, e.g. Bearer sk_test_your_secret_key.