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

# Simulate 3DS authorization

> Simulates a WEBHOOK 3DS challenge for a card authorization. Returns a pending `ThreeDsChallenge` and delivers `CARD_3DS_CHALLENGE_CREATED` without creating a transaction. After `POST /card-3ds-challenges/{id}/respond` with `approve: true`, authorization completes and `CARD_TRANSACTION_CREATED` is delivered. With `approve: false`, the challenge is rejected and no transaction is created (mirrors production). The card must use `3dsChallengeMethod: WEBHOOK`.



## OpenAPI

````yaml /api-reference/openapi.json post /simulation/card-transactions/authorization-with-3ds
openapi: 3.1.0
info:
  title: Reap API
  version: 1.0.0
  description: Reap platform API
servers:
  - url: https://sandbox.api.reap.global
    description: Sandbox
  - url: https://prod.api.reap.global
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Accounts
  - name: Activities
  - name: Card Designs
  - name: Card Shipments
  - name: Card Transactions
  - name: Cards
  - name: Companies
  - name: Crypto Deposits
  - name: Fraud Alerts
  - name: Policies
  - name: Simulation
  - name: Users
  - name: Virtual Asset Postings
  - name: Virtual Assets
  - name: Webhooks
paths:
  /simulation/card-transactions/authorization-with-3ds:
    post:
      tags:
        - Simulation
      summary: Simulate 3DS authorization
      description: >-
        Simulates a WEBHOOK 3DS challenge for a card authorization. Returns a
        pending `ThreeDsChallenge` and delivers `CARD_3DS_CHALLENGE_CREATED`
        without creating a transaction. After `POST
        /card-3ds-challenges/{id}/respond` with `approve: true`, authorization
        completes and `CARD_TRANSACTION_CREATED` is delivered. With `approve:
        false`, the challenge is rejected and no transaction is created (mirrors
        production). The card must use `3dsChallengeMethod: WEBHOOK`.
      operationId: cardTransactionAuthorizationWith3ds_simulation
      parameters:
        - name: Reap-Version
          in: header
          required: true
          schema:
            type: string
            enum:
              - '2025-02-14'
            description: API version (YYYY-MM-DD)
            example: '2025-02-14'
      requestBody:
        description: >-
          Simulate a WEBHOOK 3DS challenge that defers authorization until the
          partner responds
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                cardId:
                  description: Card ID
                  type: string
                  format: uuid
                amount:
                  type: number
                  minimum: 0
                  examples:
                    - 100.5
                    - 0
                    - 1234.99
                  description: Amount in the project's billing currency
                originalAmount:
                  description: >-
                    Amount in the original transaction currency. Must be
                    provided together with `originalCurrency`.
                  type: number
                  minimum: 0
                originalCurrency:
                  description: >-
                    Original transaction currency as an ISO 4217 alpha code
                    (e.g. `EUR`). Must be provided together with
                    `originalAmount`.
                  type: string
                  pattern: ^[A-Z]{3}$
                channel:
                  description: Transaction channel. Defaults to `ECOMMERCE` when omitted.
                  type: string
                  enum:
                    - ATM
                    - POS
                    - ECOMMERCE
                    - VISA_DIRECT
                  example: ATM
                digitalWallet:
                  description: >-
                    Digital wallet type (e.g. `APPLE_PAY`, `GOOGLE_PAY`).
                    Randomly generated if omitted.
                  type: string
                  enum:
                    - APPLE_PAY
                    - GOOGLE_PAY
                    - MERCHANT_TOKEN
                  example: APPLE_PAY
                merchant:
                  type: object
                  properties:
                    name:
                      description: Merchant name
                      type: string
                      minLength: 1
                    city:
                      description: Merchant city
                      type: string
                      minLength: 1
                    postCode:
                      description: Merchant postal or ZIP code
                      type: string
                      minLength: 1
                    state:
                      description: Merchant state or province
                      type: string
                      minLength: 1
                    country:
                      type: string
                      minLength: 2
                      maxLength: 2
                      examples:
                        - US
                        - GB
                        - DE
                      description: ISO 3166-1 alpha-2 country code
                    mccCode:
                      description: Merchant Category Code (4 digits)
                      type: string
                      minLength: 4
                      maxLength: 4
                    mccCategory:
                      description: MCC category description
                      type: string
                      minLength: 1
                  description: >-
                    Merchant details. All fields are optional and will be
                    randomly generated if omitted.
              required:
                - cardId
                - amount
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                cardId:
                  description: Card ID
                  type: string
                  format: uuid
                amount:
                  type: number
                  minimum: 0
                  examples:
                    - 100.5
                    - 0
                    - 1234.99
                  description: Amount in the project's billing currency
                originalAmount:
                  description: >-
                    Amount in the original transaction currency. Must be
                    provided together with `originalCurrency`.
                  type: number
                  minimum: 0
                originalCurrency:
                  description: >-
                    Original transaction currency as an ISO 4217 alpha code
                    (e.g. `EUR`). Must be provided together with
                    `originalAmount`.
                  type: string
                  pattern: ^[A-Z]{3}$
                channel:
                  description: Transaction channel. Defaults to `ECOMMERCE` when omitted.
                  type: string
                  enum:
                    - ATM
                    - POS
                    - ECOMMERCE
                    - VISA_DIRECT
                  example: ATM
                digitalWallet:
                  description: >-
                    Digital wallet type (e.g. `APPLE_PAY`, `GOOGLE_PAY`).
                    Randomly generated if omitted.
                  type: string
                  enum:
                    - APPLE_PAY
                    - GOOGLE_PAY
                    - MERCHANT_TOKEN
                  example: APPLE_PAY
                merchant:
                  type: object
                  properties:
                    name:
                      description: Merchant name
                      type: string
                      minLength: 1
                    city:
                      description: Merchant city
                      type: string
                      minLength: 1
                    postCode:
                      description: Merchant postal or ZIP code
                      type: string
                      minLength: 1
                    state:
                      description: Merchant state or province
                      type: string
                      minLength: 1
                    country:
                      type: string
                      minLength: 2
                      maxLength: 2
                      examples:
                        - US
                        - GB
                        - DE
                      description: ISO 3166-1 alpha-2 country code
                    mccCode:
                      description: Merchant Category Code (4 digits)
                      type: string
                      minLength: 4
                      maxLength: 4
                    mccCategory:
                      description: MCC category description
                      type: string
                      minLength: 1
                  description: >-
                    Merchant details. All fields are optional and will be
                    randomly generated if omitted.
              required:
                - cardId
                - amount
          multipart/form-data:
            schema:
              type: object
              properties:
                cardId:
                  description: Card ID
                  type: string
                  format: uuid
                amount:
                  type: number
                  minimum: 0
                  examples:
                    - 100.5
                    - 0
                    - 1234.99
                  description: Amount in the project's billing currency
                originalAmount:
                  description: >-
                    Amount in the original transaction currency. Must be
                    provided together with `originalCurrency`.
                  type: number
                  minimum: 0
                originalCurrency:
                  description: >-
                    Original transaction currency as an ISO 4217 alpha code
                    (e.g. `EUR`). Must be provided together with
                    `originalAmount`.
                  type: string
                  pattern: ^[A-Z]{3}$
                channel:
                  description: Transaction channel. Defaults to `ECOMMERCE` when omitted.
                  type: string
                  enum:
                    - ATM
                    - POS
                    - ECOMMERCE
                    - VISA_DIRECT
                  example: ATM
                digitalWallet:
                  description: >-
                    Digital wallet type (e.g. `APPLE_PAY`, `GOOGLE_PAY`).
                    Randomly generated if omitted.
                  type: string
                  enum:
                    - APPLE_PAY
                    - GOOGLE_PAY
                    - MERCHANT_TOKEN
                  example: APPLE_PAY
                merchant:
                  type: object
                  properties:
                    name:
                      description: Merchant name
                      type: string
                      minLength: 1
                    city:
                      description: Merchant city
                      type: string
                      minLength: 1
                    postCode:
                      description: Merchant postal or ZIP code
                      type: string
                      minLength: 1
                    state:
                      description: Merchant state or province
                      type: string
                      minLength: 1
                    country:
                      type: string
                      minLength: 2
                      maxLength: 2
                      examples:
                        - US
                        - GB
                        - DE
                      description: ISO 3166-1 alpha-2 country code
                    mccCode:
                      description: Merchant Category Code (4 digits)
                      type: string
                      minLength: 4
                      maxLength: 4
                    mccCategory:
                      description: MCC category description
                      type: string
                      minLength: 1
                  description: >-
                    Merchant details. All fields are optional and will be
                    randomly generated if omitted.
              required:
                - cardId
                - amount
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Unique 3DS challenge identifier
                  cardId:
                    type: string
                    format: uuid
                    description: ID of the card this challenge is for
                  status:
                    type: string
                    enum:
                      - PENDING
                      - APPROVED
                      - REJECTED
                      - EXPIRED
                    description: Challenge status
                    example: PENDING
                  merchant:
                    $ref: '#/components/schemas/ThreeDsChallengeMerchant'
                  transaction:
                    $ref: '#/components/schemas/ThreeDsChallengeTransaction'
                  expiresAt:
                    type: string
                    examples:
                      - '2024-01-15T10:35:00Z'
                    description: ISO 8601 timestamp when this challenge expires
                required:
                  - id
                  - cardId
                  - status
                  - merchant
                  - transaction
                  - expiresAt
        '400':
          description: The resource is not in a valid state for the requested simulation
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        const: SIMULATION_INVALID_STATE
                      message:
                        type: string
                      detail:
                        anyOf:
                          - type: object
                            additionalProperties: {}
                          - type: 'null'
                    required:
                      - code
                      - message
                      - detail
                required:
                  - error
                title: SimulationInvalidStateError
        '404':
          description: Card not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        const: CARD_NOT_FOUND
                      message:
                        type: string
                      detail:
                        anyOf:
                          - type: object
                            additionalProperties: {}
                          - type: 'null'
                    required:
                      - code
                      - message
                      - detail
                required:
                  - error
                title: CardNotFoundError
components:
  schemas:
    ThreeDsChallengeMerchant:
      type: object
      properties:
        name:
          type: string
          examples:
            - Sephora Digital
          description: Merchant name
        countryCode:
          type: string
          examples:
            - '344'
          description: Merchant country code (ISO numeric)
      required:
        - name
        - countryCode
      description: Merchant details
    ThreeDsChallengeTransaction:
      type: object
      properties:
        amount:
          type: string
          examples:
            - '170.0000'
          description: Transaction amount
        currency:
          type: string
          examples:
            - HKD
            - USD
          description: Transaction currency (ISO alpha-3)
        timestamp:
          type: string
          examples:
            - '2024-01-15T10:30:00Z'
          description: ISO 8601 timestamp of the transaction
      required:
        - amount
        - currency
        - timestamp
      description: Transaction details
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key as Bearer token

````