# prov.authorize.network.cancel

prov.authorize.network.cancel in Node SDK. Store side: a cancelled or refunded order gives the budget back.

## Signature

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

## Parameters

- `intentToken` (string)

## Returns

`Promise<{ object: "network_cancellation"; id: string; status: "cancelled"; amount: number; currency: string }>`

## HTTP operation

[`POST /v1/authorize/network_orders/cancel`](https://provenanceauth.com/docs/api/network.md#post-v1-authorize-network-orders-cancel): Cancel a network order

## Errors

- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`network_order_closed`](https://provenanceauth.com/docs/platform/errors.md#network_order_closed)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

## Example

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/network_orders/cancel`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "intent_token": "eyJhbGciOiJFUzI1NiJ9.eyJuZXR3b3JrIjp0cnVlfQ.sig" }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/authorize/network_orders/cancel", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "intent_token": "eyJhbGciOiJFUzI1NiJ9.eyJuZXR3b3JrIjp0cnVlfQ.sig"
}).json()
```
