{
  "openapi": "3.1.0",
  "info": {
    "title": "Cards API",
    "description": "The BVNK Cards API enables you to issue and manage virtual cards for your customers. You can create cards linked to BVNK wallets, manage card lifecycle (activate, freeze, cancel), set and update spend limits, retrieve sensitive card details securely, and handle card transactions and disputes.\n\nFor more information, see the [Cards](https://docs.bvnk.com/bvnk/use-cases/cards/cards) guide.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.sandbox.bvnk.com",
      "description": "Sandbox"
    },
    {
      "url": "https://api.bvnk.com",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Cards",
      "description": "Endpoints for creating and managing virtual cards. Cards are linked to BVNK wallets and support configurable spend limits, status management, and secure retrieval of sensitive card details (PAN, CVC)."
    },
    {
      "name": "Card Transactions",
      "description": "Endpoints for retrieving card transaction history. Each transaction includes its dispute eligibility. Transactions represent purchases, ATM withdrawals, and other card-based activities."
    },
    {
      "name": "Customers",
      "description": "Endpoints for checking customer eligibility status for card issuance."
    },
    {
      "name": "Transaction Simulations",
      "description": "Sandbox-only endpoints for simulating card transactions. Use these to test authorization, incremental authorization, reversal, settlement, and refund flows without real card network activity. Simulations are not supported for all cards. Only cards on certain card programs support simulations."
    }
  ],
  "paths": {
    "/card/v1/cards": {
      "post": {
        "tags": [
          "Cards"
        ],
        "summary": "Create card",
        "description": "Creates a new virtual card linked to a specified BVNK wallet. The card is issued in a `CREATED` state. Shortly after, the asynchronous issuing process starts and the card transitions to `PENDING`. The outcome is either `ACTIVE` (card ready to use) or `CANCELLED` (issuance failed).\n\nYou must specify the ledger configuration to determine which wallet funds the card:\n\n- `BVNK_EPC_WALLET`: tied to a customer reference. Only one active card is allowed per customer with this wallet type.\n\nThe customer must pass eligibility requirements before a card can be issued. Use the [Check eligibility status](/bvnk/api-explorer/cards/get-eligibility-status/) endpoint to verify eligibility.",
        "operationId": "createCard",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardCreationRequest"
              },
              "examples": {
                "Create card with customer's wallet": {
                  "summary": "Create a USDC card linked to an EPC wallet",
                  "description": "Use case: Issue a single virtual card for an EPC wallet customer with a monthly spend limit.",
                  "value": {
                    "reference": "card-ref-002",
                    "ledger": {
                      "type": "BVNK_EPC_WALLET",
                      "mainWalletId": "acc:00001919109000:xKpL0:0"
                    },
                    "assetCode": "USDC",
                    "limit": {
                      "type": "MONTHLY",
                      "value": 5000
                    },
                    "customerId": "0000771c-8bff-4660-9706-497b0f8bf0e3",
                    "cardArt": "cool-art-42"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Card creation accepted and is being processed asynchronously. The card is in `CREATED` state and will transition to `ACTIVE` once provisioning is complete.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardView"
                },
                "examples": {
                  "Created card": {
                    "summary": "Newly created card response",
                    "value": {
                      "id": "0000f86a-f5a2-487e-becd-59364f69b798",
                      "customerId": "0000771c-8bff-4660-9706-497b0f8bf0e3",
                      "assetCode": "USDC",
                      "last4Digits": "4829",
                      "status": "CREATED",
                      "createdAt": "2024-03-15T10:30:00Z",
                      "updatedAt": "2024-03-15T10:30:00Z",
                      "expiresAt": "2027-03",
                      "ledger": {
                        "id": "acc:00001919109000:xKpL0:0",
                        "type": "BVNK_EPC_WALLET"
                      },
                      "limit": {
                        "configured": {
                          "type": "DAILY",
                          "value": 1000
                        },
                        "available": 1000,
                        "nextResetAt": "2024-03-16T00:00:00Z"
                      },
                      "provisionedWallets": [],
                      "audit": [],
                      "cardArt": "cool-art-42"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. The request body is invalid, the customer has not completed eligibility requirements, or the wallet configuration is incorrect.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "examples": {
                  "Invalid request": {
                    "summary": "Missing required fields",
                    "value": {
                      "code": "VALIDATION_ERROR",
                      "traceId": "abc123def456",
                      "status": "BAD_REQUEST",
                      "message": "Validation failed: assetCode must not be blank",
                      "details": {
                        "errors": {
                          "assetCode": ["must not be blank"]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Cards"
        ],
        "summary": "List cards",
        "description": "Retrieves a paginated list of cards for the authenticated tenant. Use the query parameter to filter cards by customer ID, status, or card ID.\n\nThe query uses a [Lucene-like query syntax](https://lucene.apache.org/core/2_9_4/queryparsersyntax.html).\n\n**Note:** Field names in the `q` search expression are case-sensitive. If you use a field that is not recognised, it is ignored.",
        "operationId": "getCards",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Search query in Lucene-like format. Multiple properties can be combined with a space separator.\n\nSupported filter properties:\n- `customerId`: filter by customer UUID.\n- `status`: filter by card status (`ACTIVE`, `FROZEN`).\n- `cardId`: filter by specific card UUID.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "customerId:0000771c-8bff-4660-9706-497b0f8bf0e3 status:ACTIVE"
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "Zero-based page number for pagination. The first page is `0`. Defaults to `0` if not provided.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0,
              "minimum": 0
            },
            "example": 0
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Number of items to return per page. Defaults to `50` if not provided.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50,
              "maximum": 500,
              "minimum": 1
            },
            "example": 50
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the list of cards matching the query criteria.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResultCardView"
                },
                "examples": {
                  "Cards list": {
                    "summary": "List of active cards for a customer",
                    "value": {
                      "content": [
                        {
                          "id": "123e4567-e89b-12d3-a456-426614174000",
                          "customerId": "4f2a76a4-0954-4999-b555-f9f2bec78c50",
                          "assetCode": "USDC",
                          "last4Digits": "4829",
                          "status": "ACTIVE",
                          "createdAt": "2024-03-15T10:30:00Z",
                          "updatedAt": "2024-03-15T12:00:00Z",
                          "expiresAt": "2027-03",
                          "ledger": {
                            "id": "acc:22101919109000:xKpL3:0",
                            "type": "BVNK_EPC_WALLET"
                          },
                          "limit": {
                            "configured": {
                              "type": "DAILY",
                              "value": 1000
                            },
                            "available": 750.50,
                            "nextResetAt": "2024-03-16T00:00:00Z"
                          },
                          "cardTransactionStats": {
                            "latestAuthorizedAt": "2024-03-15T14:22:00Z"
                          },
                          "provisionedWallets": [
                            {
                              "walletProvider": "APPLE_PAY",
                              "provisionedAt": "2024-03-15T11:00:00Z"
                            }
                          ],
                          "audit": [
                            {
                              "id": "a1b2c3d4-5678-90ab-cdef-111222333444",
                              "metadata": {
                                "type": "STATUS_CHANGE",
                                "newStatus": "ACTIVE"
                              },
                              "reason": "Card activated after provisioning",
                              "actorName": "System",
                              "actorType": "SYSTEM",
                              "createdAt": "2024-03-15T10:35:00Z"
                            }
                          ],
                          "cardArt": "cool-art-42"
                        }
                      ],
                      "pageable": {
                        "pageNumber": 0,
                        "pageSize": 50
                      },
                      "totalElements": 1,
                      "totalPages": 1,
                      "hasNext": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. The query syntax is invalid or pagination parameters are out of range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/card/v1/cards/{id}": {
      "get": {
        "tags": [
          "Cards"
        ],
        "summary": "Get card",
        "description": "Retrieves the details of a single card by its unique identifier. The response includes the card's current status, spend limit configuration, available limit, ledger information, audit history, and any provisioned digital wallets (Apple Pay, Google Pay).",
        "operationId": "getCard",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique identifier (UUID) of the card to retrieve.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "0000f86a-f5a2-487e-becd-59364f69b798"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved card details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardView"
                },
                "examples": {
                  "Active card": {
                    "summary": "An active card with spend limit",
                    "value": {
                      "id": "0000f86a-f5a2-487e-becd-59364f69b798",
                      "customerId": "0000771c-8bff-4660-9706-497b0f8bf0e3",
                      "assetCode": "USDC",
                      "last4Digits": "4829",
                      "status": "ACTIVE",
                      "createdAt": "2024-03-15T10:30:00Z",
                      "updatedAt": "2024-03-15T12:00:00Z",
                      "expiresAt": "2027-03",
                      "ledger": {
                        "id": "acc:00001919109000:wYzI0:0",
                        "type": "BVNK_EPC_WALLET"
                      },
                      "limit": {
                        "configured": {
                          "type": "DAILY",
                          "value": 1000
                        },
                        "available": 750.50,
                        "nextResetAt": "2024-03-16T00:00:00Z"
                      },
                      "cardTransactionStats": {
                        "latestAuthorizedAt": "2024-03-15T14:22:00Z"
                      },
                      "provisionedWallets": [
                        {
                          "walletProvider": "APPLE_PAY",
                          "provisionedAt": "2024-03-15T11:00:00Z"
                        }
                      ],
                      "audit": [
                        {
                          "id": "0000ca00-0f12-47a9-a20c-83dc85a0bbea",
                          "metadata": {
                            "type": "STATUS_CHANGE",
                            "newStatus": "ACTIVE"
                          },
                          "reason": "Card activated after provisioning",
                          "actorName": "System",
                          "actorType": "SYSTEM",
                          "createdAt": "2024-03-15T10:35:00Z"
                        }
                      ],
                      "cardArt": "cool-art-42"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. You do not have permission to access this card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Card not found. No card exists with the specified ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/card/v1/cards/{id}/actions": {
      "post": {
        "tags": [
          "Cards"
        ],
        "summary": "Perform card action",
        "description": "Performs a state-changing action on an existing card. The `type` field in the request body selects the action:\n\n- `STATUS_CHANGE`: freezes, unfreezes, or cancels the card. Supported transitions are `ACTIVE` → `FROZEN` (temporarily freeze the card), `FROZEN` → `ACTIVE` (unfreeze a frozen card), and `CANCELLED` (permanently cancel the card). Cancellation is irreversible: once cancelled, the card cannot be reactivated. New authorizations are declined, but transactions authorized before cancellation settle normally.\n- `LIMIT_ADJUSTMENT`: replaces the card's spend limit. The new limit takes effect immediately and doesn't change the wallet balance. The card's available limit (`limit.available`), which is the amount left to spend in the current limit period, is recalculated against the new limit. If the limit type changes, for example from `DAILY` to `MONTHLY`, the available limit is calculated for the new period. If the new limit is lower than the amount already spent in the current period, the available limit is zero until the next reset.\n- `RENEWAL`: issues a replacement card from a `CANCELLED` or `EXPIRED` card's configuration. The new card starts in `CREATED` state with the same wallet, asset code, and customer as the original. Renewal is processed asynchronously and returns `202 Accepted`.",
        "operationId": "performCardAction",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique identifier (UUID) of the card to perform the action on.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "0000f86a-f5a2-487e-becd-59364f69b798"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardActionRequest"
              },
              "examples": {
                "Freeze card": {
                  "summary": "Temporarily freeze a card",
                  "description": "Use case: Customer requests a temporary freeze on their card while they investigate a suspicious transaction.",
                  "value": {
                    "type": "STATUS_CHANGE",
                    "newStatus": "FROZEN",
                    "reason": "Customer-requested freeze pending transaction review"
                  }
                },
                "Unfreeze card": {
                  "summary": "Reactivate a frozen card",
                  "description": "Use case: Customer confirms all transactions are legitimate and requests reactivation.",
                  "value": {
                    "type": "STATUS_CHANGE",
                    "newStatus": "ACTIVE",
                    "reason": "Customer confirmed all transactions, unfreezing card"
                  }
                },
                "Cancel card": {
                  "summary": "Permanently cancel a card",
                  "description": "Use case: Customer reports their card as lost or compromised.",
                  "value": {
                    "type": "STATUS_CHANGE",
                    "newStatus": "CANCELLED",
                    "reason": "Customer reported the card as compromised"
                  }
                },
                "Set daily limit": {
                  "summary": "Set a daily spend limit of $500",
                  "description": "Use case: Restrict the card to $500 per day for expense management.",
                  "value": {
                    "type": "LIMIT_ADJUSTMENT",
                    "limit": {
                      "type": "DAILY",
                      "value": 500
                    }
                  }
                },
                "Set monthly limit": {
                  "summary": "Set a monthly spend limit of $5,000",
                  "description": "Use case: Corporate card with a monthly budget allocation.",
                  "value": {
                    "type": "LIMIT_ADJUSTMENT",
                    "limit": {
                      "type": "MONTHLY",
                      "value": 5000
                    }
                  }
                },
                "Set per-transaction limit": {
                  "summary": "Set a per-transaction limit of $200",
                  "description": "Use case: Prevent large individual purchases while allowing cumulative spending.",
                  "value": {
                    "type": "LIMIT_ADJUSTMENT",
                    "limit": {
                      "type": "TRANSACTION",
                      "value": 200
                    }
                  }
                },
                "Renew card": {
                  "summary": "Issue a replacement for a cancelled or expired card",
                  "description": "Use case: Customer needs a new card after the original was cancelled or expired.",
                  "value": {
                    "type": "RENEWAL"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status change or limit adjustment applied. The response contains the updated card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardView"
                }
              }
            }
          },
          "202": {
            "description": "Renewal accepted and is being processed asynchronously. The response contains the new replacement card, which inherits the configuration of the original card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardView"
                },
                "examples": {
                  "Renewed card": {
                    "summary": "Newly issued replacement card",
                    "value": {
                      "id": "0000f0ab-f4f7-4816-85fd-82dd2f013f13",
                      "customerId": "0000771c-8bff-4660-9706-497b0f8bf0e3",
                      "assetCode": "USDC",
                      "last4Digits": "7291",
                      "status": "CREATED",
                      "createdAt": "2024-06-01T09:00:00Z",
                      "updatedAt": "2024-06-01T09:00:00Z",
                      "expiresAt": "2027-06",
                      "ledger": {
                        "id": "acc:00001919109000:wYzI0:0",
                        "type": "BVNK_EPC_WALLET"
                      },
                      "limit": {
                        "configured": {
                          "type": "DAILY",
                          "value": 1000
                        },
                        "available": 1000,
                        "nextResetAt": "2024-06-02T00:00:00Z"
                      },
                      "provisionedWallets": [],
                      "audit": [],
                      "cardArt": "cool-art-42"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. The action is not allowed for the card's current state: for example, the status transition is not supported, the card is already cancelled, the limit value is invalid, or the card being renewed is not `CANCELLED` or `EXPIRED`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. You do not have permission to perform actions on this card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Card not found. No card exists with the specified ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/card/v1/reveal-sessions": {
      "post": {
        "tags": [
          "Cards"
        ],
        "summary": "Create reveal session",
        "description": "Creates a reveal session: a one-time, short-lived token that you use to retrieve encrypted sensitive card details. This is the first step in the two-step sensitive card details flow.\n\nValidates that the card belongs to the specified customer and that the caller has permission to access the card. The returned token is exchanged via the BVNK Cards SDK to display card details securely.\n\nThis endpoint requires a Hawk API key.",
        "operationId": "createRevealSession",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevealSessionRequest"
              },
              "examples": {
                "Request token": {
                  "summary": "Request a one-time token for card details",
                  "value": {
                    "cardId": "0000f86a-f5a2-487e-becd-59364f69b798",
                    "customerId": "0000771c-8bff-4660-9706-497b0f8bf0e3"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reveal session created. Use the one-time token with the Preview sensitive card details endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevealSessionResponse"
                },
                "examples": {
                  "Token response": {
                    "summary": "One-time token issued",
                    "value": {
                      "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
                      "tokenType": "Bearer",
                      "expiresIn": 60
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. The card does not belong to the specified customer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The caller does not have permission to access this card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Card not found. No card exists with the specified ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/card/v1/transactions": {
      "get": {
        "tags": [
          "Card Transactions"
        ],
        "summary": "List card transactions",
        "description": "Retrieves a paginated list of card transactions for the authenticated tenant. A date range is required in the query.\n\nThe query uses a Lucene-like format.",
        "operationId": "getCardTransactions",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Search query in Lucene-like format. A date range (`fromTimestamp` and `toTimestamp`) is required. Supported filter properties:\n- `fromTimestamp`: start of the date range (required, ISO 8601 format)\n- `toTimestamp`: end of the date range (required, ISO 8601 format)\n- `customerId`: filter by customer UUID\n- `cardId`: filter by card UUID\n- `transactionId`: filter by transaction UUID\n- `status`: filter by transaction status (`PENDING`, `AUTHORIZED`, `SETTLED`, `DECLINED`, `CANCELLED`)\n- `view`: controls level of detail in the response. `BASIC` (default) returns standard transaction data.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "fromTimestamp:2024-01-01T00:00:00Z toTimestamp:2024-03-31T23:59:59Z status:AUTHORIZED cardId:0000f86a-f5a2-487e-becd-59364f69b798"
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "Zero-based page number for pagination. The first page is `0`. Defaults to `0` if not provided.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0,
              "minimum": 0
            },
            "example": 0
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Number of items to return per page. Defaults to `50` if not provided.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50,
              "maximum": 500,
              "minimum": 1
            },
            "example": 50
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved card transactions matching the query criteria.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResultCardTransactionView"
                },
                "examples": {
                  "Transaction list": {
                    "summary": "List of card transactions",
                    "value": {
                      "content": [
                        {
                          "id": "550e8400-e29b-41d4-a716-446655440000",
                          "cardProviderTransactionId": "550e8400e29b41d4a716446655440011",
                          "cardId": "123e4567-e89b-12d3-a456-426614174000",
                          "cardNumberLast4Digits": "4829",
                          "authorizedAmount": 45.99,
                          "settledAmount": 45.99,
                          "asset": "USDC",
                          "status": "SETTLED",
                          "createdAt": "2024-03-15T14:22:00Z",
                          "updatedAt": "2024-03-16T08:00:00Z",
                          "metadata": {
                            "merchantName": "Amazon.com",
                            "merchantCategory": "Online Shopping",
                            "merchantCategoryCode": "5411",
                            "merchantCity": "Seattle",
                            "merchantCountry": "US",
                            "localCurrency": "USD",
                            "localAmount": 45.99,
                            "usdAmount": 45.99
                          },
                          "disputeEligibility": {
                            "eligible": true
                          }
                        }
                      ],
                      "pageable": {
                        "pageNumber": 0,
                        "pageSize": 50
                      },
                      "totalElements": 1,
                      "totalPages": 1,
                      "hasNext": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. The query is missing the required date range, contains invalid syntax, or pagination parameters are out of range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/card/v1/transactions/{cardTransactionId}": {
      "get": {
        "tags": [
          "Card Transactions"
        ],
        "summary": "Get card transaction",
        "description": "Retrieves the full details of a single card transaction by its unique identifier. The response includes transaction amounts, merchant metadata, settlement status, and dispute eligibility.",
        "operationId": "getCardTransaction",
        "parameters": [
          {
            "name": "cardTransactionId",
            "in": "path",
            "description": "Unique identifier (UUID) of the card transaction to retrieve.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "0000c50a-1dd1-4e15-8501-db278886d81a"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved card transaction details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardTransactionView"
                },
                "examples": {
                  "Settled transaction": {
                    "summary": "A settled card transaction at a merchant",
                    "value": {
                      "id": "0000c50a-1dd1-4e15-8501-db278886d81a",
                      "cardProviderTransactionId": "550e8400e29b41d4a716446655440011",
                      "cardId": "0000f86a-f5a2-487e-becd-59364f69b798",
                      "cardNumberLast4Digits": "4829",
                      "authorizedAmount": 120.00,
                      "settledAmount": 118.50,
                      "authorizedAmountHistory": [
                        {
                          "amount": 100.00,
                          "changedAt": "2024-03-10T09:15:00Z"
                        },
                        {
                          "amount": 120.00,
                          "changedAt": "2024-03-10T09:40:00Z"
                        }
                      ],
                      "asset": "USDC",
                      "status": "SETTLED",
                      "createdAt": "2024-03-10T09:15:00Z",
                      "updatedAt": "2024-03-11T06:00:00Z",
                      "metadata": {
                        "merchantName": "Uber Technologies",
                        "merchantCategory": "Transportation",
                        "merchantCategoryCode": "4121",
                        "merchantCity": "San Francisco",
                        "merchantCountry": "US",
                        "localCurrency": "USD",
                        "localAmount": 118.50,
                        "usdAmount": 118.50
                      },
                      "tokenizationWallet": "Apple Pay",
                      "reportData": {
                        "interchangeAmount": 0.025,
                        "fxFee": 0,
                        "isThreeDSecureTransaction": false,
                        "isInternationalTransaction": false
                      },
                      "disputeEligibility": {
                        "eligible": true
                      }
                    }
                  },
                  "Declined transaction": {
                    "summary": "A declined card transaction",
                    "value": {
                      "id": "0000c50a-1dd1-4e15-8501-db278886d81a",
                      "cardProviderTransactionId": "660f9500f39c52e5b827557766551100",
                      "cardId": "0000f86a-f5a2-487e-becd-59364f69b798",
                      "cardNumberLast4Digits": "4829",
                      "authorizedAmount": 2500.00,
                      "asset": "USDC",
                      "status": "DECLINED",
                      "createdAt": "2024-03-12T16:45:00Z",
                      "updatedAt": "2024-03-12T16:45:00Z",
                      "metadata": {
                        "merchantName": "Luxury Store",
                        "merchantCategory": "Retail",
                        "merchantCategoryCode": "5944",
                        "merchantCity": "London",
                        "merchantCountry": "GB",
                        "localCurrency": "GBP",
                        "localAmount": 1980.00,
                        "usdAmount": 2500.00
                      },
                      "formattedDeclineReason": "The transaction amount exceeds your available balance."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Card transaction not found. No transaction exists with the specified ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/card/v1/customer-eligibility-status": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Check eligibility status",
        "description": "Checks whether a customer meets all eligibility requirements for card issuance. Returns a list of any outstanding requirements that must be fulfilled before a card can be created.\n\nRequirements are categorized as:\n- `REQUIRED_DATA`: mandatory customer data is missing, for example, address, date of birth\n- `UNSUPPORTED_VALUE`: a provided value is not supported for card issuance, for example, unsupported country\n\nWhen the `eligible` field is `true` and the `requirements` array is empty, the customer is eligible for card issuance.\n\nThis endpoint requires a Hawk API key.",
        "operationId": "getEligibilityStatus",
        "parameters": [
          {
            "name": "ledgerType",
            "in": "query",
            "description": "Ledger type to determine the KYC provider for eligibility checking.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "BVNK_EPC_WALLET"
              ]
            },
            "example": "BVNK_EPC_WALLET"
          },
          {
            "name": "customerId",
            "in": "query",
            "description": "Customer UUID identifier. Identifies the customer whose eligibility to check.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "0000771c-8bff-4660-9706-497b0f8bf0e3"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved eligibility status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerEligibilityStatusResponse"
                },
                "examples": {
                  "Eligible": {
                    "summary": "Customer has completed all eligibility requirements",
                    "value": {
                      "customerId": "0000771c-8bff-4660-9706-497b0f8bf0e3",
                      "requirements": [],
                      "eligible": true
                    }
                  },
                  "Not eligible - missing data": {
                    "summary": "Customer has outstanding requirements",
                    "value": {
                      "customerId": "0000771c-8bff-4660-9706-497b0f8bf0e3",
                      "requirements": [
                        {
                          "type": "REQUIRED_DATA",
                          "key": "customer.address.line1",
                          "label": "Address Line 1",
                          "description": "Customer's residential address is required for card issuance"
                        },
                        {
                          "type": "REQUIRED_DATA",
                          "key": "customer.dateOfBirth",
                          "label": "Date of Birth",
                          "description": "Customer's date of birth is required for identity verification"
                        }
                      ],
                      "eligible": false
                    }
                  },
                  "Not eligible - unsupported value": {
                    "summary": "Customer has an unsupported value",
                    "value": {
                      "customerId": "0000771c-8bff-4660-9706-497b0f8bf0e3",
                      "requirements": [
                        {
                          "type": "UNSUPPORTED_VALUE",
                          "key": "customer.address.country",
                          "label": "Country",
                          "description": "Card issuance is not supported for the customer's country of residence"
                        }
                      ],
                      "eligible": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. The `ledgerType` parameter is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Customer ID could not be determined from the authentication context. Ensure you provide the `customerId` parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found. No customer exists with the specified ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/card/v1/simulated-authorizations": {
      "post": {
        "tags": [
          "Transaction Simulations"
        ],
        "summary": "Simulate authorization",
        "description": "Create a simulated card authorization transaction for testing purposes. Only available in the sandbox environment.\n\nSpecify the card, amount, and currency to simulate an authorization. Optionally include merchant details and a `declineReason` to test decline scenarios.\n\nSimulations are not supported for all cards. Only cards on certain card programs support simulations.",
        "operationId": "simulateAuthorization",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuthorizationSimulationRequest"
              },
              "examples": {
                "Successful authorization": {
                  "summary": "Simulate a successful card authorization",
                  "value": {
                    "cardId": "0000f86a-f5a2-487e-becd-59364f69b798",
                    "amount": 50.0,
                    "currency": "USDC",
                    "merchantName": "The Daily Grind",
                    "merchantCategoryCode": "5812"
                  }
                },
                "Declined authorization": {
                  "summary": "Simulate a declined authorization",
                  "value": {
                    "cardId": "0000f86a-f5a2-487e-becd-59364f69b798",
                    "amount": 10000.0,
                    "currency": "USDC",
                    "merchantName": "Luxury Store",
                    "merchantCategoryCode": "5944",
                    "declineReason": "Insufficient funds"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Authorization simulation created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulatedTransactionResponse"
                },
                "examples": {
                  "Authorized": {
                    "summary": "Successful authorization",
                    "value": {
                      "id": "0000c50a-1dd1-4e15-8501-db278886d81a",
                      "status": "AUTHORIZED"
                    }
                  },
                  "Declined": {
                    "summary": "Declined authorization",
                    "value": {
                      "id": "0000c50a-1dd1-4e15-8501-db278886d81a",
                      "status": "DECLINED",
                      "declineReason": "Insufficient funds"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or simulation not supported for this card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Card does not belong to the authenticated tenant, account, or customer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Card not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/card/v1/simulated-incremental-authorizations": {
      "post": {
        "tags": [
          "Transaction Simulations"
        ],
        "summary": "Simulate incremental authorization",
        "description": "Changes the authorized amount of a previously simulated authorization, as happens when a merchant adjusts a hold (for example, a hotel or fuel pre-authorization). Only available in the sandbox environment.\n\nSet `amount` to the new total authorized amount.\n\nSimulations are not supported for all cards. Only cards on certain card programs support simulations.",
        "operationId": "simulateIncrementalAuthorization",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IncrementalAuthorizationSimulationRequest"
              },
              "examples": {
                "Increase authorized amount": {
                  "summary": "Increase the authorized amount to 75.00",
                  "value": {
                    "transactionId": "0000c50a-1dd1-4e15-8501-db278886d81a",
                    "amount": 75.0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Incremental authorization simulated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulatedTransactionResponse"
                },
                "examples": {
                  "Authorized": {
                    "summary": "Authorization updated",
                    "value": {
                      "id": "0000c50a-1dd1-4e15-8501-db278886d81a",
                      "status": "AUTHORIZED"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, simulation not supported, or the transaction is not in a state that allows this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Card does not belong to the authenticated tenant, account, or customer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Transaction not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/card/v1/simulated-reversals": {
      "post": {
        "tags": [
          "Transaction Simulations"
        ],
        "summary": "Simulate reversal",
        "description": "Reverses a previously simulated authorization, as happens when a merchant releases a hold. Only available in the sandbox environment.\n\nSimulations are not supported for all cards. Only cards on certain card programs support simulations.",
        "operationId": "simulateReversal",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReversalSimulationRequest"
              },
              "examples": {
                "Reverse": {
                  "summary": "Reverse an authorization",
                  "value": {
                    "transactionId": "0000c50a-1dd1-4e15-8501-db278886d81a"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Reversal simulated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulatedTransactionResponse"
                },
                "examples": {
                  "Reversed": {
                    "summary": "Transaction reversed",
                    "value": {
                      "id": "0000c50a-1dd1-4e15-8501-db278886d81a",
                      "status": "CANCELLED",
                      "completionReason": "Authorization reversed"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, simulation not supported, or the transaction is not in a state that allows this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Card does not belong to the authenticated tenant, account, or customer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Transaction not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/card/v1/simulated-settlements": {
      "post": {
        "tags": [
          "Transaction Simulations"
        ],
        "summary": "Simulate settlement",
        "description": "Settles a previously simulated authorization. Only available in the sandbox environment.\n\nOmit `amount` to settle at the authorized amount, or set a lower amount to simulate a partial settlement.\n\nSimulations are not supported for all cards. Only cards on certain card programs support simulations.",
        "operationId": "simulateSettlement",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettlementSimulationRequest"
              },
              "examples": {
                "Settle at full amount": {
                  "summary": "Settle a transaction at the authorized amount",
                  "value": {
                    "transactionId": "0000c50a-1dd1-4e15-8501-db278886d81a"
                  }
                },
                "Partial settlement": {
                  "summary": "Settle at a lower amount (partial settlement)",
                  "value": {
                    "transactionId": "0000c50a-1dd1-4e15-8501-db278886d81a",
                    "amount": 40.0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Settlement simulated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulatedTransactionResponse"
                },
                "examples": {
                  "Settled": {
                    "summary": "Transaction settled",
                    "value": {
                      "id": "0000c50a-1dd1-4e15-8501-db278886d81a",
                      "status": "SETTLED",
                      "completionReason": "Transaction settled successfully"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, simulation not supported, or the transaction is not in a state that allows this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Card does not belong to the authenticated tenant, account, or customer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Transaction not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/card/v1/simulated-refunds": {
      "post": {
        "tags": [
          "Transaction Simulations"
        ],
        "summary": "Simulate refund",
        "description": "Refunds a previously simulated settled transaction. Only available in the sandbox environment.\n\nSimulations are not supported for all cards. Only cards on certain card programs support simulations.",
        "operationId": "simulateRefund",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefundSimulationRequest"
              },
              "examples": {
                "Refund": {
                  "summary": "Refund a settled transaction",
                  "value": {
                    "transactionId": "0000c50a-1dd1-4e15-8501-db278886d81a"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Refund simulated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulatedTransactionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, simulation not supported, or the transaction is not in a state that allows this action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Card does not belong to the authenticated tenant, account, or customer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Transaction not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CardCreationRequest": {
        "type": "object",
        "description": "Request body for creating a new virtual card. Includes wallet configuration, asset code, optional spend limits, and customer identification.",
        "properties": {
          "reference": {
            "type": "string",
            "description": "Your unique reference for this card. Use this to correlate the card with records in your system.",
            "minLength": 8,
            "maxLength": 128,
            "example": "card-ref-001"
          },
          "ledger": {
            "description": "Wallet configuration that determines how the card is funded.",
            "$ref": "#/components/schemas/BvnkEpcWallet"
          },
          "assetCode": {
            "type": "string",
            "description": "The currency code for the card. This determines the card's denomination and the currency used for spend limits.",
            "example": "USDC"
          },
          "limit": {
            "$ref": "#/components/schemas/SpendLimit",
            "description": "Optional spend limit configuration. If not provided, the card has no spend limit beyond the available wallet balance."
          },
          "customerId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier (UUID) of the customer you are issuing the card to.",
            "example": "0000771c-8bff-4660-9706-497b0f8bf0e3"
          },
          "cardArt": {
            "type": "string",
            "description": "Identifier for the virtual card art design to apply to this card. The value must match an art option approved and enabled for your program. If not provided, the default card art is used. To get your card art identifiers, submit your designs to BVNK for approval. Once approved, BVNK provides the identifier to use here.",
            "example": "cool-art-42"
          }
        },
        "required": [
          "assetCode",
          "customerId",
          "ledger",
          "reference"
        ]
      },
      "BvnkEpcWallet": {
        "title": "EPC Wallet",
        "type": "object",
        "description": "BVNK EPC Wallet configuration. Cards are tied to a customer reference. Only one active card is allowed per customer with this wallet type.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The wallet type identifier.",
            "enum": [
              "BVNK_EPC_WALLET"
            ],
            "example": "BVNK_EPC_WALLET"
          },
          "mainWalletId": {
            "type": "string",
            "description": "The main wallet ID that funds the card.",
            "example": "acc:00001919109000:wYzI0:0"
          }
        },
        "required": [
          "type",
          "mainWalletId"
        ]
      },
      "SpendLimit": {
        "type": "object",
        "description": "Configures the maximum spending allowed on a card within a given period. When the limit is reached, further transactions are declined until the limit resets.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The time period over which the spend limit applies. `TRANSACTION` applies per individual transaction rather than a rolling period.",
            "enum": [
              "DAILY",
              "MONTHLY",
              "YEARLY",
              "TRANSACTION"
            ],
            "example": "DAILY"
          },
          "value": {
            "type": "number",
            "description": "The maximum amount (in the card's asset currency) allowed within the limit period. Must be a positive number.",
            "example": 1000,
            "minimum": 0
          }
        },
        "required": [
          "type",
          "value"
        ]
      },
      "CardView": {
        "type": "object",
        "description": "Represents a virtual card with its current configuration, status, and associated metadata.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the card.",
            "example": "0000f86a-f5a2-487e-becd-59364f69b798"
          },
          "customerId": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the customer who owns this card.",
            "example": "0000771c-8bff-4660-9706-497b0f8bf0e3"
          },
          "assetCode": {
            "type": "string",
            "description": "The currency code of the card.",
            "example": "USDC"
          },
          "last4Digits": {
            "type": "string",
            "description": "The last 4 digits of the card number, used for display purposes.",
            "example": "4829"
          },
          "status": {
            "type": "string",
            "description": "The current lifecycle status of the card.\n- `CREATED` — card has been issued but not yet activated\n- `PENDING` — card is being provisioned by the card provider\n- `ACTIVE` — card is active and can be used for transactions\n- `FROZEN` — card is temporarily frozen (e.g., by customer request)\n- `BLOCKED` — card is blocked (e.g., suspected fraud)\n- `CANCELLED` — card has been permanently cancelled\n- `EXPIRED` — card has passed its expiration date",
            "enum": [
              "CREATED",
              "PENDING",
              "ACTIVE",
              "FROZEN",
              "BLOCKED",
              "CANCELLED",
              "EXPIRED"
            ],
            "example": "ACTIVE"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp (ISO 8601) when the card was created.",
            "example": "2024-03-15T10:30:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp (ISO 8601) when the card was last updated.",
            "example": "2024-03-15T12:00:00Z"
          },
          "expiresAt": {
            "type": "string",
            "description": "The card's expiration date in `YYYY-MM` format.",
            "example": "2027-03"
          },
          "ledger": {
            "$ref": "#/components/schemas/LedgerView",
            "description": "Ledger information associated with the card, identifying the wallet that funds it."
          },
          "limit": {
            "$ref": "#/components/schemas/LimitView",
            "description": "The card's spend limit configuration, including the configured limit, the available limit (the amount left to spend in the current period), and the next reset time."
          },
          "cardTransactionStats": {
            "$ref": "#/components/schemas/CardTransactionStats",
            "description": "Aggregated transaction statistics for the card."
          },
          "provisionedWallets": {
            "type": "array",
            "description": "List of digital wallets (Apple Pay, Google Pay) where this card has been provisioned.",
            "items": {
              "$ref": "#/components/schemas/ProvisionedWalletView"
            }
          },
          "audit": {
            "type": "array",
            "description": "Audit history for the card, ordered by creation time (newest first). Contains records of status changes and limit updates.",
            "items": {
              "$ref": "#/components/schemas/CardAuditView"
            }
          },
          "cardArt": {
            "type": "string",
            "description": "The virtual card art identifier applied to this card. Returns the art identifier that was set during card creation, and is omitted if the default program art is used.",
            "example": "cool-art-42"
          }
        }
      },
      "LedgerView": {
        "type": "object",
        "description": "Ledger information identifying the wallet associated with a card.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The wallet identifier (LSID) linked to this card.",
            "example": "acc:00001919109000:wYzI0:0"
          },
          "type": {
            "type": "string",
            "description": "The type of wallet funding this card.",
            "enum": [
              "BVNK_EPC_WALLET"
            ],
            "example": "BVNK_EPC_WALLET"
          }
        }
      },
      "LimitView": {
        "type": "object",
        "description": "Provides a complete view of the card's spend limit, including what is configured, how much is available, and when it resets.",
        "properties": {
          "configured": {
            "$ref": "#/components/schemas/SpendLimit",
            "description": "The spend limit configuration (type and maximum value) as set by the card issuer."
          },
          "available": {
            "type": "number",
            "description": "The remaining amount available to spend within the current limit period. This decreases as transactions are authorized and resets at `nextResetAt`.",
            "example": 750.50
          },
          "nextResetAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp (ISO 8601) when the available limit resets back to the configured value. Not applicable for `TRANSACTION` type limits.",
            "example": "2024-03-16T00:00:00Z"
          }
        }
      },
      "CardTransactionStats": {
        "type": "object",
        "description": "Aggregated statistics about card transactions, useful for displaying activity summaries.",
        "properties": {
          "latestAuthorizedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp (ISO 8601) of the most recent authorized transaction on this card. Absent if no transactions have been made.",
            "example": "2024-03-15T14:22:00Z"
          }
        }
      },
      "ProvisionedWalletView": {
        "type": "object",
        "description": "Represents a digital wallet where the card has been provisioned for contactless payments.",
        "properties": {
          "walletProvider": {
            "type": "string",
            "description": "The digital wallet provider where the card is provisioned.",
            "enum": [
              "APPLE_PAY",
              "GOOGLE_PAY",
              "OTHER"
            ],
            "example": "APPLE_PAY"
          },
          "provisionedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp (ISO 8601) when the card was added to this digital wallet.",
            "example": "2024-03-15T11:00:00Z"
          }
        }
      },
      "CardAuditView": {
        "type": "object",
        "description": "An audit record containing information about a card state change, such as a status update or limit modification.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the audit record.",
            "example": "0000ca00-0f12-47a9-a20c-83dc85a0bbea"
          },
          "metadata": {
            "description": "Type-specific information about the change. Contains either status change or limit change details.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/StatusChangeMetadata"
              },
              {
                "$ref": "#/components/schemas/LimitChangeMetadata"
              }
            ]
          },
          "reason": {
            "type": "string",
            "description": "Optional reason for the change.",
            "example": "Customer requested status change"
          },
          "actorName": {
            "type": "string",
            "description": "Name of the actor who performed the action.",
            "example": "John Doe"
          },
          "actorType": {
            "type": "string",
            "description": "Type of actor who performed the action.",
            "enum": [
              "ADMIN",
              "PARTNER",
              "CUSTOMER",
              "SYSTEM"
            ],
            "example": "ADMIN"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp (ISO 8601) when the audit record was created.",
            "example": "2024-03-15T10:35:00Z"
          }
        }
      },
      "StatusChangeMetadata": {
        "type": "object",
        "description": "Metadata for a card status change audit entry.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The metadata type discriminator.",
            "enum": [
              "STATUS_CHANGE"
            ],
            "example": "STATUS_CHANGE"
          },
          "newStatus": {
            "type": "string",
            "description": "The card status after the change.",
            "enum": [
              "CREATED",
              "PENDING",
              "ACTIVE",
              "FROZEN",
              "BLOCKED",
              "CANCELLED",
              "EXPIRED"
            ],
            "example": "ACTIVE"
          }
        },
        "required": [
          "type",
          "newStatus"
        ]
      },
      "LimitChangeMetadata": {
        "type": "object",
        "description": "Metadata for a card spend limit change audit entry.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The metadata type discriminator.",
            "enum": [
              "LIMIT_CHANGE"
            ],
            "example": "LIMIT_CHANGE"
          },
          "newLimit": {
            "$ref": "#/components/schemas/SpendLimit",
            "description": "The spend limit configuration after the change."
          }
        },
        "required": [
          "type"
        ]
      },
      "CardActionRequest": {
        "description": "Action to perform on a card. The `type` field selects the action and determines which other fields apply.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/StatusChangeRequest"
          },
          {
            "$ref": "#/components/schemas/LimitAdjustmentRequest"
          },
          {
            "$ref": "#/components/schemas/RenewalRequest"
          }
        ]
      },
      "StatusChangeRequest": {
        "title": "Status change",
        "type": "object",
        "description": "Freezes, unfreezes, or cancels a card.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Action type. Must be `STATUS_CHANGE`.",
            "enum": [
              "STATUS_CHANGE"
            ],
            "example": "STATUS_CHANGE"
          },
          "newStatus": {
            "type": "string",
            "description": "The status to move the card to. Use `FROZEN` to temporarily suspend the card, `ACTIVE` to reactivate a frozen card, or `CANCELLED` to permanently cancel it. Cancellation is irreversible.",
            "enum": [
              "ACTIVE",
              "FROZEN",
              "CANCELLED"
            ],
            "example": "FROZEN"
          },
          "reason": {
            "type": "string",
            "description": "A human-readable reason for the status change. Stored for audit purposes.",
            "maxLength": 500,
            "example": "Customer-requested freeze pending transaction review"
          }
        },
        "required": [
          "type",
          "newStatus"
        ]
      },
      "LimitAdjustmentRequest": {
        "title": "Limit adjustment",
        "type": "object",
        "description": "Replaces the card's spend limit.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Action type. Must be `LIMIT_ADJUSTMENT`.",
            "enum": [
              "LIMIT_ADJUSTMENT"
            ],
            "example": "LIMIT_ADJUSTMENT"
          },
          "limit": {
            "$ref": "#/components/schemas/SpendLimit",
            "description": "The new spend limit configuration."
          }
        },
        "required": [
          "type",
          "limit"
        ]
      },
      "RenewalRequest": {
        "title": "Renewal",
        "type": "object",
        "description": "Issues a replacement card from a `CANCELLED` or `EXPIRED` card's configuration. Takes no other fields.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Action type. Must be `RENEWAL`.",
            "enum": [
              "RENEWAL"
            ],
            "example": "RENEWAL"
          }
        },
        "required": [
          "type"
        ]
      },
      "RevealSessionRequest": {
        "type": "object",
        "description": "Request body for creating a reveal session: a one-time, short-lived token for previewing sensitive card details. This is the first step in the two-step sensitive card details retrieval flow.",
        "properties": {
          "cardId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the card whose sensitive details to retrieve.",
            "example": "0000f86a-f5a2-487e-becd-59364f69b798"
          },
          "customerId": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the customer who owns the card. Used to validate card ownership.",
            "example": "0000771c-8bff-4660-9706-497b0f8bf0e3"
          }
        },
        "required": [
          "cardId",
          "customerId"
        ]
      },
      "RevealSessionResponse": {
        "type": "object",
        "description": "Reveal session containing a one-time, short-lived JWT for previewing sensitive card details.",
        "properties": {
          "token": {
            "type": "string",
            "description": "The one-time short-lived JWT token. Pass this as the Authorization header when calling the Preview sensitive card details endpoint."
          },
          "tokenType": {
            "type": "string",
            "description": "The token type (e.g., `Bearer`).",
            "example": "Bearer"
          },
          "expiresIn": {
            "type": "integer",
            "format": "int32",
            "description": "Token lifetime in seconds. The token becomes invalid after this period.",
            "example": 60
          }
        },
        "required": [
          "token",
          "tokenType",
          "expiresIn"
        ]
      },
      "CardTokenSensitiveDetailsRequest": {
        "type": "object",
        "description": "Request body for retrieving encrypted sensitive card details using a card token. The session encryption key ensures that card data is encrypted in transit.",
        "properties": {
          "sessionEncryptionKey": {
            "type": "string",
            "description": "A Base64-encoded session encryption key used to encrypt the card details in the response. Generate a fresh key for each request.",
            "example": "dGVzdC1zZXNzaW9uLWVuY3J5cHRpb24ta2V5"
          }
        },
        "required": [
          "sessionEncryptionKey"
        ]
      },
      "EncryptedCardDetailsView": {
        "type": "object",
        "description": "Contains the encrypted sensitive card details (PAN and CVC) along with the cardholder name and expiration date. Decrypt `encryptedPan` and `encryptedCvc` using AES with the initialization vector (`iv`) and your session key.",
        "properties": {
          "encryptedPan": {
            "$ref": "#/components/schemas/EncryptedData",
            "description": "The encrypted Primary Account Number (full card number). Decrypt using AES with the IV and your session key."
          },
          "encryptedCvc": {
            "$ref": "#/components/schemas/EncryptedData",
            "description": "The encrypted Card Verification Code (3-digit security code). Decrypt using AES with the IV and your session key."
          },
          "expiresAt": {
            "type": "string",
            "description": "The card's expiration date in `MM/YY` format. This value is not encrypted.",
            "example": "03/27"
          },
          "firstName": {
            "type": "string",
            "description": "The cardholder's first name as printed on the card.",
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "description": "The cardholder's last name as printed on the card.",
            "example": "Doe"
          }
        },
        "required": [
          "encryptedCvc",
          "encryptedPan"
        ]
      },
      "EncryptedData": {
        "type": "object",
        "description": "A wrapper for AES-encrypted data. Use the `iv` (initialization vector) and your session encryption key to decrypt the `data` field.",
        "properties": {
          "iv": {
            "type": "string",
            "description": "Base64-encoded initialization vector (IV) required for AES decryption.",
            "example": "aGVsbG93b3JsZDEyMzQ="
          },
          "data": {
            "type": "string",
            "description": "Base64-encoded encrypted payload. Decrypt using AES-256 with the IV and your session encryption key.",
            "example": "ZW5jcnlwdGVkUEFOZGF0YQ=="
          }
        },
        "required": [
          "data",
          "iv"
        ]
      },
      "CardTransactionView": {
        "type": "object",
        "description": "Represents a single card transaction including authorization, settlement, and merchant details.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the card transaction.",
            "example": "0000c50a-1dd1-4e15-8501-db278886d81a"
          },
          "cardProviderTransactionId": {
            "type": "string",
            "description": "The transaction identifier assigned by the card issuer. Used for reconciliation with the card network.",
            "example": "550e8400e29b41d4a716446655440011"
          },
          "cardId": {
            "type": "string",
            "format": "uuid",
            "description": "The UUID of the card used for this transaction.",
            "example": "0000f86a-f5a2-487e-becd-59364f69b798"
          },
          "cardNumberLast4Digits": {
            "type": "string",
            "description": "Last 4 digits of the card number used for the transaction.",
            "example": "4829"
          },
          "authorizedAmount": {
            "type": "number",
            "description": "The amount authorized at the time of the transaction. This is the amount reserved from the cardholder's balance.",
            "example": 120.00
          },
          "settledAmount": {
            "type": "number",
            "description": "The final settled amount after the merchant completes the transaction. May differ from `authorizedAmount` (e.g., tips, partial captures). Only present after settlement.",
            "example": 118.50
          },
          "authorizedAmountHistory": {
            "type": "array",
            "description": "History of changes to the authorized amount, ordered from earliest to latest. Each entry is the authorized amount after a change, such as an incremental authorization.",
            "items": {
              "$ref": "#/components/schemas/AuthorizedAmountChange"
            }
          },
          "asset": {
            "type": "string",
            "description": "The currency code of the transaction amount.",
            "example": "USDC"
          },
          "ledgerProviderTransactionIds": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Mapping of ledger provider transaction IDs grouped by transaction type (e.g., `AUTHORIZATION`, `SETTLEMENT`). Used for internal reconciliation."
          },
          "status": {
            "type": "string",
            "description": "The current status of the transaction.\n- `PENDING` — transaction is being processed\n- `AUTHORIZED` — funds have been reserved but not yet settled\n- `SETTLED` — transaction is complete and funds have been transferred\n- `DECLINED` — transaction was rejected (see `formattedDeclineReason`)\n- `CANCELLED` — transaction was voided before settlement",
            "enum": [
              "PENDING",
              "AUTHORIZED",
              "SETTLED",
              "DECLINED",
              "CANCELLED"
            ],
            "example": "SETTLED"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp (ISO 8601) when the transaction was first created (authorization time).",
            "example": "2024-03-15T14:22:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp (ISO 8601) when the transaction was last updated (e.g., when settled or declined).",
            "example": "2024-03-16T08:00:00Z"
          },
          "metadata": {
            "$ref": "#/components/schemas/CardTransactionMetadata",
            "description": "Merchant and local transaction details including merchant name, category, location, and local currency amounts."
          },
          "tokenizationWallet": {
            "type": "string",
            "description": "The digital wallet used for the transaction if it was a tokenized payment (e.g., `Apple Pay`, `Google Pay`). Only present for tokenized payments.",
            "example": "Apple Pay"
          },
          "reportData": {
            "$ref": "#/components/schemas/CardTransactionReportData",
            "description": "Enrichment data from daily card transaction reports, including interchange fees and 3D Secure status. Available only after settlement."
          },
          "formattedDeclineReason": {
            "type": "string",
            "description": "Human-readable decline reason suitable for displaying to cardholders. Only present for declined transactions.",
            "example": "The transaction amount exceeds your available balance."
          },
          "disputeEligibility": {
            "$ref": "#/components/schemas/DisputeEligibility",
            "description": "Whether the transaction can be disputed and, if not, why. Check this before submitting a dispute."
          }
        },
        "required": [
          "id",
          "cardProviderTransactionId",
          "cardId",
          "authorizedAmount",
          "asset",
          "status",
          "createdAt",
          "updatedAt"
        ]
      },
      "Pageable": {
        "type": "object",
        "description": "Pagination details for the returned page.",
        "properties": {
          "pageNumber": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Zero-based number of the current page.",
            "example": 0
          },
          "pageSize": {
            "type": "integer",
            "format": "int32",
            "minimum": 1,
            "maximum": 500,
            "description": "Number of items per page.",
            "example": 50
          }
        }
      },
      "PaginatedResultCardView": {
        "type": "object",
        "description": "Paginated list of cards. The cards are in the `content` array.",
        "properties": {
          "content": {
            "type": "array",
            "description": "Cards on the current page.",
            "items": {
              "$ref": "#/components/schemas/CardView"
            }
          },
          "pageable": {
            "$ref": "#/components/schemas/Pageable"
          },
          "totalElements": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of cards across all pages.",
            "example": 1
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "description": "Total number of pages.",
            "example": 1
          },
          "hasNext": {
            "type": "boolean",
            "description": "Indicates whether a next page is available.",
            "example": false
          }
        }
      },
      "PaginatedResultCardTransactionView": {
        "type": "object",
        "description": "Paginated list of card transactions. The transactions are in the `content` array.",
        "properties": {
          "content": {
            "type": "array",
            "description": "Card transactions on the current page.",
            "items": {
              "$ref": "#/components/schemas/CardTransactionView"
            }
          },
          "pageable": {
            "$ref": "#/components/schemas/Pageable"
          },
          "totalElements": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of card transactions across all pages.",
            "example": 1
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "description": "Total number of pages.",
            "example": 1
          },
          "hasNext": {
            "type": "boolean",
            "description": "Indicates whether a next page is available.",
            "example": false
          }
        }
      },
      "AuthorizedAmountChange": {
        "type": "object",
        "description": "A change to the authorized amount of a card transaction, such as an incremental authorization.",
        "properties": {
          "amount": {
            "type": "number",
            "description": "The authorized amount after this change.",
            "example": 120.00
          },
          "changedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp (ISO 8601) when the authorized amount changed.",
            "example": "2024-03-10T09:15:00Z"
          }
        }
      },
      "CardTransactionMetadata": {
        "type": "object",
        "description": "Merchant and local transaction details captured during card authorization. Provides context about where and how the transaction occurred.",
        "properties": {
          "merchantCategory": {
            "type": "string",
            "description": "Human-readable merchant category (e.g., `Online Shopping`, `Transportation`, `Restaurants`).",
            "example": "Online Shopping"
          },
          "merchantName": {
            "type": "string",
            "description": "The name of the merchant where the transaction occurred.",
            "example": "Amazon.com"
          },
          "merchantCategoryCode": {
            "type": "string",
            "description": "The 4-digit Merchant Category Code (MCC) as defined by the card network.",
            "example": "5411"
          },
          "merchantCity": {
            "type": "string",
            "description": "The city where the merchant is located.",
            "example": "Seattle"
          },
          "merchantCountry": {
            "type": "string",
            "description": "The ISO 3166-1 alpha-2 country code of the merchant's location.",
            "example": "US"
          },
          "localCurrency": {
            "type": "string",
            "description": "The local currency of the transaction at the merchant's point of sale.",
            "example": "EUR"
          },
          "localAmount": {
            "type": "number",
            "description": "The transaction amount in the merchant's local currency (before any FX conversion).",
            "example": 42.50
          },
          "usdAmount": {
            "type": "number",
            "description": "The equivalent transaction amount in USD, used for reporting and interchange calculations.",
            "example": 46.75
          }
        }
      },
      "CardTransactionReportData": {
        "type": "object",
        "description": "Additional transaction data from daily settlement reports. This data is enriched after the transaction settles and provides details about fees, security, and transaction characteristics.",
        "properties": {
          "interchangeAmount": {
            "type": "number",
            "description": "The interchange fee charged by the card network for processing this transaction.",
            "example": 0.025
          },
          "fxFee": {
            "type": "number",
            "description": "The foreign exchange fee applied when the transaction currency differs from the card currency.",
            "example": 0.10
          },
          "isThreeDSecureTransaction": {
            "type": "boolean",
            "description": "Indicates whether 3D Secure (3DS) authentication was performed for this transaction. 3DS provides additional fraud protection for online transactions.",
            "example": true
          },
          "isInternationalTransaction": {
            "type": "boolean",
            "description": "Indicates whether the transaction was processed internationally (merchant country differs from card issuing country).",
            "example": false
          }
        }
      },
      "DisputeEligibility": {
        "type": "object",
        "description": "Whether a card transaction can be disputed. A transaction may be ineligible if it has already been disputed, is still pending settlement, or falls outside the dispute window.",
        "properties": {
          "eligible": {
            "type": "boolean",
            "description": "`true` if the transaction can be disputed, `false` otherwise.",
            "example": false
          },
          "reasons": {
            "type": "array",
            "description": "Reasons why the transaction cannot be disputed. Present only when `eligible` is `false`.",
            "items": {
              "type": "string"
            },
            "example": [
              "Transaction already has an active dispute",
              "Transaction is older than 120 days"
            ]
          }
        },
        "required": [
          "eligible"
        ]
      },
      "CustomerEligibilityStatusResponse": {
        "type": "object",
        "description": "The result of checking a customer's eligibility for card issuance.",
        "properties": {
          "customerId": {
            "type": "string",
            "description": "The UUID of the customer whose eligibility was checked.",
            "example": "0000771c-8bff-4660-9706-497b0f8bf0e3"
          },
          "requirements": {
            "type": "array",
            "description": "List of outstanding requirements that must be fulfilled before a card can be issued. Empty when the customer is eligible.",
            "items": {
              "$ref": "#/components/schemas/EligibilityRequirement"
            }
          },
          "eligible": {
            "type": "boolean",
            "description": "`true` if the customer has met all eligibility requirements and is eligible for card issuance.",
            "example": true
          }
        }
      },
      "EligibilityRequirement": {
        "type": "object",
        "description": "A single eligibility requirement that must be fulfilled before a card can be issued to the customer.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The category of the requirement.\n- `REQUIRED_DATA`: mandatory customer data is missing\n- `UNSUPPORTED_VALUE`: a provided value is not supported for card issuance\n- `REQUIRED_ACTION`: a specific action must be completed by the customer",
            "enum": [
              "REQUIRED_DATA",
              "UNSUPPORTED_VALUE",
              "REQUIRED_ACTION"
            ],
            "example": "REQUIRED_DATA"
          },
          "key": {
            "type": "string",
            "description": "The dot-notation path to the field that needs attention (e.g., `customer.address.line1`).",
            "example": "customer.address.line1"
          },
          "label": {
            "type": "string",
            "description": "A human-readable name for the field.",
            "example": "Address Line 1"
          },
          "description": {
            "type": "string",
            "description": "A detailed explanation of what is required or why the current value is not supported.",
            "example": "Customer's residential address is required for card issuance"
          }
        }
      },
      "ApiError": {
        "type": "object",
        "description": "Standard error response returned when a request fails. Contains a machine-readable error code, HTTP status, human-readable message, and optional field-level validation details.",
        "properties": {
          "code": {
            "type": "string",
            "description": "A machine-readable error code identifying the type of error (e.g., `VALIDATION_ERROR`, `NOT_FOUND`, `FORBIDDEN`).",
            "example": "VALIDATION_ERROR"
          },
          "traceId": {
            "type": "string",
            "description": "A unique trace ID for this request. Provide this when contacting support for faster issue resolution.",
            "example": "abc123def456"
          },
          "status": {
            "type": "string",
            "description": "The HTTP status category (e.g., `BAD_REQUEST`, `NOT_FOUND`, `FORBIDDEN`).",
            "example": "BAD_REQUEST"
          },
          "message": {
            "type": "string",
            "description": "A human-readable error message describing what went wrong.",
            "example": "Validation failed: assetCode must not be blank"
          },
          "details": {
            "$ref": "#/components/schemas/Detail",
            "description": "Optional additional details about the error, including field-level validation errors and links to documentation."
          }
        },
        "required": [
          "code",
          "message",
          "status"
        ]
      },
      "Detail": {
        "type": "object",
        "description": "Additional error details including field-level validation errors and documentation links.",
        "properties": {
          "documentLink": {
            "type": "string",
            "description": "A URL to relevant documentation that may help resolve the error.",
            "example": "https://docs.bvnk.com/bvnk/use-cases/cards/cards"
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "A map of field names to their validation error messages. Only present for validation errors.",
            "example": {
              "assetCode": ["must not be blank"],
              "ledger.mainWalletId": ["must not be blank"]
            }
          }
        }
      },
      "AuthorizationSimulationRequest": {
        "type": "object",
        "description": "Request body for simulating a card authorization. Specify the card, amount, and currency. Optionally include merchant details and a decline reason.",
        "properties": {
          "cardId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the card to simulate the transaction on.",
            "example": "0000f86a-f5a2-487e-becd-59364f69b798"
          },
          "amount": {
            "type": "number",
            "description": "Transaction amount in major units (e.g. dollars, not cents).",
            "example": 100.50
          },
          "currency": {
            "type": "string",
            "description": "Currency code for the transaction.",
            "example": "USDC"
          },
          "merchantName": {
            "type": "string",
            "description": "Name of the simulated merchant.",
            "example": "The Daily Grind"
          },
          "merchantCategoryCode": {
            "type": "string",
            "description": "Merchant Category Code (MCC) for the simulated transaction.",
            "example": "5411"
          },
          "declineReason": {
            "type": "string",
            "description": "If provided, the authorization is declined with this reason. Omit to simulate a successful authorization.",
            "example": "Insufficient funds"
          }
        },
        "required": ["cardId", "amount", "currency"]
      },
      "IncrementalAuthorizationSimulationRequest": {
        "type": "object",
        "description": "Request body for simulating an incremental authorization: a change to the authorized amount of an existing simulated transaction.",
        "properties": {
          "transactionId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier (UUID) of the simulated transaction, returned as `id` by the Simulate authorization endpoint.",
            "example": "0000c50a-1dd1-4e15-8501-db278886d81a"
          },
          "amount": {
            "type": "number",
            "description": "The new total authorized amount in major units (for example, dollars, not cents). Must be greater than 0.",
            "exclusiveMinimum": 0,
            "example": 75.0
          }
        },
        "required": [
          "transactionId",
          "amount"
        ]
      },
      "ReversalSimulationRequest": {
        "type": "object",
        "description": "Request body for simulating the reversal of an authorized transaction.",
        "properties": {
          "transactionId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier (UUID) of the simulated transaction, returned as `id` by the Simulate authorization endpoint.",
            "example": "0000c50a-1dd1-4e15-8501-db278886d81a"
          },
          "amount": {
            "type": "number",
            "description": "Optional new transaction amount in major units, passed to the card provider's reversal simulation. Must be greater than 0.",
            "exclusiveMinimum": 0,
            "example": 50.0
          }
        },
        "required": [
          "transactionId"
        ]
      },
      "SettlementSimulationRequest": {
        "type": "object",
        "description": "Request body for simulating the settlement of an authorized transaction.",
        "properties": {
          "transactionId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier (UUID) of the simulated transaction, returned as `id` by the Simulate authorization endpoint.",
            "example": "0000c50a-1dd1-4e15-8501-db278886d81a"
          },
          "amount": {
            "type": "number",
            "description": "Optional settled amount in major units. Defaults to the authorized amount. Set a lower amount to simulate a partial settlement. Must be greater than 0.",
            "exclusiveMinimum": 0,
            "example": 40.0
          }
        },
        "required": [
          "transactionId"
        ]
      },
      "RefundSimulationRequest": {
        "type": "object",
        "description": "Request body for simulating a refund of a settled transaction.",
        "properties": {
          "transactionId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier (UUID) of the simulated transaction, returned as `id` by the Simulate authorization endpoint.",
            "example": "0000c50a-1dd1-4e15-8501-db278886d81a"
          },
          "amount": {
            "type": "number",
            "description": "Optional refunded amount in major units, passed to the card provider's refund simulation. Must be greater than 0.",
            "exclusiveMinimum": 0,
            "example": 50.0
          }
        },
        "required": [
          "transactionId"
        ]
      },
      "SimulatedTransactionResponse": {
        "type": "object",
        "description": "Response from a transaction simulation, containing the transaction ID and its resulting status.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the simulated transaction. Pass it as `transactionId` to the incremental authorization, reversal, settlement, and refund simulations.",
            "example": "0000c50a-1dd1-4e15-8501-db278886d81a"
          },
          "status": {
            "type": "string",
            "description": "The resulting status of the simulated transaction.",
            "enum": ["PENDING", "AUTHORIZED", "SETTLED", "DECLINED", "CANCELLED"],
            "example": "AUTHORIZED"
          },
          "declineReason": {
            "type": "string",
            "description": "Reason for decline. Only present if the transaction was declined.",
            "example": "Insufficient funds"
          },
          "completionReason": {
            "type": "string",
            "description": "Reason for completion. Present for settled or refunded transactions.",
            "example": "Transaction settled successfully"
          }
        },
        "required": ["id", "status"]
      }
    },
    "securitySchemes": {
      "hawkAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Hawk authentication. Generate API keys from the BVNK portal and sign requests using the Hawk protocol. See [Generate API keys](https://docs.bvnk.com/bvnk/get-started/generate-api-keys) for details."
      }
    }
  },
  "security": [
    {
      "hawkAuth": []
    }
  ]
}
