# Recover an existing checkout link

Source: https://ethicsportal.eu/developers/api/operations/getcheckoutlink/

GET

/organizations/{organization\_id}/subscriptions/checkout.json

```
const url = 'https://secure.ethicsportal.eu/organizations/example/subscriptions/checkout.json?interval=month';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```
curl --request GET \
  --url 'https://secure.ethicsportal.eu/organizations/example/subscriptions/checkout.json?interval=month' \
  --header 'Authorization: Bearer <token>'
```

* EthicsPortal application

Read Stripe to find an open, unexpired subscription checkout for this organisation and the selected current plan. This works after reconnecting or switching assistants, including sessions created before this tool existed. Does not create a session or charge anything. Requires billing:write because the returned link grants access to the checkout. A personal token also needs its user to be a current administrator. A null checkout means there is no reusable link; check billing status before creating one. Provider failures are errors, never treated as an absent checkout.

## Authorizations

* **[personalToken](https://ethicsportal.eu/developers/api/#personaltoken)**  
billing:write
* **[organizationToken](https://ethicsportal.eu/developers/api/#organizationtoken)**  
billing:write

## Parameters

### Path Parameters

**organization\_id**

required

string

Obfuscated organisation ID returned by identity.

### Query Parameters

**interval**

required

string

Allowed values: month year

The plan to resume.

## Responses

### 200

The current checkout link, or null when no matching open unexpired session exists or the organisation is already subscribed.

application/json

object

**checkout**

required

Any of:

* [object](https://ethicsportal.eu/developers/api/operations/getcheckoutlink/#tab-panel-0-0)
* [null](https://ethicsportal.eu/developers/api/operations/getcheckoutlink/#tab-panel-0-1)

object

**url**

required

Stripe-hosted page. Give it to the person who pays or manages billing; it works for whoever holds it until it expires.

string format: uri

**expires\_at**

required

When the link stops working. Null for billing portal links, which expire shortly after creation; create one just before use.

string | null format: date-time

null

#### Example 

```
{
  "checkout": {
    "url": "https://checkout.stripe.com/c/pay/cs_live_example",
    "expires_at": "2026-11-22T12:00:00Z"
  }
}
```

### 400

Invalid body

application/json

object

**error**

required

object

**code**

required

string

Allowed values: invalid\_token forbidden insufficient\_scope not\_found invalid\_request agreement\_required rate\_limited temporarily\_unavailable idempotency\_key\_reused idempotency\_key\_in\_progress not\_retryable channel\_inactive invitation\_unavailable already\_subscribed no\_subscription

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "invalid_request",
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```

### 401

Missing, unknown, expired or revoked token

application/json

object

**error**

required

object

**code**

required

string

Allowed values: invalid\_token forbidden insufficient\_scope not\_found invalid\_request agreement\_required rate\_limited temporarily\_unavailable idempotency\_key\_reused idempotency\_key\_in\_progress not\_retryable channel\_inactive invitation\_unavailable already\_subscribed no\_subscription

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "invalid_token",
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```

### 403

The token lacks the required scope (WWW-Authenticate names it), the user’s role does not allow the action, or an agreement must be accepted in the web application

application/json

object

**error**

required

object

**code**

required

string

Allowed values: invalid\_token forbidden insufficient\_scope not\_found invalid\_request agreement\_required rate\_limited temporarily\_unavailable idempotency\_key\_reused idempotency\_key\_in\_progress not\_retryable channel\_inactive invitation\_unavailable already\_subscribed no\_subscription

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "insufficient_scope",
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```

### 404

Organisation missing or inaccessible, API access suspended, or billing not configured

application/json

object

**error**

required

object

**code**

required

string

Allowed values: invalid\_token forbidden insufficient\_scope not\_found invalid\_request agreement\_required rate\_limited temporarily\_unavailable idempotency\_key\_reused idempotency\_key\_in\_progress not\_retryable channel\_inactive invitation\_unavailable already\_subscribed no\_subscription

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "not_found",
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```

### 422

Unknown interval

application/json

object

**error**

required

object

**code**

required

Allowed value: validation\_failed

**fields**

required

Array<string>

\>= 1 items unique items

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "validation_failed",
    "fields": [
      "interval"
    ],
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```

### 429

Rate limited; retry after the Retry-After interval

application/json

object

**error**

required

object

**code**

required

string

Allowed values: invalid\_token forbidden insufficient\_scope not\_found invalid\_request agreement\_required rate\_limited temporarily\_unavailable idempotency\_key\_reused idempotency\_key\_in\_progress not\_retryable channel\_inactive invitation\_unavailable already\_subscribed no\_subscription

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "rate_limited",
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```

### 503

Stripe could not be reached. Retry the lookup; do not infer that no checkout exists.

application/json

object

**error**

required

object

**code**

required

string

Allowed values: invalid\_token forbidden insufficient\_scope not\_found invalid\_request agreement\_required rate\_limited temporarily\_unavailable idempotency\_key\_reused idempotency\_key\_in\_progress not\_retryable channel\_inactive invitation\_unavailable already\_subscribed no\_subscription

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "temporarily_unavailable",
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```
