> ## Documentation Index
> Fetch the complete documentation index at: https://rain-sandbox-trial.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Issue a Card

> Create virtual or physical cards for approved users, set limits, activate them, and add them to a mobile wallet.

Once a cardholder's application is approved, you can issue them a card. This page
covers creating virtual and physical cards, setting spending limits, shipping
and activating physical cards, setting a PIN, and adding cards to a mobile
wallet. Create a card with the
[Create a card](/reference/cards/create-a-card-for-a-user) endpoint.

## Virtual vs. physical cards

Both card types use the same endpoint. The `type` you pass determines the setup:

* **Virtual cards** are available for immediate use. Display the full details by
  decrypting them on the client. See
  [Access card details](/docs/viewing-encrypted-card-details).
* **Physical cards** are shipped to the cardholder and require activation after
  delivery.

<CodeGroup>
  ```ts Virtual theme={null}
  const card = await client.users.createCard(userId, {
    type: 'virtual',
    limit: { amount: 50000, frequency: 'per30DayPeriod' },
  });
  ```

  ```ts Physical theme={null}
  const card = await client.users.createCard(userId, {
    type: 'physical',
    limit: { amount: 50000, frequency: 'per30DayPeriod' },
    shipping: {
      line1: '123 Main St',
      city: 'San Francisco',
      region: 'CA',
      postalCode: '94105',
      country: 'United States',
      countryCode: 'US',
      phoneNumber: '+14155551234',
      method: 'standard',
    },
  });
  ```
</CodeGroup>

The response includes the card `id`, `last4`, and `status`.

## Set spending limits

Set an initial spending limit at creation with the `limit` field, then adjust it
later with the [Update a card](/reference/cards/update-a-card) endpoint. The
`amount` is in the smallest currency unit, for example cents.

<Info>
  Spending limits work on a rolling basis. The system adds up every purchase
  from the last 30 days, down to the exact second. As purchases pass the 30-day
  mark, they fall off and stop counting against the limit.
</Info>

## Ship a physical card

Physical cards require a `shipping` object with the recipient's address and
phone number. Choose a shipping `method` based on speed, cost, and whether you
need tracking:

* **Tracked methods** (FedEx, DHL) provide real-time tracking and faster
  delivery.
* **Untracked methods** (USPS, APC) are more economical.

The method must match the destination country: US addresses take `standard` or
`express`, and non-US addresses take `international`, `apc`, `apcTracked`, or
`uspsInternational`. When you omit `method`, Rain ships US cards `standard` and
non-US cards `international`.

For the full list of methods, pricing, delivery times, tracking, and address
character requirements, see [Physical card shipping](/docs/physical-card-shipping).
To send several cards to one address in a single shipment, see
[Ship cards in bulk](/docs/bulk-shipping).

A shipping address can't be changed once the order is submitted. If a card was
ordered with the wrong address, cancel it and issue a new card with the
corrected address.

Set the name embossed on the card with `displayName` (26 characters maximum;
letters, numbers, spaces, periods, and hyphens). By default, Rain uses the
cardholder's full name.

<Warning>
  The cardholder's first and last name must contain only Latin characters (A-Z,
  a-z, spaces, and hyphens) for physical card personalization. Names with
  non-Latin characters are not supported on the embossed card.
</Warning>

## Set a PIN

Cardholders can set and update a card PIN of 4 to 12 digits. The PIN is
encrypted on the client before you send it to Rain. For the full encrypt, set,
and retrieve flow, see [Manage a card's PIN](/docs/managing-a-cards-pin).

## Activate the card

By default, activation is not required and a new card is `active`. To enforce an
activation step, create the card with `status` set to `notActivated`. To
activate it, confirm the cardholder's last four digits, expiry date, or both
with the [Get a card](/reference/cards/get-a-card-by-its-id) endpoint, then set
the status to `active` with the [Update a card](/reference/cards/update-a-card)
endpoint.

A card moves through these statuses:

| Status         | Description                                          |
| -------------- | ---------------------------------------------------- |
| `notActivated` | Issued but requires activation before use.           |
| `active`       | Fully functional for transactions within its limits. |
| `locked`       | Temporarily disabled. You can unlock it.             |
| `canceled`     | Permanently disabled. This cannot be reversed.       |

You can update a card's status or limits at any time. See
[Card management best practices](/docs/card-management-best-practices).

## Add to Apple Wallet or Google Wallet

Let cardholders add their card to Apple Wallet or Google Wallet from your app
with push provisioning, implemented through the MeaWallet SDK. Push provisioning
must be tested with production cards. For the integration steps and decline
troubleshooting, such as wallet risk-engine blocks and region mismatches, see
[Set up push provisioning](/docs/push-provisioning).

## What's next

<Columns cols={2}>
  <Card title="Fund the card" icon="coins" href="/docs/managing-collateral">
    Add collateral so the cardholder's credit limit reflects their available
    funds.
  </Card>

  <Card title="Access card details" icon="lock" href="/docs/viewing-encrypted-card-details">
    Decrypt a virtual card's PAN and CVC on the client so the cardholder can
    start spending.
  </Card>
</Columns>
