# net.wireservice.payment

> Published by [wireservice.net](https://lexicon.garden/identity/did:plc:lktj64hp7lc3fzuf6iyy7lwj)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:lktj64hp7lc3fzuf6iyy7lwj/net.wireservice.payment)
- [Documentation](https://lexicon.garden/lexicon/did:plc:lktj64hp7lc3fzuf6iyy7lwj/net.wireservice.payment/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:lktj64hp7lc3fzuf6iyy7lwj/net.wireservice.payment/examples)

## Definitions

### `net.wireservice.payment`

**Type**: `record`

A single payment or donation, stored in the publication's business space.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `amount` | `integer` | Yes | Amount in the currency's minor unit (e.g., cents). |
| `currency` | `string` | Yes | ISO 4217 currency code, lowercase (e.g., 'usd'). |
| `paidAt` | `string` (datetime) | Yes |  |
| `plan` | `string` (at-uri) | No |  |
| `reader` | `string` (uri) | Yes | URI of the net.wireservice.reader record. |
| `status` | `string` | Yes |  |
| `stripeId` | `string` | No | Stripe invoice or payment intent id. |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A single payment or donation, stored in the publication's business space.",
      "key": "tid",
      "record": {
        "properties": {
          "amount": {
            "description": "Amount in the currency's minor unit (e.g., cents).",
            "minimum": 0,
            "type": "integer"
          },
          "currency": {
            "description": "ISO 4217 currency code, lowercase (e.g., 'usd').",
            "maxLength": 3,
            "type": "string"
          },
          "paidAt": {
            "format": "datetime",
            "type": "string"
          },
          "plan": {
            "format": "at-uri",
            "type": "string"
          },
          "reader": {
            "description": "URI of the net.wireservice.reader record.",
            "format": "uri",
            "type": "string"
          },
          "status": {
            "knownValues": [
              "succeeded",
              "refunded"
            ],
            "maxLength": 64,
            "type": "string"
          },
          "stripeId": {
            "description": "Stripe invoice or payment intent id.",
            "maxLength": 256,
            "type": "string"
          }
        },
        "required": [
          "reader",
          "amount",
          "currency",
          "status",
          "paidAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "net.wireservice.payment",
  "lexicon": 1
}
```
