# Digital Wallet Token Requests
> A Digital Wallet Token Request is created each time a digital wallet app, such as Apple Pay or Google Pay, requests to tokenize a Card.

## The Digital Wallet Token Request object
### Example
```json
{
  "card_id": "card_oubs0hwk5rn6knuecxg2",
  "created_at": "2020-01-31T23:59:59Z",
  "declined": null,
  "device": {
    "device_type": "mobile_phone",
    "identifier": "04393EADF4149002225811273840459271E36516DA4875FF",
    "ip_address": "1.2.3.4",
    "name": "My Work Phone"
  },
  "id": "digital_wallet_token_request_dlsq0yabf7ev4xvke6ek",
  "outcome": "provisioned",
  "provisioned": {
    "digital_wallet_token_id": "digital_wallet_token_izi62go3h51p369jrie0"
  },
  "token_reference_identifier": "DNITHE000000000000000000000",
  "token_requestor": "apple_pay",
  "type": "digital_wallet_token_request"
}
```
### Attributes
- `card_id` (string)
  The identifier of the Card the tokenization was requested for.

- `created_at` (string)
  The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Digital Wallet Token Request was created.

- `declined` (dictionary, nullable)
  Details of the decline. Present if and only if `outcome` is `declined`.

  - `declined.reason` (enum)
    The reason the tokenization was declined.
    Cases:
    * `card_not_active` (The card is not active.)
    * `no_verification_method` (The card does not have a two-factor authentication method.)
    * `webhook_timed_out` (Your webhook timed out when evaluating the token provisioning attempt.)
    * `webhook_declined` (Your webhook declined the token provisioning attempt.)
    * `incorrect_card_verification_code` (The tokenization attempt failed because the Card Verification Code (CVC) was incorrect.)
    * `declined_by_token_requestor` (The tokenization attempt was declined by the token requestor.)
    * `group_locked` (The group was locked.)
    * `account_closed` (The account has been closed.)
    * `entity_not_active` (The account's entity was not active.)

- `device` (dictionary)
  The device that requested the tokenization.

  - `device.device_type` (enum, nullable)
    Device type.
    Cases:
    * `unknown` (Unknown)
    * `mobile_phone` (Mobile Phone)
    * `tablet` (Tablet)
    * `watch` (Watch)
    * `mobilephone_or_tablet` (Mobile Phone or Tablet)
    * `pc` (PC)
    * `household_device` (Household Device)
    * `wearable_device` (Wearable Device)
    * `automobile_device` (Automobile Device)

  - `device.identifier` (string, nullable)
    ID assigned to the device by the digital wallet provider.

  - `device.ip_address` (string, nullable)
    IP address of the device.

  - `device.name` (string, nullable)
    Name of the device, for example "My Work Phone".

- `id` (string)
  The Digital Wallet Token Request identifier.

- `outcome` (enum)
  The outcome of the tokenization request.
  Cases:
  * `provisioned` (The tokenization request was approved and a Digital Wallet Token was provisioned.)
  * `declined` (The tokenization request was declined.)

- `provisioned` (dictionary, nullable)
  Details of the provisioned Digital Wallet Token. Present if and only if `outcome` is `provisioned`.

  - `provisioned.digital_wallet_token_id` (string)
    The identifier of the Digital Wallet Token that was provisioned.

- `token_reference_identifier` (string)
  The reference identifier assigned by the card network to the token.

- `token_requestor` (enum)
  The digital wallet app being used.
  Cases:
  * `apple_pay` (Apple Pay)
  * `google_pay` (Google Pay)
  * `samsung_pay` (Samsung Pay)
  * `garmin_pay` (Garmin Pay)
  * `unknown` (Unknown)

- `type` (string)
  A constant representing the object's type. For this resource it will always be `digital_wallet_token_request`.

## List Digital Wallet Token Requests
GET /digital_wallet_token_requests

### Example
```curl
curl \
  --url "${INCREASE_URL}/digital_wallet_token_requests?card_id=card_oubs0hwk5rn6knuecxg2" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```

### Query Parameters
- `cursor` (string, optional)
  Return the page of entries after this one.

- `limit` (integer, optional)
  Limit the size of the list that is returned. The default (and maximum) is 100 objects.
  Default: `100`

- `card_id` (string, optional)
  Filter Digital Wallet Token Requests to ones for the specified Card.

- `created_at.after` (string, optional)
  Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

- `created_at.before` (string, optional)
  Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

- `created_at.on_or_after` (string, optional)
  Return results on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

- `created_at.on_or_before` (string, optional)
  Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

### Returns a Digital Wallet Token Request List object:
```json
{
  "data": [
    {
      "card_id": "card_oubs0hwk5rn6knuecxg2",
      "created_at": "2020-01-31T23:59:59Z",
      "declined": null,
      "device": {
        "device_type": "mobile_phone",
        "identifier": "04393EADF4149002225811273840459271E36516DA4875FF",
        "ip_address": "1.2.3.4",
        "name": "My Work Phone"
      },
      "id": "digital_wallet_token_request_dlsq0yabf7ev4xvke6ek",
      "outcome": "provisioned",
      "provisioned": {
        "digital_wallet_token_id": "digital_wallet_token_izi62go3h51p369jrie0"
      },
      "token_reference_identifier": "DNITHE000000000000000000000",
      "token_requestor": "apple_pay",
      "type": "digital_wallet_token_request"
    }
  ],
  "next_cursor": "v57w5d"
}
```

## Retrieve a Digital Wallet Token Request
GET /digital_wallet_token_requests/{digital_wallet_token_request_id}

### Example
```curl
curl \
  --url "${INCREASE_URL}/digital_wallet_token_requests/digital_wallet_token_request_dlsq0yabf7ev4xvke6ek" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `digital_wallet_token_request_id` (string, required)
  The identifier of the Digital Wallet Token Request.