---
title: "Get a card authorization link"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.nicer.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a card authorization link

Path: Nicer API › Commerce

`GET /commerce/payment-methods/card-link`

URL: `https://api.nicer.travel/commerce/payment-methods/card-link`

Reads a live card authorization link before the card page shows consent: the exact statement the person accepts, when the link expires, and what completing it grants. Whoever holds the link may read it: its capability travels as `Authorization: PaymentLink <token>` or `X-Payment-Link-Token`, as on the completing route, and a signed-in caller changes nothing. Errors: 401 ERROR_AUTHENTICATION_REQUIRED without a capability; 404 COMMERCE_PAYMENT_METHOD_LINK_NOT_FOUND for a link that is missing, expired or revoked, or whose advisor is no longer an active advisor of the agency.

## Authentication

Requires one of the following:

- 
- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.commerce.paymentMethods.cardLink.list();
```

### Nicer CLI

```bash
nicer commerce payment-methods card-link list
```

### cURL

```bash
curl --request GET \
  --url https://api.nicer.travel/commerce/payment-methods/card-link
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/commerce/payment-methods/card-link';
const options = {method: 'GET'};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/commerce/payment-methods/card-link"

response = requests.get(url)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "consentCopy": "string",
  "expiresAt": "2019-08-24T14:15:22Z",
  "grantScopeKind": "USER"
}
```

- `consentCopy` (`commerce.paymentMethods.cardLink.list.response.200.consentCopy`; string, required) — The exact statement the person accepts; the same text is stored with the authorization.
  - minLength: `1`
- `expiresAt` (`commerce.paymentMethods.cardLink.list.response.200.expiresAt`; string, required) — When the link stops working.
  - format: `date-time` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$`
- `grantScopeKind` (`commerce.paymentMethods.cardLink.list.response.200.grantScopeKind`; string, required) — What completing the link grants. ADVISOR: the card to the advisor who made the link. USER: a personal card for the person who made it, who must be signed in. TRIP: the card to everyone working the link's trip (links made before advisor grants).
  - one of `"USER"`, `"TRIP"`, `"ADVISOR"`

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`commerce.paymentMethods.cardLink.list.response.400.errorCode`; string, required)
- `errorMessage` (`commerce.paymentMethods.cardLink.list.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`commerce.paymentMethods.cardLink.list.response.401.errorCode`; string, required)
- `errorMessage` (`commerce.paymentMethods.cardLink.list.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`commerce.paymentMethods.cardLink.list.response.403.errorCode`; string, required)
- `errorMessage` (`commerce.paymentMethods.cardLink.list.response.403.errorMessage`; string, required)

### 429

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`commerce.paymentMethods.cardLink.list.response.429.errorCode`; string, required)
- `errorMessage` (`commerce.paymentMethods.cardLink.list.response.429.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Commerce/commerce.paymentMethods.cardLink.list/index.md
