# Create a test-mode authorization

Create a test-mode authorization.

## Request

```curl
curl https://api.stripe.com/v1/test_helpers/issuing/authorizations \
  -u "<<YOUR_SECRET_KEY>>" \
  -d amount=1000 \
  -d card={{CARD_ID}}
```

### Response

```json
{
  "id": "iauth_1DPc772eZvKYlo2C6avLyZ25",
  "object": "issuing.authorization",
  "amount": 1000,
  "amount_details": {
    "atm_fee": null,
    "cashback_amount": null
  },
  "approved": true,
  "authorization_method": "keyed_in",
  "balance_transactions": [],
  "card": "ic_1Nsse72eZvKYlo2CWBGm2WQ5",
  "cardholder": "ich_1Ccy6F2eZvKYlo2ClnIm9bs4",
  "created": 1540586461,
  "currency": "usd",
  "livemode": false,
  "merchant_amount": 0,
  "merchant_currency": "usd",
  "merchant_data": {
    "category": "taxicabs_limousines",
    "category_code": "4121",
    "city": "San Francisco",
    "country": "US",
    "name": "Rocket Rides",
    "network_id": "1234567890",
    "postal_code": "94107",
    "state": "CA",
    "terminal_id": null
  },
  "metadata": {},
  "network_data": null,
  "pending_request": null,
  "redaction": null,
  "request_history": [],
  "status": "reversed",
  "transactions": [],
  "verification_data": {
    "address_line1_check": "not_provided",
    "address_postal_code_check": "match",
    "cvc_check": "match",
    "expiry_check": "match"
  },
  "wallet": null
}
```

## Returns

An Authorization object

## Parameters

- `card` (string, required)
  Card associated with this authorization.

- `amount` (integer, optional)
  The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card’s currency, and in the [smallest currency unit](https://docs.stripe.com/currencies.md#zero-decimal).

- [`amount_details`](https://docs.stripe.com/api/issuing/authorizations/test_mode_create.md?query=amount_details) (object, optional)
  Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://docs.stripe.com/currencies.md#zero-decimal).

- `authorization_method` (enum, optional)
  How the card details were provided. Defaults to online.
Possible enum values:
  - `chip`
    The card was physically present and inserted into a chip-enabled terminal. The transaction is cryptographically secured.

  - `contactless`
    The card was present and tapped on a contactless-enabled terminal. If a digital wallet copy of the card was used, the wallet field will be present.

  - `keyed_in`
    The card number was manually entered into a terminal. Card presence is unknown and will be set to nil in testmode, but livemode values will depend on the actual card presence at the time of the transaction

  - `online`
    The card was used in a card-not-present scenario, such as a transaction initiated at an online e-commerce checkout.

  - `swipe`
    The card was physically present and swiped in a terminal.

- `currency` (enum, optional)
  The currency of the authorization. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies.md).

- [`fleet`](https://docs.stripe.com/api/issuing/authorizations/test_mode_create.md?query=fleet) (object, optional)
  Fleet-specific information for authorizations using Fleet cards.

- [`fuel`](https://docs.stripe.com/api/issuing/authorizations/test_mode_create.md?query=fuel) (object, optional)
  Information about fuel that was purchased with this transaction.

- `is_amount_controllable` (boolean, optional)
  If set `true`, you may provide [amount](https://docs.stripe.com/api/issuing/authorizations/approve.md#approve_issuing_authorization-amount) to control how much to hold for the authorization.

- `merchant_amount` (integer, optional)
  The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://docs.stripe.com/currencies.md#zero-decimal).

- `merchant_currency` (enum, optional)
  The currency of the authorization. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies.md).

- [`merchant_data`](https://docs.stripe.com/api/issuing/authorizations/test_mode_create.md?query=merchant_data) (object, optional)
  Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.

- [`network_data`](https://docs.stripe.com/api/issuing/authorizations/test_mode_create.md?query=network_data) (object, optional)
  Details about the authorization, such as identifiers, set by the card network.

- [`verification_data`](https://docs.stripe.com/api/issuing/authorizations/test_mode_create.md?query=verification_data) (object, optional)
  Verifications that Stripe performed on information that the cardholder provided to the merchant.

- `wallet` (enum, optional)
  The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized.
