# prov.authorize.network

prov.authorize.network in the Node SDK: 13 methods. The authorize.network methods.

## Methods

### [requestGrant](https://provenanceauth.com/docs/sdks/node/authorize-network/request-grant.md)

```ts
prov.authorize.network.requestGrant(params: { agentId: string; proposed: NetworkConstraints; returnUrl?: string; /** #180: how far above your ask a person may raise (never below `proposed`); leave out for no ceiling. */ hardMax?: Partial<GrantHardMax>; /** #180: this grant's near-limit channels, overriding your setting. */ limitNoticeChannels?: Partial<LimitNoticeChannels>; }): Promise<NetworkGrantRequest>
```

Ask a person for a network mandate for one of your verified agents.

Calls `POST /v1/mandate/grant_requests`.

### [getGrant](https://provenanceauth.com/docs/sdks/node/authorize-network/get-grant.md)

```ts
prov.authorize.network.getGrant(id: string): Promise<NetworkGrant>
```

A network grant your agent holds, with its `version`.

Calls `GET /v1/mandate/network_grants/{id}`.

### [waitForGrantChange](https://provenanceauth.com/docs/sdks/node/authorize-network/wait-for-grant-change.md)

```ts
prov.authorize.network.waitForGrantChange(grantId: string, version: number, opts?: { timeoutMs?: number; minIntervalMs?: number; maxIntervalMs?: number; signal?: AbortSignal }): Promise<NetworkGrant | null>
```

Wait until the person changes the grant past `version` (after you showed them an `adjust` link), polling with backoff from 1 to 15 seconds.

### [getLimitNoticeSettings](https://provenanceauth.com/docs/sdks/node/authorize-network/get-limit-notice-settings.md)

```ts
prov.authorize.network.getLimitNoticeSettings(): Promise<LimitNoticeSettings>
```

The channels your agents' near-limit notices go on.

Calls `GET /v1/mandate/settings/limit_notices`.

### [setLimitNoticeSettings](https://provenanceauth.com/docs/sdks/node/authorize-network/set-limit-notice-settings.md)

```ts
prov.authorize.network.setLimitNoticeSettings(channels: Partial<LimitNoticeChannels>): Promise<LimitNoticeSettings>
```

Turn push, text or email on or off for near-limit notices (an admin key).

Calls `PUT /v1/mandate/settings/limit_notices`.

### [getGrantRequest](https://provenanceauth.com/docs/sdks/node/authorize-network/get-grant-request.md)

```ts
prov.authorize.network.getGrantRequest(id: string): Promise<NetworkGrantRequest>
```

The request, with `networkMandate` (the token) once granted.

Calls `GET /v1/mandate/grant_requests/{id}`.

### [createOrder](https://provenanceauth.com/docs/sdks/node/authorize-network/create-order.md)

```ts
prov.authorize.network.createOrder(params: { networkMandate: string; order: Record<string, unknown>; aud: string; approvalId?: string; paymentMethod?: NetworkOrderPaymentMethod; }): Promise<NetworkAuthorization>
```

Buy under a network mandate: a cart-bound intent token within the limits, else the person is asked.

Calls `POST /v1/mandate/network_orders`.

### [accept](https://provenanceauth.com/docs/sdks/node/authorize-network/accept.md)

```ts
prov.authorize.network.accept(intentToken: string): Promise<NetworkAcceptance>
```

Store side: accept the order online (the reservation becomes spend).

Calls `POST /v1/authorize/network_orders/confirm`.

### [cancel](https://provenanceauth.com/docs/sdks/node/authorize-network/cancel.md)

```ts
prov.authorize.network.cancel(intentToken: string): Promise<{ object: "network_cancellation"; id: string; status: "cancelled"; amount: number; currency: string }>
```

Store side: a cancelled or refunded order gives the budget back.

Calls `POST /v1/authorize/network_orders/cancel`.

### [report](https://provenanceauth.com/docs/sdks/node/authorize-network/report.md)

```ts
prov.authorize.network.report(params: { intentJti?: string; decisionId?: string; kind: NetworkReportKind; occurredAt: string; note?: string }): Promise<NetworkReport>
```

Report an order your account verified or accepted.

Calls `POST /v1/authorize/agent_reports`.

### [listReports](https://provenanceauth.com/docs/sdks/node/authorize-network/list-reports.md)

```ts
prov.authorize.network.listReports(params?: { limit?: number; startingAfter?: string }): Promise<{ object: "list"; data: NetworkReport[]; hasMore: boolean; nextCursor: string | null }>
```

The reports your account filed, with your notes.

Calls `GET /v1/authorize/agent_reports`.

### [withdrawReport](https://provenanceauth.com/docs/sdks/node/authorize-network/withdraw-report.md)

```ts
prov.authorize.network.withdrawReport(id: string): Promise<{ id: string; object: "network_report"; deleted: true; status: "withdrawn" }>
```

Withdraw a report within 30 days.

Calls `DELETE /v1/authorize/agent_reports/{id}`.

### [agentRecord](https://provenanceauth.com/docs/sdks/node/authorize-network/agent-record.md)

```ts
prov.authorize.network.agentRecord(agentId: string): Promise<{ object: "agent_record"; agentId: string; showRecord: boolean; networkSignals: NetworkSignals; weeks: { week: string; requests: number; accepted: number; reports: number }[]; reports: NetworkReport[]; }>
```

Agent makers: your agent's record as merchants see it, with the counts behind it by week.

Calls `GET /v1/mandate/agents/{id}/record`.
