---
title: "aid_cards_batch_post"
method: POST
path: "/accounts/{aid}/wallets/cards/batch"
tags: ["cards"]
---

# aid_cards_batch_post

`POST /accounts/{aid}/wallets/cards/batch`

Batch create cards. The cards created from the batch operation will
all have zero balance and status `inactive`. They all need to be
activated before use.

scopes:
- admin:wallets
- write:wallets

## Path parameters

- `aid` string, ^[PT]{1}\d{8}$, required

## Request body

- object
  - `cards` object[], required
    - `card_id` string, required — The card id you have defined for the card. (must not have trailing or leading spaces)
    - `type` 'gift_card' | 'credit_note', required — The type of the card. The value is one of the following: - `gift_card` - a gift card - `credit_note` - a credit note
  - `options` object — Options for the cards to create
    - `pin` object
      - `format` PinFormat, required — PIN format used for generation
        - `length` integer — The length of the PIN (exclusive length of the prefix).
        - `prefix` string — Prefix the PIN, the length of the prefix will affect the total length of the PIN.
        - `symbols` boolean — Allow characters like `@#$%` in the created PIN.
        - `numbers` boolean — Allow characters like `123456` in the created PIN.
        - `characters` boolean — Allow characters like `acbABC` in the created PIN.
        - `barcode` boolean — Include the PIN as a base64 encoded barcode image.
    - `card_token` object
      - `format` object, required — specify the format for the token, default format is an UUID prefixed with `DINCARD`
        - `length` integer — The length of the token (exclusive length of the prefix)
        - `prefix` string — Prefix the token, the length of the prefix will affect the total length of the token
        - `symbols` boolean — Allow characters like `@#$%` in the created token
        - `numbers` boolean — Allow characters like `123456` in the created token
        - `characters` boolean — Allow characters like `acbABC` in the created token
        - `barcode` boolean — Include token as base64 encoded barcode image

## Response `200`

Cards created

- InactiveBatchCards
  - `cards` object[], required
    - `brand` string — Visa, MasterCard, etc. The brand of the card.
    - `masked_pan` string
    - `expiry_date` string, \d{2}/\d{4}
    - `type` 'Credit' | 'Debit' | 'Credit Card' | 'Debit Card' | 'Prepaid'
    - `region` 'domestic' | 'eea' | 'eea-uk' | 'europe' | 'inter' — The region in which the transaction takes place, determined by location of merchant and issuer. * `domestic`: merchant and issuer within the same country. * `eea`: merchant and issuer within EEA, but not the same country. * `eea-uk`: merchant and issuer within EEA plus United Kingdom, but one or both not withing EEA. * `europe`: merchant and issuer within Europe, but one or both not within EEA plus United Kingdom. * `inter`: merchant and/or issuer not within Europe.
    - `country` string, iso-3166-1 — The country the card is issued in
    - `product_platform` 'consumer' | 'commercial'
    - `issuing_bank` string — The name of the bank that issued the card used
    - `acquirer_transaction_type` '3DSECURE' | 'SSL' — 3DSECURE or SSL. Indicates the transaction type of the acquirer.
    - `acquirer_stan` string — The System Trace Audit Number assigned by the acquirer to uniquely identify the transaction.
    - `acquirer_terminal_id` string — The ID of the acquirer terminal.
    - `acquirer_transaction_time` string, date-time — The ISO-8601 date and time of the acquirer transaction.
    - `authentication_status` 'Y' | 'A' | 'U' | 'N' — Y, A, U or N. Indicates the status of the authentication.
    - `three_ds_version` string
    - `three_ds_server_trans_id` string
    - `eci` string
    - `payment_system_type` string
    - `payment_token` string — The payment token generated by the authorization. Only available for transactions created from session where the generate_payment_token option is enabled in the session configuration, or from payment token sessions where payment_token is included in the token_provider.token_types - [POST /v1/sessions/payment-token](/api-reference/session/checkout_payment_token_session_post)
    - `payment_token_id` string — The id of the payment_token, only included in transaction where a payment_token was generated.
    - `recurrence_token` string — The recurrence token generated by the authorization. Only available for transactions created from session where the generate_recurrence_token option is enabled in the session configuration, or from payment token sessions where recurrence_token is included in the token_provider.token_types - [POST /v1/sessions/payment-token](/api-reference/session/checkout_payment_token_session_post)
    - `recurrence_token_id` string — The id of the recurrence_token, only included in transaction where a recurrence_token was generated.
    - `card_holder_tokenization_consent` 'opt_in' | 'opt_out' — The card holder's consent to tokenization, as provided during authorization. This is only a hint, and the final decision is made by the card issuer.
    - `entry_method` 'chip' | 'contactless' | 'magstripe' — How the card was read.
    - `status` 'inactive'
    - `pin` PinGenerator — How the PIN should be generated.
      - `format` PinFormat — PIN format used for generation
        - `length` integer — The length of the PIN (exclusive length of the prefix).
        - `prefix` string — Prefix the PIN, the length of the prefix will affect the total length of the PIN.
        - `symbols` boolean — Allow characters like `@#$%` in the created PIN.
        - `numbers` boolean — Allow characters like `123456` in the created PIN.
        - `characters` boolean — Allow characters like `acbABC` in the created PIN.
        - `barcode` boolean — Include the PIN as a base64 encoded barcode image.
      - `pin` object
        - `value` string
        - `barcode_128` string — Code 128 barcode representation of the PIN value. A base64 encoded image in format `data:[<mime type>][;charset=<charset>][;base64],<encoded data>`
    - `card_token` TokenGenerator — Specify how token should be generated
      - `format` object — specify the format for the token, default format is an UUID prefixed with `DINCARD`
        - `length` integer — The length of the token (exclusive length of the prefix)
        - `prefix` string — Prefix the token, the length of the prefix will affect the total length of the token
        - `symbols` boolean — Allow characters like `@#$%` in the created token
        - `numbers` boolean — Allow characters like `123456` in the created token
        - `characters` boolean — Allow characters like `acbABC` in the created token
        - `barcode` boolean — Include token as base64 encoded barcode image
      - `expires_after_transaction` boolean — The token can only be used to create one transaction, card lookup by token will be available until token expires by date
      - `expires_in` integer, required — The lifetime in seconds for the card token. For example, the value "3600" denotes that the token will expire in one hour from the time the response was generated.
      - `token` object
        - `value` string
        - `barcode_128` string — Code 128 barcode representation of the token value. A base64 encoded image in format `data:[<mime type>][;charset=<charset>][;base64],<encoded data>`

## Other responses

- `400` — Bad / Invalid request
- `401` — Access forbidden, invalid JWT token was used
- `403` — Forbidden
- `500` — Unexpected Error

---

[API](https://skmtc.net/dintero/apis/account-management-api.md) · [All operations](https://skmtc.net/dintero/apis/account-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dintero/account-management-api/revisions/9b83a4199008/schema)
