network.attested.payment.initiate
procedurenetwork.attestedShared protocol vocabulary
network.attested.* is defined upstream by attested.network. The drafts here are our proposed contributions; both brokers and point-of-sale services implement subsets of this namespace.
Broker-side checkout procedure. Creates a pending `network.attested.payment` record signed by the broker and returns a checkout URL plus a strongRef to the payment. Line item details are retained internally by the broker; they do not appear on the resulting record.
Input
| Name | Type | Required | Description |
|---|---|---|---|
| subject | string (did) | required | DID of the payment recipient. Required by the broker so it knows whom to pay; the resulting `network.attested.payment` record only carries `subject` if the issuer opts in to publishing it. |
| items | array<#oneTime | #recurring> | required | Line items being paid for. Each entry is discriminated by `$type` as `#oneTime` or `#recurring`. |
| redirectUrl | string (uri) | optional | URI the processor should redirect to after checkout completion or cancellation. |
Output
| Name | Type | Required | Description |
|---|---|---|---|
| payment | com.atproto.repo.strongRef | required | StrongRef to the newly created `network.attested.payment` record. |
| checkoutUrl | string (uri) | required | Processor-hosted checkout URL the payer should be redirected to. |
Type: oneTime
| Name | Type | Required | Description |
|---|---|---|---|
| description | string | required | |
| amount | integer | required | Line total in the smallest unit of `currency` (PoS-side quantity is already multiplied in).(min: 0) |
| currency | string | required | ISO 4217 currency code. |
Type: recurring
| Name | Type | Required | Description |
|---|---|---|---|
| description | string | required | |
| amount | integer | required | Per-period amount in the smallest unit of `currency`.(min: 0) |
| currency | string | required | ISO 4217 currency code. |
| interval | union | required | Billing cadence. Discriminated by `$type`: `#namedInterval` for the common cases (weekly / monthly / yearly), `#customInterval` for a custom number of days. |
| billingStartDate | string (datetime) | optional | First billing period. |
Type: namedInterval
| Name | Type | Required | Description |
|---|---|---|---|
| value | "weekly" | "monthly" | "yearly" | required |
Type: customInterval
| Name | Type | Required | Description |
|---|---|---|---|
| days | integer | required | Length of one billing period in days.(min: 1) |
Usage
This endpoint is part of the shared network.attested protocol vocabulary. Call it via a standard XrpcClient until @atiproto/agent exposes a dedicated namespace for it.