# network.attested.payment.initiate

> Published by [attested.network](https://lexicon.garden/identity/did:plc:cq3w3bw7awp2rkeswfdzoubb)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:cq3w3bw7awp2rkeswfdzoubb/network.attested.payment.initiate)
- [Documentation](https://lexicon.garden/lexicon/did:plc:cq3w3bw7awp2rkeswfdzoubb/network.attested.payment.initiate/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:cq3w3bw7awp2rkeswfdzoubb/network.attested.payment.initiate/examples)

## Definitions

### `network.attested.payment.initiate`

**Type**: `procedure`

Begin a payment flow. Called by the payer's client against the selected payment servicer using inter-service authentication. Returns an opaque token for status polling and a URL to direct the payer through the payment process in a browser.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `product` | `string` | Yes | Product identifier for the payment being initiated. The format is defined by the payment servicer. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `url` | `string` (uri) | Yes | URL to direct the payer to in a browser to complete the payment flow (entering payment details, confirming terms, etc). |
| `token` | `string` | Yes | Opaque token used to poll payment status via network.attested.payment.status. |

## Raw Schema

```json
{
  "id": "network.attested.payment.initiate",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "product"
          ],
          "properties": {
            "product": {
              "type": "string",
              "description": "Product identifier for the payment being initiated. The format is defined by the payment servicer."
            }
          }
        },
        "encoding": "application/json"
      },
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "token",
            "url"
          ],
          "properties": {
            "url": {
              "type": "string",
              "format": "uri",
              "description": "URL to direct the payer to in a browser to complete the payment flow (entering payment details, confirming terms, etc)."
            },
            "token": {
              "type": "string",
              "description": "Opaque token used to poll payment status via network.attested.payment.status."
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Begin a payment flow. Called by the payer's client against the selected payment servicer using inter-service authentication. Returns an opaque token for status polling and a URL to direct the payer through the payment process in a browser."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
