# Store Card in Vault

**POST** `/dpm/cofre-gw-proxy/v1/cards`

Base URL: `https://api.pre.globalgetnet.com`

__Store Card in Vault__<br><br>This endpoint securely stores a consumer’s card information in Getnet’s digital vault for future use. It allows the creation of a reusable card resource based on previously tokenized data, enabling seamless and secure transactions without requiring the card details again.<br><br>**Usage Scenarios:**<br>_- Tokenizing and saving card data for future payments.<br>- Enabling subscriptions or billing cycles without re-entering card information.<br>- Minimizing PCI scope by leveraging secure storage of sensitive data._<br><br>**Notes:**<br>_- This operation accepts either an open card number_ (`number`) _or a previously generated tokenized card number_ (`number_token`)_, typically obtained via the_ **/v1/tokens/card** _endpoint.<br>-The card data is stored securely, and sensitive fields like CVV are **never stored**.<br>- You may optionally skip card verification by using the_ `x-by-pass-parameters` _header._

## Authorization

- PROD (oauth2)
- PRE (oauth2)
- SBX (oauth2)

## Header parameters

- `x-by-pass-parameters` (boolean)
  Condition to not validate whether the product vault is enabled parameters.

## Body

Content type: `application/json`

- `number` (string)
  Open card number (PAN). Send `number` or `number_token`. Use `number` to store the card directly.
- `number_token` (string)
  Tokenized card number, generated via the /v1/tokens/card endpoint. Send `number_token` or `number`.
- `brand` ("Mastercard" | "Visa" | "Amex" | "Elo" | "Hipercard")
  Card Brand.
- `cardholder_name` (string)
  Buyer's name printed on the card.
- `expiration_month` (string, required)
  Two-digit card expiration month.
- `expiration_year` (string, required)
  Two-digit card expiration year.
- `customer_id` (string, required)
  Buyer identifier.
- `cardholder_identification` (string)
  Identification of the buyer, such as CPF or ID. (without mask).
- `verify_card` (true | false)
  Performs a transaction that verifies that the card entered does not is cancelled, blocked or restricted.
- `security_code` (string)
  Security code. CVV or CVC.
- `transaction_id` (string)
  Number of the card's first transaction.

Example:

```json
{
  "number": "5155901222280001",
  "number_token": "dfe05208b105578c070f806c80abd3af09e246827d29b866cf4ce16c205849977c9496cbf0d0234f42339937f327747075f68763537b90b31389e01231d4d13c",
  "brand": "Mastercard",
  "cardholder_name": "JOAO DA SILVA",
  "expiration_month": "12",
  "expiration_year": "28",
  "customer_id": "customer_21081826",
  "cardholder_identification": "12345678912",
  "verify_card": false,
  "security_code": "123",
  "transaction_id": "3123131241412"
}
```

## Responses

### 201

Card identifier created successfully. Card saved in safe.

- `card_id` (string)
  Card identifier saved in the safe, can be used to retrieve a valid number_token for future purchases, as well as can be used to remove saved cards.
- `number_token` (string)
  Card token that will be used in transactions.

Example:

```json
{
  "card_id": "e8ad2ae4-9e3e-4532-998f-1a5a11e56e58",
  "number_token": "dfe05208b105578c070f806c80abd3af09e246827d29b866cf4ce16c205849977c9496cbf0d0234f42339937f327747075f68763537b90b31389e01231d4d13c"
}
```

### 400

Invalid request.

- `message` (string)
  Detailed error message.
- `name` (string)
  Name of the module or system in which the error occurred.
- `status_code` (integer<int32>)
  HTTP status code of the error.
- `details` (object[])
  Error details.
  - `status` (string)
    Error situation.
  - `error_code` (string)
    Error code.
  - `description` (string)
    Description of the error.
  - `description_detail` (string)
    Detailed description of the error.
  - `brand` (string)
    Brand.
  - `payment_id` (string)
    payment_id.
  - `seller_id` (string)
    seller_id.
  - `amount` (string)
    amount.
  - `currency` (string)
    currency.
  - `order_id` (string)
    order_id.
  - `credit_cancel` (object)
    credit_cancel.
    - `canceled_at` (string)
      canceledAt.
    - `message` (string)
      message.
  - `payment_tag` (string)
    payment_tag.
  - `status_code` (string)
    statusCode.
  - `message` (string)
    message.
  - `name` (string)
    name.
  - `acquirer_transaction_id` (string)
    acquirer_transaction_id.
  - `authorization_code` (string)
    authorization_code.
  - `transaction_id` (string)
    transaction_id.
  - `reason_code` (string)
    reason_code.
  - `reason_message` (string)
    reason_message.
  - `merchant_advice_code` (string)
    merchant_advice_code.
- `payments` (object[])
  Error details.
  - `status` (string)
    Error situation.
  - `error_code` (string)
    Error code.
  - `description` (string)
    Description of the error.
  - `description_detail` (string)
    Detailed description of the error.
  - `brand` (string)
    Brand.
  - `payment_id` (string)
    payment_id.
  - `seller_id` (string)
    seller_id.
  - `amount` (string)
    amount.
  - `currency` (string)
    currency.
  - `order_id` (string)
    order_id.
  - `credit_cancel` (object)
    credit_cancel.
    - `canceled_at` (string)
      canceledAt.
    - `message` (string)
      message.
  - `payment_tag` (string)
    payment_tag.
  - `status_code` (string)
    statusCode.
  - `message` (string)
    message.
  - `name` (string)
    name.
  - `acquirer_transaction_id` (string)
    acquirer_transaction_id.
  - `authorization_code` (string)
    authorization_code.
  - `transaction_id` (string)
    transaction_id.
  - `reason_code` (string)
    reason_code.
  - `reason_message` (string)
    reason_message.
  - `merchant_advice_code` (string)
    merchant_advice_code.
- `combined_id` (string)
  combinedId.
- `order_id` (string)
  orderId.
- `seller_id` (string)
  sellerId.

Example:

```json
{
  "message": "string",
  "name": "string",
  "status_code": 0,
  "details": [
    {
      "status": "string",
      "error_code": "string",
      "description": "string",
      "description_detail": "string",
      "brand": "string",
      "payment_id": "string",
      "seller_id": "string",
      "amount": "string",
      "currency": "string",
      "order_id": "string",
      "credit_cancel": {
        "canceled_at": "string",
        "message": "string"
      },
      "payment_tag": "string",
      "status_code": "string",
      "message": "string",
      "name": "string",
      "acquirer_transaction_id": "string",
      "authorization_code": "string",
      "transaction_id": "string",
      "reason_code": "string",
      "reason_message": "string",
      "merchant_advice_code": "string"
    }
  ],
  "payments": [
    {
      "status": "string",
      "error_code": "string",
      "description": "string",
      "description_detail": "string",
      "brand": "string",
      "payment_id": "string",
      "seller_id": "string",
      "amount": "string",
      "currency": "string",
      "order_id": "string",
      "credit_cancel": {
        "canceled_at": "string",
        "message": "string"
      },
      "payment_tag": "string",
      "status_code": "string",
      "message": "string",
      "name": "string",
      "acquirer_transaction_id": "string",
      "authorization_code": "string",
      "transaction_id": "string",
      "reason_code": "string",
      "reason_message": "string",
      "merchant_advice_code": "string"
    }
  ],
  "combined_id": "string",
  "order_id": "string",
  "seller_id": "string"
}
```

### 401

Invalid authentication.

- `message` (string)
  Detailed error message.
- `name` (string)
  Name of the module or system in which the error occurred.
- `status_code` (integer<int32>)
  HTTP status code of the error.
- `details` (object[])
  Error details.
  - `status` (string)
    Error situation.
  - `error_code` (string)
    Error code.
  - `description` (string)
    Description of the error.
  - `description_detail` (string)
    Detailed description of the error.
  - `brand` (string)
    Brand.
  - `payment_id` (string)
    payment_id.
  - `seller_id` (string)
    seller_id.
  - `amount` (string)
    amount.
  - `currency` (string)
    currency.
  - `order_id` (string)
    order_id.
  - `credit_cancel` (object)
    credit_cancel.
    - `canceled_at` (string)
      canceledAt.
    - `message` (string)
      message.
  - `payment_tag` (string)
    payment_tag.
  - `status_code` (string)
    statusCode.
  - `message` (string)
    message.
  - `name` (string)
    name.
  - `acquirer_transaction_id` (string)
    acquirer_transaction_id.
  - `authorization_code` (string)
    authorization_code.
  - `transaction_id` (string)
    transaction_id.
  - `reason_code` (string)
    reason_code.
  - `reason_message` (string)
    reason_message.
  - `merchant_advice_code` (string)
    merchant_advice_code.
- `payments` (object[])
  Error details.
  - `status` (string)
    Error situation.
  - `error_code` (string)
    Error code.
  - `description` (string)
    Description of the error.
  - `description_detail` (string)
    Detailed description of the error.
  - `brand` (string)
    Brand.
  - `payment_id` (string)
    payment_id.
  - `seller_id` (string)
    seller_id.
  - `amount` (string)
    amount.
  - `currency` (string)
    currency.
  - `order_id` (string)
    order_id.
  - `credit_cancel` (object)
    credit_cancel.
    - `canceled_at` (string)
      canceledAt.
    - `message` (string)
      message.
  - `payment_tag` (string)
    payment_tag.
  - `status_code` (string)
    statusCode.
  - `message` (string)
    message.
  - `name` (string)
    name.
  - `acquirer_transaction_id` (string)
    acquirer_transaction_id.
  - `authorization_code` (string)
    authorization_code.
  - `transaction_id` (string)
    transaction_id.
  - `reason_code` (string)
    reason_code.
  - `reason_message` (string)
    reason_message.
  - `merchant_advice_code` (string)
    merchant_advice_code.
- `combined_id` (string)
  combinedId.
- `order_id` (string)
  orderId.
- `seller_id` (string)
  sellerId.

Example:

```json
{
  "message": "string",
  "name": "string",
  "status_code": 0,
  "details": [
    {
      "status": "string",
      "error_code": "string",
      "description": "string",
      "description_detail": "string",
      "brand": "string",
      "payment_id": "string",
      "seller_id": "string",
      "amount": "string",
      "currency": "string",
      "order_id": "string",
      "credit_cancel": {
        "canceled_at": "string",
        "message": "string"
      },
      "payment_tag": "string",
      "status_code": "string",
      "message": "string",
      "name": "string",
      "acquirer_transaction_id": "string",
      "authorization_code": "string",
      "transaction_id": "string",
      "reason_code": "string",
      "reason_message": "string",
      "merchant_advice_code": "string"
    }
  ],
  "payments": [
    {
      "status": "string",
      "error_code": "string",
      "description": "string",
      "description_detail": "string",
      "brand": "string",
      "payment_id": "string",
      "seller_id": "string",
      "amount": "string",
      "currency": "string",
      "order_id": "string",
      "credit_cancel": {
        "canceled_at": "string",
        "message": "string"
      },
      "payment_tag": "string",
      "status_code": "string",
      "message": "string",
      "name": "string",
      "acquirer_transaction_id": "string",
      "authorization_code": "string",
      "transaction_id": "string",
      "reason_code": "string",
      "reason_message": "string",
      "merchant_advice_code": "string"
    }
  ],
  "combined_id": "string",
  "order_id": "string",
  "seller_id": "string"
}
```

### 403

Safe product not enabled.

- `message` (string)
  Detailed error message.
- `name` (string)
  Name of the module or system in which the error occurred.
- `status_code` (integer<int32>)
  HTTP status code of the error.
- `details` (object[])
  Error details.
  - `status` (string)
    Error situation.
  - `error_code` (string)
    Error code.
  - `description` (string)
    Description of the error.
  - `description_detail` (string)
    Detailed description of the error.
  - `brand` (string)
    Brand.
  - `payment_id` (string)
    payment_id.
  - `seller_id` (string)
    seller_id.
  - `amount` (string)
    amount.
  - `currency` (string)
    currency.
  - `order_id` (string)
    order_id.
  - `credit_cancel` (object)
    credit_cancel.
    - `canceled_at` (string)
      canceledAt.
    - `message` (string)
      message.
  - `payment_tag` (string)
    payment_tag.
  - `status_code` (string)
    statusCode.
  - `message` (string)
    message.
  - `name` (string)
    name.
  - `acquirer_transaction_id` (string)
    acquirer_transaction_id.
  - `authorization_code` (string)
    authorization_code.
  - `transaction_id` (string)
    transaction_id.
  - `reason_code` (string)
    reason_code.
  - `reason_message` (string)
    reason_message.
  - `merchant_advice_code` (string)
    merchant_advice_code.
- `payments` (object[])
  Error details.
  - `status` (string)
    Error situation.
  - `error_code` (string)
    Error code.
  - `description` (string)
    Description of the error.
  - `description_detail` (string)
    Detailed description of the error.
  - `brand` (string)
    Brand.
  - `payment_id` (string)
    payment_id.
  - `seller_id` (string)
    seller_id.
  - `amount` (string)
    amount.
  - `currency` (string)
    currency.
  - `order_id` (string)
    order_id.
  - `credit_cancel` (object)
    credit_cancel.
    - `canceled_at` (string)
      canceledAt.
    - `message` (string)
      message.
  - `payment_tag` (string)
    payment_tag.
  - `status_code` (string)
    statusCode.
  - `message` (string)
    message.
  - `name` (string)
    name.
  - `acquirer_transaction_id` (string)
    acquirer_transaction_id.
  - `authorization_code` (string)
    authorization_code.
  - `transaction_id` (string)
    transaction_id.
  - `reason_code` (string)
    reason_code.
  - `reason_message` (string)
    reason_message.
  - `merchant_advice_code` (string)
    merchant_advice_code.
- `combined_id` (string)
  combinedId.
- `order_id` (string)
  orderId.
- `seller_id` (string)
  sellerId.

Example:

```json
{
  "message": "string",
  "name": "string",
  "status_code": 0,
  "details": [
    {
      "status": "string",
      "error_code": "string",
      "description": "string",
      "description_detail": "string",
      "brand": "string",
      "payment_id": "string",
      "seller_id": "string",
      "amount": "string",
      "currency": "string",
      "order_id": "string",
      "credit_cancel": {
        "canceled_at": "string",
        "message": "string"
      },
      "payment_tag": "string",
      "status_code": "string",
      "message": "string",
      "name": "string",
      "acquirer_transaction_id": "string",
      "authorization_code": "string",
      "transaction_id": "string",
      "reason_code": "string",
      "reason_message": "string",
      "merchant_advice_code": "string"
    }
  ],
  "payments": [
    {
      "status": "string",
      "error_code": "string",
      "description": "string",
      "description_detail": "string",
      "brand": "string",
      "payment_id": "string",
      "seller_id": "string",
      "amount": "string",
      "currency": "string",
      "order_id": "string",
      "credit_cancel": {
        "canceled_at": "string",
        "message": "string"
      },
      "payment_tag": "string",
      "status_code": "string",
      "message": "string",
      "name": "string",
      "acquirer_transaction_id": "string",
      "authorization_code": "string",
      "transaction_id": "string",
      "reason_code": "string",
      "reason_message": "string",
      "merchant_advice_code": "string"
    }
  ],
  "combined_id": "string",
  "order_id": "string",
  "seller_id": "string"
}
```

### 404

Not found.

- `message` (string)
  Detailed error message.
- `name` (string)
  Name of the module or system in which the error occurred.
- `status_code` (integer<int32>)
  HTTP status code of the error.
- `details` (object[])
  Error details.
  - `status` (string)
    Error situation.
  - `error_code` (string)
    Error code.
  - `description` (string)
    Description of the error.
  - `description_detail` (string)
    Detailed description of the error.
  - `brand` (string)
    Brand.
  - `payment_id` (string)
    payment_id.
  - `seller_id` (string)
    seller_id.
  - `amount` (string)
    amount.
  - `currency` (string)
    currency.
  - `order_id` (string)
    order_id.
  - `credit_cancel` (object)
    credit_cancel.
    - `canceled_at` (string)
      canceledAt.
    - `message` (string)
      message.
  - `payment_tag` (string)
    payment_tag.
  - `status_code` (string)
    statusCode.
  - `message` (string)
    message.
  - `name` (string)
    name.
  - `acquirer_transaction_id` (string)
    acquirer_transaction_id.
  - `authorization_code` (string)
    authorization_code.
  - `transaction_id` (string)
    transaction_id.
  - `reason_code` (string)
    reason_code.
  - `reason_message` (string)
    reason_message.
  - `merchant_advice_code` (string)
    merchant_advice_code.
- `payments` (object[])
  Error details.
  - `status` (string)
    Error situation.
  - `error_code` (string)
    Error code.
  - `description` (string)
    Description of the error.
  - `description_detail` (string)
    Detailed description of the error.
  - `brand` (string)
    Brand.
  - `payment_id` (string)
    payment_id.
  - `seller_id` (string)
    seller_id.
  - `amount` (string)
    amount.
  - `currency` (string)
    currency.
  - `order_id` (string)
    order_id.
  - `credit_cancel` (object)
    credit_cancel.
    - `canceled_at` (string)
      canceledAt.
    - `message` (string)
      message.
  - `payment_tag` (string)
    payment_tag.
  - `status_code` (string)
    statusCode.
  - `message` (string)
    message.
  - `name` (string)
    name.
  - `acquirer_transaction_id` (string)
    acquirer_transaction_id.
  - `authorization_code` (string)
    authorization_code.
  - `transaction_id` (string)
    transaction_id.
  - `reason_code` (string)
    reason_code.
  - `reason_message` (string)
    reason_message.
  - `merchant_advice_code` (string)
    merchant_advice_code.
- `combined_id` (string)
  combinedId.
- `order_id` (string)
  orderId.
- `seller_id` (string)
  sellerId.

Example:

```json
{
  "message": "string",
  "name": "string",
  "status_code": 0,
  "details": [
    {
      "status": "string",
      "error_code": "string",
      "description": "string",
      "description_detail": "string",
      "brand": "string",
      "payment_id": "string",
      "seller_id": "string",
      "amount": "string",
      "currency": "string",
      "order_id": "string",
      "credit_cancel": {
        "canceled_at": "string",
        "message": "string"
      },
      "payment_tag": "string",
      "status_code": "string",
      "message": "string",
      "name": "string",
      "acquirer_transaction_id": "string",
      "authorization_code": "string",
      "transaction_id": "string",
      "reason_code": "string",
      "reason_message": "string",
      "merchant_advice_code": "string"
    }
  ],
  "payments": [
    {
      "status": "string",
      "error_code": "string",
      "description": "string",
      "description_detail": "string",
      "brand": "string",
      "payment_id": "string",
      "seller_id": "string",
      "amount": "string",
      "currency": "string",
      "order_id": "string",
      "credit_cancel": {
        "canceled_at": "string",
        "message": "string"
      },
      "payment_tag": "string",
      "status_code": "string",
      "message": "string",
      "name": "string",
      "acquirer_transaction_id": "string",
      "authorization_code": "string",
      "transaction_id": "string",
      "reason_code": "string",
      "reason_message": "string",
      "merchant_advice_code": "string"
    }
  ],
  "combined_id": "string",
  "order_id": "string",
  "seller_id": "string"
}
```

### 500

Internal server or service error.

- `message` (string)
  Detailed error message.
- `name` (string)
  Name of the module or system in which the error occurred.
- `status_code` (integer<int32>)
  HTTP status code of the error.
- `details` (object[])
  Error details.
  - `status` (string)
    Error situation.
  - `error_code` (string)
    Error code.
  - `description` (string)
    Description of the error.
  - `description_detail` (string)
    Detailed description of the error.
  - `brand` (string)
    Brand.
  - `payment_id` (string)
    payment_id.
  - `seller_id` (string)
    seller_id.
  - `amount` (string)
    amount.
  - `currency` (string)
    currency.
  - `order_id` (string)
    order_id.
  - `credit_cancel` (object)
    credit_cancel.
    - `canceled_at` (string)
      canceledAt.
    - `message` (string)
      message.
  - `payment_tag` (string)
    payment_tag.
  - `status_code` (string)
    statusCode.
  - `message` (string)
    message.
  - `name` (string)
    name.
  - `acquirer_transaction_id` (string)
    acquirer_transaction_id.
  - `authorization_code` (string)
    authorization_code.
  - `transaction_id` (string)
    transaction_id.
  - `reason_code` (string)
    reason_code.
  - `reason_message` (string)
    reason_message.
  - `merchant_advice_code` (string)
    merchant_advice_code.
- `payments` (object[])
  Error details.
  - `status` (string)
    Error situation.
  - `error_code` (string)
    Error code.
  - `description` (string)
    Description of the error.
  - `description_detail` (string)
    Detailed description of the error.
  - `brand` (string)
    Brand.
  - `payment_id` (string)
    payment_id.
  - `seller_id` (string)
    seller_id.
  - `amount` (string)
    amount.
  - `currency` (string)
    currency.
  - `order_id` (string)
    order_id.
  - `credit_cancel` (object)
    credit_cancel.
    - `canceled_at` (string)
      canceledAt.
    - `message` (string)
      message.
  - `payment_tag` (string)
    payment_tag.
  - `status_code` (string)
    statusCode.
  - `message` (string)
    message.
  - `name` (string)
    name.
  - `acquirer_transaction_id` (string)
    acquirer_transaction_id.
  - `authorization_code` (string)
    authorization_code.
  - `transaction_id` (string)
    transaction_id.
  - `reason_code` (string)
    reason_code.
  - `reason_message` (string)
    reason_message.
  - `merchant_advice_code` (string)
    merchant_advice_code.
- `combined_id` (string)
  combinedId.
- `order_id` (string)
  orderId.
- `seller_id` (string)
  sellerId.

Example:

```json
{
  "message": "string",
  "name": "string",
  "status_code": 0,
  "details": [
    {
      "status": "string",
      "error_code": "string",
      "description": "string",
      "description_detail": "string",
      "brand": "string",
      "payment_id": "string",
      "seller_id": "string",
      "amount": "string",
      "currency": "string",
      "order_id": "string",
      "credit_cancel": {
        "canceled_at": "string",
        "message": "string"
      },
      "payment_tag": "string",
      "status_code": "string",
      "message": "string",
      "name": "string",
      "acquirer_transaction_id": "string",
      "authorization_code": "string",
      "transaction_id": "string",
      "reason_code": "string",
      "reason_message": "string",
      "merchant_advice_code": "string"
    }
  ],
  "payments": [
    {
      "status": "string",
      "error_code": "string",
      "description": "string",
      "description_detail": "string",
      "brand": "string",
      "payment_id": "string",
      "seller_id": "string",
      "amount": "string",
      "currency": "string",
      "order_id": "string",
      "credit_cancel": {
        "canceled_at": "string",
        "message": "string"
      },
      "payment_tag": "string",
      "status_code": "string",
      "message": "string",
      "name": "string",
      "acquirer_transaction_id": "string",
      "authorization_code": "string",
      "transaction_id": "string",
      "reason_code": "string",
      "reason_message": "string",
      "merchant_advice_code": "string"
    }
  ],
  "combined_id": "string",
  "order_id": "string",
  "seller_id": "string"
}
```