---
title: "Create Card Definition"
method: POST
path: "/v2/loyalties/card-definitions"
tags: ["Card Definitions"]
---

# Create Card Definition

`POST /v2/loyalties/card-definitions`

<Warning>

<Badge color="yellow">BETA endpoint</Badge>

This is a work-in-progress documentation of a BETA endpoint. The parameters, fields, request and response bodies, and other data may subject to change. If you want to share feedback or improvements, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.

</Warning>

Creates a new card definition. Only `name` and `type` are required; all other
sections default server-side as follows:
- `code_config`: 10-character alphanumeric code pattern (`##########`)
- `points_expiration`: `NO_EXPIRATION`
- `pending_points`: `IMMEDIATE`
- `earning_limits`: global `NO_LIMIT`, transactions `NO_LIMIT`
- `spending_limits`: global `NO_LIMIT`, transactions `NO_LIMIT`
- `refunds`: spent points `NONE`, earned points `NONE`
- `balance_settings`: `allow_negative: false`
- `pay_with_points`: `NO_PAYMENTS`

Cross-field rules:
- `balance_settings.allow_negative` can only be `true` when `points_expiration.type`
  is `NO_EXPIRATION`. Additionally, the earned points refund mode `REVOKE_BELOW_ZERO`
  requires `balance_settings.allow_negative` to be `true`.
- The earned points refund method `REVOKE_FROM_PENDING` requires
  `pending_points.type` to be one of `PERIOD_BASED`, `FIXED_DATES`, `EVENT_BASED`.

## Request body

- CardDefinitionCreateRequest — Request body for creating a card definition. Cross-field rules apply: `balance_settings.allow_negative: true` requires `points_expiration.type` to be `NO_EXPIRATION`; the earned points refund mode `REVOKE_BELOW_ZERO` requires `allow_negative: true`; and the earned points refund method `REVOKE_FROM_PENDING` requires `pending_points.type` to be `PERIOD_BASED`, `FIXED_DATES` or `EVENT_BASED`.
  - `name` string, required — Card definition name.
  - `type` 'INDIVIDUAL', required — Card definition type. Currently only `INDIVIDUAL` is supported.
  - `status` 'DRAFT' | 'ACTIVE' | 'null', nullable — Initial status. Allowed values on create are `DRAFT` and `ACTIVE`. Defaults to `DRAFT` when omitted.
  - `code_config` CardDefinitionCodeConfigInput — Card code generation configuration. When `pattern` is provided, the effective code length is the number of `#` placeholders in the pattern; otherwise `length` (default 10) `#` placeholders are used.
    - `length` integer, nullable — Number of generated characters in the code (ignored when `pattern` is provided). A positive integer. Defaults to 10.
    - `charset` string, nullable — Characters used for code generation. Defaults to alphanumeric: `0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`.
    - `prefix` string, nullable — Fixed prefix prepended to every generated code. Defaults to an empty string.
    - `postfix` string, nullable — Fixed postfix appended to every generated code. Defaults to an empty string.
    - `pattern` string, nullable — Code pattern where each `#` is replaced with a random character from the charset, e.g. `###-###`. Defaults to `#` repeated `length` times.
  - `points_expiration` CardDefinitionPointsExpirationInput — Points expiration policy. Conditional requirements based on `type`: - `NO_EXPIRATION`: `rolling_expiration`, `calendar_expiration` and `sliding_expiration` must be null/absent. - `ROLLING_EXPIRATION`: `rolling_expiration` is required; the other two must be null/absent. - `CALENDAR_EXPIRATION`: `calendar_expiration` is required; the other two must be null/absent. - `SLIDING_EXPIRATION`: `sliding_expiration` is required; the other two must be null/absent.
    - `type` 'NO_EXPIRATION' | 'ROLLING_EXPIRATION' | 'CALENDAR_EXPIRATION' | 'SLIDING_EXPIRATION', required — Points expiration type.
    - `rolling_expiration` CardDefinitionPointsExpirationRollingExpirationInput — Rolling expiration configuration - points expire after a fixed period from earning.
      - `period` CardDefinitionPointsExpirationRollingExpirationPeriodInput, required — Rolling expiration period. The maximum `value` depends on `unit`: 1-90 for `DAY`, 1-12 for `MONTH`, 1-5 for `YEAR` (enforced via if/then conditions).
        - `unit` 'DAY' | 'MONTH' | 'YEAR', required — Period unit.
        - `value` integer, required — Period length. Maximum: 90 for `DAY`, 12 for `MONTH`, 5 for `YEAR`.
      - `rounding` CardDefinitionPointsExpirationRollingExpirationRoundingInput — Rounding of the rolling expiration date. When `type` is `END_OF_PARTICULAR_MONTH`, `value` (month number 1-12) is required; for all other types `value` must be null/absent.
        - `type` 'END_OF_MONTH' | 'END_OF_QUARTER' | 'END_OF_HALF_YEAR' | 'END_OF_YEAR' | 'END_OF_PARTICULAR_MONTH', required — Rounding type.
        - `value` integer, nullable — Month number (1-12). Required when `type` is `END_OF_PARTICULAR_MONTH`, must be null otherwise.
    - `calendar_expiration` CardDefinitionPointsExpirationCalendarExpirationInput — Calendar expiration configuration - points expire on fixed calendar dates.
      - `expiration_dates` CardDefinitionPointsExpirationCalendarExpirationDateInput[], required — List of calendar dates on which points expire (1-20 dates).
        - `day` integer, required — Day of the month. Maximum depends on the month: 29 for February, 30 for April, June, September, November, 31 otherwise.
        - `month` integer, required — Month number (1-12).
    - `sliding_expiration` CardDefinitionPointsExpirationSlidingExpirationInput — Sliding expiration configuration - points expiration slides on member activity. At least one of `earning_activity`, `spending_activity` or `custom_activity` must be `true`. When `custom_activity` is `true`, `custom_activity_types` is required with 1-10 unique custom event schema IDs.
      - `earning_activity` boolean — Whether earning points resets the expiration window.
      - `spending_activity` boolean — Whether spending points resets the expiration window.
      - `custom_activity` boolean — Whether the configured custom events reset the expiration window.
      - `custom_activity_types` string[], nullable — Custom event schema IDs (pattern `^ms_[a-zA-Z0-9]+`) that reset the expiration window. Required with 1-10 unique items when `custom_activity` is `true`.
      - `period` CardDefinitionPointsExpirationSlidingExpirationPeriodInput, required — Sliding expiration period. The maximum `value` depends on `unit`: 1-90 for `DAY`, 1-12 for `MONTH`, 1-1 for `YEAR` (enforced via if/then conditions).
        - `value` integer, required — Period length. Maximum: 90 for `DAY`, 12 for `MONTH`, 1 for `YEAR`.
        - `unit` 'DAY' | 'MONTH' | 'YEAR', required — Period unit.
  - `pending_points` CardDefinitionPendingPointsInput — Pending points activation policy. Conditional requirements based on `type`: - `IMMEDIATE`: `period_based`, `fixed_dates` and `event_based` must be null/absent. - `PERIOD_BASED`: `period_based` is required; the other two must be null/absent. - `FIXED_DATES`: `fixed_dates` is required; the other two must be null/absent. - `EVENT_BASED`: `event_based` is required; the other two must be null/absent.
    - `type` 'IMMEDIATE' | 'PERIOD_BASED' | 'FIXED_DATES' | 'EVENT_BASED', required — Pending points activation type. `IMMEDIATE` means no pending period.
    - `period_based` CardDefinitionPendingPointsPeriodBasedInput — Period-based pending points activation - points activate after a fixed period.
      - `period` CardDefinitionPendingPointsPeriodBasedPeriodInput, required — Pending period. The maximum `value` depends on `unit`: 1-90 for `DAY`, 1-12 for `MONTH`, 1-1 for `YEAR` (enforced via if/then conditions).
        - `unit` 'DAY' | 'MONTH' | 'YEAR', required — Period unit.
        - `value` integer, required — Period length. Maximum: 90 for `DAY`, 12 for `MONTH`, 1 for `YEAR`.
    - `fixed_dates` CardDefinitionPendingPointsFixedDatesInput — Fixed-dates pending points activation - points activate on fixed calendar dates.
      - `dates` CardDefinitionPendingPointsFixedDatesDateInput[], required — List of calendar dates on which pending points activate (1-20 dates).
        - `day` integer, required — Day of the month. Maximum depends on the month: 29 for February, 30 for April, June, September, November, 31 otherwise.
        - `month` integer, required — Month number (1-12).
    - `event_based` CardDefinitionPendingPointsEventBasedInput — Event-based pending points activation - points activate when one of the configured custom events occurs, or are cancelled after the cancel period.
      - `event_types` string[], required — Custom event schema IDs (pattern `^ms_[a-zA-Z0-9]+`) that activate pending points. 1-10 unique items.
      - `cancel_period` CardDefinitionPendingPointsEventBasedCancelPeriodInput, required — Period after which non-activated pending points are cancelled. The maximum `value` depends on `unit`: 1-90 for `DAY`, 1-12 for `MONTH`, 1-1 for `YEAR` (enforced via if/then conditions).
        - `value` integer, required — Period length. Maximum: 90 for `DAY`, 12 for `MONTH`, 1 for `YEAR`.
        - `unit` 'DAY' | 'MONTH' | 'YEAR', required — Period unit.
  - `earning_limits` CardDefinitionEarningLimitsInput — Points earning limits.
    - `global` CardDefinitionEarningLimitsGlobalInput, required — Global (per card) earning limits. When `type` is `NO_LIMIT`, `limits` must be empty or null; when `type` is `LIMITED`, `limits` must contain exactly 1 limit.
      - `type` 'NO_LIMIT' | 'LIMITED', required — Whether global earning limits apply.
      - `limits` CardDefinitionEarningLimitsGlobalLimitInput[], nullable — Limit definitions. Empty/null when `type` is `NO_LIMIT`; exactly 1 item required when `type` is `LIMITED`.
        - union — A global earning limit, discriminated by `type`: `BALANCE_BASED` (maximum card balance) or `TIME_BASED` (maximum points earned per period).
          - object — Balance-based limit - the card balance cannot exceed `max` points.
            - `type` 'BALANCE_BASED', required — Limit type.
            - `max` integer, required — Maximum card balance in points.
          - object — Time-based limit - at most `points.max` points can be earned per period.
            - `type` 'TIME_BASED', required — Limit type.
            - `period` CardDefinitionEarningLimitsGlobalTimeBasedPeriodInput, required — Time-based earning limit period. When `type` is `CURRENT_PERIOD` (the only allowed value), `current_period` is required.
              - …
            - `points` CardDefinitionEarningLimitsGlobalTimeBasedPointsInput, required — Points cap for the time-based earning limit.
              - …
    - `transactions` CardDefinitionEarningLimitsTransactionsInput, required — Per-transaction earning limits. When `type` is `NO_LIMIT`, `limits` must be empty or null; when `type` is `LIMITED`, `limits` must contain at least 1 limit. Each limit `type` may appear at most once in the array.
      - `type` 'NO_LIMIT' | 'LIMITED', required — Whether per-transaction earning limits apply.
      - `limits` CardDefinitionEarningLimitsTransactionsLimitInput[], nullable — Limit definitions with unique types. Empty/null when `type` is `NO_LIMIT`; at least 1 item required when `type` is `LIMITED`.
        - union — A per-transaction earning limit, discriminated by `type`: `POINTS` (maximum points earned per transaction) or `SPENDING` (minimum order amount required to earn points).
          - object — Points limit - at most `max` points can be earned in a single transaction.
            - `type` 'POINTS', required — Limit type.
            - `max` integer, required — Maximum points earned per transaction.
          - object — Spending threshold - points are only earned when the transaction amount is at least `min_amount`.
            - `type` 'SPENDING', required — Limit type.
            - `min_amount` integer, required — Minimum transaction amount required to earn points.
  - `spending_limits` CardDefinitionSpendingLimitsInput — Points spending limits.
    - `global` CardDefinitionSpendingLimitsGlobalInput, required — Global (per card) spending limits. When `type` is `NO_LIMIT`, `limits` must be empty or null; when `type` is `LIMITED`, `limits` must contain exactly 1 limit.
      - `type` 'NO_LIMIT' | 'LIMITED', required — Whether global spending limits apply.
      - `limits` CardDefinitionSpendingLimitsGlobalLimitInput[], nullable — Limit definitions. Empty/null when `type` is `NO_LIMIT`; exactly 1 item required when `type` is `LIMITED`.
        - union — A global spending limit, discriminated by `type`: `SPENDING_BASED` (total points spent) or `TIME_BASED` (points spent per period).
          - object — Spending-based limit - at most `max` points can be spent in total.
            - `type` 'SPENDING_BASED', required — Limit type.
            - `max` integer, required — Maximum total points spent.
          - object — Time-based limit - at most `points.max` points can be spent per period.
            - `type` 'TIME_BASED', required — Limit type.
            - `period` CardDefinitionSpendingLimitsGlobalTimeBasedPeriodInput, required — Time-based spending limit period. When `type` is `CURRENT_PERIOD` (the only allowed value), `current_period` is required.
              - …
            - `points` CardDefinitionSpendingLimitsGlobalTimeBasedPointsInput, required — Points cap for the time-based spending limit.
              - …
    - `transactions` CardDefinitionSpendingLimitsTransactionsInput, required — Per-transaction spending limits. When `type` is `NO_LIMIT`, `limits` must be empty or null; when `type` is `LIMITED`, `limits` must contain exactly 1 limit.
      - `type` 'NO_LIMIT' | 'LIMITED', required — Whether per-transaction spending limits apply.
      - `limits` CardDefinitionSpendingLimitsTransactionsLimitInput[], nullable — Limit definitions. Empty/null when `type` is `NO_LIMIT`; exactly 1 item required when `type` is `LIMITED`.
        - `type` 'POINTS', required — Limit type.
        - `max` integer, required — Maximum points spent per transaction.
  - `refunds` CardDefinitionRefundsInput — Refund handling configuration.
    - `spent_points` CardDefinitionRefundsSpentPointsInput, required — How points spent on a refunded order are handled. When `type` is `NONE`, `methods` must be empty or null; when `type` is `REFUNDABLE`, `methods` must contain exactly 1 method.
      - `type` 'NONE' | 'REFUNDABLE', required — Whether spent points are refundable.
      - `methods` CardDefinitionRefundsSpentPointsMethodInput[], nullable — Refund methods. Empty/null when `type` is `NONE`; exactly 1 item required when `type` is `REFUNDABLE`. Currently only one method is allowed.
        - `type` 'RETURN_POINTS', required — Refund method type.
        - `mode` 'REFUND_ALL' | 'REFUND_ITEM' | 'REFUND_AMOUNT', required — Refund mode: on full-order refund (`REFUND_ALL`), per-item refund (`REFUND_ITEM`) or amount-based refund (`REFUND_AMOUNT`).
    - `earned_points` CardDefinitionRefundsEarnedPointsInput, required — How points earned on a refunded order are handled. When `type` is `NONE`, `methods` must be empty or null; when `type` is `REFUNDABLE`, `methods` must contain exactly 1 method.
      - `type` 'NONE' | 'REFUNDABLE', required — Whether earned points are revocable on refund.
      - `methods` CardDefinitionRefundsEarnedPointsMethodInput[], nullable — Revoke methods. Empty/null when `type` is `NONE`; exactly 1 item required when `type` is `REFUNDABLE`.
        - union — An earned points revoke method, discriminated by `type`: `REVOKE_FROM_PENDING` (only valid when `pending_points.type` is `PERIOD_BASED`, `FIXED_DATES` or `EVENT_BASED`) or `REVOKE_FROM_BALANCE`.
          - object — Revoke earned points from pending points.
            - `type` 'REVOKE_FROM_PENDING', required — Revoke method type.
          - object — Revoke earned points from the card balance.
            - `type` 'REVOKE_FROM_BALANCE', required — Revoke method type.
            - `mode` 'REVOKE_TO_ZERO' | 'REVOKE_BELOW_ZERO', required — Revoke mode. `REVOKE_BELOW_ZERO` requires `balance_settings.allow_negative` to be `true`.
  - `balance_settings` CardDefinitionBalanceSettingsInput — Card balance settings. `allow_negative` can only be `true` when `points_expiration.type` is `NO_EXPIRATION`.
    - `allow_negative` boolean, required — Whether the card balance is allowed to go below zero.
  - `pay_with_points` union — Pay-with-points configuration, discriminated by `type`: `NO_PAYMENTS` (paying with points disabled) or `EXCHANGE_RATIO` (points can be exchanged for money using a formula).
    - object — Paying with points is disabled.
      - `type` 'NO_PAYMENTS', required — Pay-with-points type.
    - object — Points can be exchanged for money at the configured ratio.
      - `type` 'EXCHANGE_RATIO', required — Pay-with-points type.
      - `exchange_ratio` CardDefinitionPayWithPointsExchangeRatioInput, required — Exchange ratio used to convert points into money.
        - `formula` union, required — Exchange ratio formula. A string expression (1-2000 characters) or a number. Numbers are converted to strings server-side.
          - string
          - number
  - `metadata` object, nullable — Arbitrary key-value metadata attached to the card definition.

## Response `200`

The created card definition.

- CardDefinition — A card definition.
  - `id` string, required — Unique card definition ID.
  - `name` string, required — Card definition name.
  - `type` 'INDIVIDUAL', required — Card definition type.
  - `status` 'DRAFT' | 'ACTIVE' | 'DELETED', required — Current card definition status.
  - `code_config` CardDefinitionCodeConfig, required — Card code generation configuration. Always present with server-side defaults applied.
    - `pattern` string, required — Code pattern where each `#` is replaced with a random character from the charset.
    - `length` integer, required — Number of `#` placeholders in the pattern.
    - `charset` string, required — Characters used for code generation.
    - `prefix` string, required — Fixed prefix prepended to every generated code. Empty string when not set.
    - `postfix` string, required — Fixed postfix appended to every generated code. Empty string when not set.
  - `points_expiration` CardDefinitionPointsExpiration, required — Points expiration policy. Always present; defaults to `NO_EXPIRATION`.
    - `type` 'NO_EXPIRATION' | 'ROLLING_EXPIRATION' | 'CALENDAR_EXPIRATION' | 'SLIDING_EXPIRATION', required — Points expiration type.
    - `rolling_expiration` CardDefinitionPointsExpirationRollingExpiration — Rolling expiration configuration.
      - `period` CardDefinitionPeriod, required — A period expressed as a value and unit.
        - `value` integer, required — Period length.
        - `unit` 'DAY' | 'MONTH' | 'YEAR', required — Period unit.
      - `rounding` CardDefinitionPointsExpirationRollingExpirationRounding — Rounding of the rolling expiration date.
        - `type` 'END_OF_MONTH' | 'END_OF_QUARTER' | 'END_OF_HALF_YEAR' | 'END_OF_YEAR' | 'END_OF_PARTICULAR_MONTH', required — Rounding type.
        - `value` integer — Month number (1-12). Only present when `type` is `END_OF_PARTICULAR_MONTH`.
    - `calendar_expiration` CardDefinitionPointsExpirationCalendarExpiration — Calendar expiration configuration.
      - `expiration_dates` CardDefinitionCalendarDate[], required — Calendar dates on which points expire.
        - `day` integer, required — Day of the month.
        - `month` integer, required — Month number (1-12).
    - `sliding_expiration` CardDefinitionPointsExpirationSlidingExpiration — Sliding expiration configuration.
      - `earning_activity` boolean — Whether earning points resets the expiration window.
      - `spending_activity` boolean — Whether spending points resets the expiration window.
      - `custom_activity` boolean — Whether the configured custom events reset the expiration window.
      - `custom_activity_types` string[], required — Custom event schema IDs that reset the expiration window. Empty array when `custom_activity` is false.
      - `period` CardDefinitionPeriod, required — A period expressed as a value and unit.
        - `value` integer, required — Period length.
        - `unit` 'DAY' | 'MONTH' | 'YEAR', required — Period unit.
  - `pending_points` CardDefinitionPendingPoints, required — Pending points activation policy. Always present; defaults to `IMMEDIATE`.
    - `type` 'IMMEDIATE' | 'PERIOD_BASED' | 'FIXED_DATES' | 'EVENT_BASED', required — Pending points activation type.
    - `period_based` CardDefinitionPendingPointsPeriodBased — Period-based pending points activation.
      - `period` CardDefinitionPeriod, required — A period expressed as a value and unit.
        - `value` integer, required — Period length.
        - `unit` 'DAY' | 'MONTH' | 'YEAR', required — Period unit.
    - `fixed_dates` CardDefinitionPendingPointsFixedDates — Fixed-dates pending points activation.
      - `dates` CardDefinitionCalendarDate[], required — Calendar dates on which pending points activate.
        - `day` integer, required — Day of the month.
        - `month` integer, required — Month number (1-12).
    - `event_based` CardDefinitionPendingPointsEventBased — Event-based pending points activation.
      - `event_types` string[], required — Custom event schema IDs that activate pending points.
      - `cancel_period` CardDefinitionPeriod, required — A period expressed as a value and unit.
        - `value` integer, required — Period length.
        - `unit` 'DAY' | 'MONTH' | 'YEAR', required — Period unit.
  - `earning_limits` CardDefinitionEarningLimits, required — Points earning limits. Always present; defaults to `NO_LIMIT` for both scopes.
    - `global` CardDefinitionEarningLimitsGlobal — Global (per card) earning limits.
      - `type` 'NO_LIMIT' | 'LIMITED', required — Whether global earning limits apply.
      - `limits` CardDefinitionEarningLimitsGlobalLimit[], required — Limit definitions. Empty array when `type` is `NO_LIMIT`.
        - union — A global earning limit: `BALANCE_BASED` or `TIME_BASED`.
          - object — Balance-based limit.
            - `type` 'BALANCE_BASED', required — Limit type.
            - `max` integer, required — Maximum card balance in points.
          - object — Time-based limit.
            - `type` 'TIME_BASED', required — Limit type.
            - `period` CardDefinitionLimitTimeBasedPeriod — Time-based limit period.
              - …
            - `points` CardDefinitionLimitTimeBasedPoints — Points cap for a time-based limit.
              - …
    - `transactions` CardDefinitionEarningLimitsTransactions — Per-transaction earning limits.
      - `type` 'NO_LIMIT' | 'LIMITED', required — Whether per-transaction earning limits apply.
      - `limits` CardDefinitionEarningLimitsTransactionsLimit[], required — Limit definitions. Empty array when `type` is `NO_LIMIT`.
        - union — A per-transaction earning limit: `POINTS` or `SPENDING`.
          - object — Points limit.
            - `type` 'POINTS', required — Limit type.
            - `max` integer, required — Maximum points earned per transaction.
          - object — Spending threshold.
            - `type` 'SPENDING', required — Limit type.
            - `min_amount` integer, required — Minimum transaction amount required to earn points.
  - `spending_limits` CardDefinitionSpendingLimits, required — Points spending limits. Always present; defaults to `NO_LIMIT` for both scopes.
    - `global` CardDefinitionSpendingLimitsGlobal — Global (per card) spending limits.
      - `type` 'NO_LIMIT' | 'LIMITED', required — Whether global spending limits apply.
      - `limits` CardDefinitionSpendingLimitsGlobalLimit[], required — Limit definitions. Empty array when `type` is `NO_LIMIT`.
        - union — A global spending limit: `SPENDING_BASED` or `TIME_BASED`.
          - object — Spending-based limit.
            - `type` 'SPENDING_BASED', required — Limit type.
            - `max` integer, required — Maximum total points spent.
          - object — Time-based limit.
            - `type` 'TIME_BASED', required — Limit type.
            - `period` CardDefinitionLimitTimeBasedPeriod — Time-based limit period.
              - …
            - `points` CardDefinitionLimitTimeBasedPoints — Points cap for a time-based limit.
              - …
    - `transactions` CardDefinitionSpendingLimitsTransactions — Per-transaction spending limits.
      - `type` 'NO_LIMIT' | 'LIMITED', required — Whether per-transaction spending limits apply.
      - `limits` CardDefinitionSpendingLimitsTransactionsLimit[], required — Limit definitions. Empty array when `type` is `NO_LIMIT`.
        - `type` 'POINTS', required — Limit type.
        - `max` integer, required — Maximum points spent per transaction.
  - `refunds` CardDefinitionRefunds, required — Refund handling configuration. Always present; defaults to `NONE` for both scopes.
    - `spent_points` CardDefinitionRefundsSpentPoints, required — How points spent on a refunded order are handled.
      - `type` 'NONE' | 'REFUNDABLE', required — Whether spent points are refundable.
      - `methods` CardDefinitionRefundsSpentPointsMethod[], required — Refund methods. Empty array when `type` is `NONE`.
        - `type` 'RETURN_POINTS', required — Refund method type.
        - `mode` 'REFUND_ALL' | 'REFUND_ITEM' | 'REFUND_AMOUNT', required — Refund mode.
    - `earned_points` CardDefinitionRefundsEarnedPoints, required — How points earned on a refunded order are handled.
      - `type` 'NONE' | 'REFUNDABLE', required — Whether earned points are revocable on refund.
      - `methods` CardDefinitionRefundsEarnedPointsMethod[], required — Revoke methods. Empty array when `type` is `NONE`.
        - union — An earned points revoke method: `REVOKE_FROM_PENDING` or `REVOKE_FROM_BALANCE`.
          - object — Revoke earned points from pending points.
            - `type` 'REVOKE_FROM_PENDING', required — Revoke method type.
          - object — Revoke earned points from the card balance.
            - `type` 'REVOKE_FROM_BALANCE', required — Revoke method type.
            - `mode` 'REVOKE_TO_ZERO' | 'REVOKE_BELOW_ZERO', required — Revoke mode.
  - `balance_settings` CardDefinitionBalanceSettings, required — Card balance settings. Always present; defaults to `allow_negative: false`.
    - `allow_negative` boolean, required — Whether the card balance is allowed to go below zero.
  - `pay_with_points` CardDefinitionPayWithPoints, required — Pay-with-points configuration. Always present; defaults to `NO_PAYMENTS`.
    - `type` 'NO_PAYMENTS' | 'EXCHANGE_RATIO', required — Pay-with-points type.
    - `exchange_ratio` object — Exchange ratio. Only present when `type` is `EXCHANGE_RATIO`.
      - `formula` string, required — Exchange ratio formula (always returned as a string).
  - `metadata` object, required — Arbitrary key-value metadata. Empty object when not set.
  - `created_at` string, date-time, required — Creation timestamp (ISO 8601).
  - `updated_at` string, date-time, nullable, required — Last update timestamp (ISO 8601). Null when the card definition has never been updated.
  - `object` 'card_definition', required — Object type marker. Always `card_definition`.

## Other responses

- `400` — Validation error - the request body or query parameters are invalid.
- `404` — Resource not found
- `409` — Conflict - invalid state transition
- `500` — Internal server error

---

[API](https://skmtc.net/voucherifyio/apis/voucherify-loyalty-v2-api.md) · [All operations](https://skmtc.net/voucherifyio/apis/voucherify-loyalty-v2-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/voucherifyio/voucherify-loyalty-v2-api/revisions/f6f2f3388362/schema)
