Transactions: Persona's API-first object for KYB and other
server-side checks. You create a transaction of a transaction type
configured in the dashboard (e.g. a KYB type), with the business and
its associated people in fields; Persona workflows then run the
business reports, verify owners and open a case, and move the
transaction's status (by default created, approved, declined,
needs_review, errored; statuses are configurable per type).
Functions
create-transaction
fn (transaction-type-id: Str, fields: Map): Map
fn (transaction-type-id: Str, fields: Map, opts: Map): Map
fn (transaction-type-id: Str, fields: Map, opts: Map, options: Map): Map
POST /transactions - Create a transaction of type transaction-type-id
(txntp_...). fields holds the inputs configured on the type, e.g.
for KYB {business_name, business_tax_identification_number, business_registered_address: {street_1, city, subdivision, postal_code, country_code}, associated_people: [...]}. opts: reference-id,
tags. In sandbox, fields.debug: "passed" | "failed" forces the
outcome.
Example
txn ::persona::transactions/create-transaction("txntp_...", {
business_name: "Acme Robotics LLC",
business_registered_address: {street_1: "1 Main St", city: "Austin", subdivision: "TX", postal_code: "78701", country_code: "US"}
}, {reference-id: "biz-42"}, {idempotency-key: "biz-42-kyb"})
get-transaction
fn (transaction-id: Str): Map
fn (transaction-id: Str, opts: Map): Map
fn (transaction-id: Str, opts: Map, options: Map): Map
GET /transactions/{id} - Retrieve a transaction. opts takes include (e.g. ["related-objects"]) and fields.
is-done
fn (doc: Any): Bool
True when a transaction left created/pending: Persona's workflows have set a decision or an error.
label-transaction
fn (transaction-id: Str, label: Str): Map
fn (transaction-id: Str, label: Str, opts: Map): Map
fn (transaction-id: Str, label: Str, opts: Map, options: Map): Map
POST /transactions/{id}/label - Record a label (e.g. "fraud", "legitimate"), with optional score and model-version in opts.
list-transactions
fn (filters: Map): Map
fn (filters: Map, opts: Map): Map
fn (filters: Map, opts: Map, options: Map): Map
GET /transactions - One page of transactions. Filters: reference-id, transaction-type-id. opts takes page-size, after, before.
redact-transaction
fn (transaction-id: Str): Map
fn (transaction-id: Str, options: Map): Map
DELETE /transactions/{id} - Permanently remove a transaction's PII.
update-transaction
fn (transaction-id: Str, attributes: Map): Map
fn (transaction-id: Str, attributes: Map, options: Map): Map
PATCH /transactions/{id} - Update fields, status (one configured on the type), reference-id or tags. Send field and status changes one after another, not in parallel (Persona returns 409).