# PaymentIntentManager (https://dev.cosmospay.lat/docs/sdk/definitions/server/payment-intent-manager/)

> Manages Stellar payment intents — client.paymentIntents. Reference for the PaymentIntentManager class of @cosmosapp/pay_sdk: its members and their signatures.

Manages Stellar payment intents — `client.paymentIntents`.

## Methods

### createTx()

Create a SEP-7 `tx` intent (source known → unsigned XDR + tx URI + QR).

```ts
createTx(options: CreateTxPaymentIntentOptions): Promise<PaymentIntent>
```

**Parameters**

- `options`: `CreateTxPaymentIntentOptions`

**Returns** [`Promise<PaymentIntent>`](https://dev.cosmospay.lat/docs/sdk/definitions/server/payment-intent/)

### createPay()

Create a `pay` intent (no source → a payment link + QR, no XDR): SEP-7 on Stellar (the default), Solana Pay with `chain: 'solana'`, EIP-681 with `chain: 'monad'`.

```ts
createPay(options: CreatePayPaymentIntentOptions): Promise<PaymentIntent>
```

**Parameters**

- `options`: `CreatePayPaymentIntentOptions`

**Returns** [`Promise<PaymentIntent>`](https://dev.cosmospay.lat/docs/sdk/definitions/server/payment-intent/)

### fetch()

Get a single payment intent by id.

```ts
fetch(id: string): Promise<PaymentIntent>
```

**Parameters**

- `id`: `string`

**Returns** [`Promise<PaymentIntent>`](https://dev.cosmospay.lat/docs/sdk/definitions/server/payment-intent/)

### transitions()

Every status change an intent went through, oldest first — who moved it (`api`, `validate`, `observer`, `system`), when, and with which transaction.

```ts
transitions(id: string): Promise<PaymentIntentTransitionData[]>
```

**Parameters**

- `id`: `string`

**Returns** `Promise<PaymentIntentTransitionData[]>`

### list()

List the consumer's payment intents (paginated).

```ts
list(options?: ListPaymentIntentsOptions): Promise<PaymentIntentPage>
```

**Parameters**

- `options` _(optional)_: `ListPaymentIntentsOptions`

**Returns** `Promise<PaymentIntentPage>`

### update()

Update a payment intent (status / txHash / reference).

```ts
update(id: string, options: UpdatePaymentIntentOptions): Promise<PaymentIntent>
```

**Parameters**

- `id`: `string`
- `options`: `UpdatePaymentIntentOptions`

**Returns** [`Promise<PaymentIntent>`](https://dev.cosmospay.lat/docs/sdk/definitions/server/payment-intent/)

### delete()

Delete a payment intent.

```ts
delete(id: string): Promise<DeletedData>
```

**Parameters**

- `id`: `string`

**Returns** `Promise<DeletedData>`

### validate()

Validate a submitted transaction against the intent (tx success + destination + amount + memo). Finalizes status server-side and fires events.

```ts
validate(id: string, options: ValidatePaymentIntentOptions): Promise<ValidationOutcome>
```

**Parameters**

- `id`: `string`
- `options`: `ValidatePaymentIntentOptions`

**Returns** `Promise<ValidationOutcome>`

## Related

- [PaymentIntent](https://dev.cosmospay.lat/docs/sdk/definitions/server/payment-intent/)
- [BaseManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/base-manager/)
