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

# Card Close (Beta)

> **Beta.** Card issuance is in beta and enabled per account. Contact support@henrylabs.ai to request access; until then this endpoint returns `403`.

Close an issued card. Final: a closed card declines everything. Within about 15 minutes of closing, the card settles: the buyer's card is refunded whatever the issued card didn't spend, and its cap stops counting against your app's open-card limit. Closing is optional — a card you leave alone settles when it expires — but closing once a purchase has fully completed refunds the buyer sooner. Don't close a card the merchant may still capture on (some charge when they ship). Idempotent.



## OpenAPI

````yaml /v1/api-reference/openapi.documented.json post /card/{cardToken}/close
openapi: 3.1.0
info:
  title: Henry Labs API
  version: 1.17.0
  description: Playground for Henry Labs API endpoints
  contact:
    name: Henry Labs API Support
    email: support@henrylabs.ai
servers:
  - url: https://api.henrylabs.ai/v1
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Product
    description: Product search, details, and data enrichment
  - name: Cart
    description: Universal user shopping cart management
  - name: Orders
    description: Order management post purchase
  - name: Merchants
    description: Merchant information and status
  - name: Card
    description: Card tokenization and management
paths:
  /card/{cardToken}/close:
    post:
      tags:
        - Card
      summary: Card Close (Beta)
      description: >-
        **Beta.** Card issuance is in beta and enabled per account. Contact
        support@henrylabs.ai to request access; until then this endpoint returns
        `403`.


        Close an issued card. Final: a closed card declines everything. Within
        about 15 minutes of closing, the card settles: the buyer's card is
        refunded whatever the issued card didn't spend, and its cap stops
        counting against your app's open-card limit. Closing is optional — a
        card you leave alone settles when it expires — but closing once a
        purchase has fully completed refunds the buyer sooner. Don't close a
        card the merchant may still capture on (some charge when they ship).
        Idempotent.
      operationId: cardClose
      parameters:
        - in: path
          name: cardToken
          schema:
            type: string
            description: Token returned by `POST /card/issue`
            example: card_live_abc123xyz
          required: true
          description: Token returned by `POST /card/issue`
      responses:
        '200':
          description: The card, now closed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/issuedCardResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                  message:
                    type: string
                required:
                  - success
                  - status
                  - message
                additionalProperties: false
        '403':
          description: >-
            Card issuance is a beta feature and isn't enabled for your account.
            Contact support@henrylabs.ai to request access.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                  message:
                    type: string
                required:
                  - success
                  - status
                  - message
                additionalProperties: false
        '404':
          description: >-
            No card with this token was issued to your app. Tokenized (customer)
            cards are not readable here.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                  message:
                    type: string
                required:
                  - success
                  - status
                  - message
                additionalProperties: false
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import HenrySDK from '@henrylabs/sdk';

            const client = new HenrySDK({
              apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.card.close('card_live_abc123xyz');

            console.log(response.data);
components:
  schemas:
    issuedCardResponse:
      type: object
      properties:
        success:
          type: boolean
        status:
          type: string
        message:
          type: string
        data:
          $ref: '#/components/schemas/issuedCardData'
      required:
        - success
        - status
        - message
        - data
      additionalProperties: false
    issuedCardData:
      type: object
      properties:
        cardToken:
          type: string
          description: >-
            Opaque token for the issued card. Pass it to
            `cart.checkout.purchase` exactly like a tokenized card.
          example: card_live_abc123xyz
        cardBin:
          type: string
          description: First 6 digits
          example: '424242'
        cardLast4:
          type: string
          description: Last 4 digits
          example: '4242'
        cardBrand:
          type: string
          description: Card brand
          example: visa
        capCents:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: >-
            Lifetime spend cap in cents. The card declines once total spend
            across all charges would exceed this — it is a budget for the card's
            whole life, not a per-charge limit.
          example: 5000
        expiresAt:
          type: string
          description: >-
            When the card expires and stops working (ISO-8601). Close it earlier
            to settle sooner: the buyer is refunded whatever the card didn't
            spend, and its cap stops counting against your open-card limit.
          example: '2026-09-29T00:00:00.000Z'
        state:
          type: string
          enum:
            - OPEN
            - PAUSED
            - CLOSED
            - UNKNOWN
          description: >-
            Live state at the issuer. `UNKNOWN` means the read failed — treat
            the card as possibly still open.
        closedAt:
          anyOf:
            - type: string
            - type: 'null'
          description: When Henry closed the card (ISO-8601), or null while open.
        charge:
          anyOf:
            - type: object
              properties:
                status:
                  type: string
                  enum:
                    - ok
                    - unavailable
                charged:
                  type: boolean
                  description: Any transaction at all — approved or declined.
                approved:
                  type: boolean
                  description: At least one transaction was approved by the network.
                count:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                reason:
                  type: string
              required:
                - status
                - charged
                - approved
                - count
              additionalProperties: false
            - type: 'null'
          description: >-
            What has hit the card so far, read live from the issuer. Null on the
            issue response (nothing can have happened yet).
      required:
        - cardToken
        - cardBin
        - cardLast4
        - cardBrand
        - capCents
        - expiresAt
        - state
        - closedAt
        - charge
      additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.