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

# Simulate a card authorisation

> 
 Simulates a card authorisation.

 This endpoint is for testing purposes only and won't work in production.
    



## OpenAPI

````yaml /autogenerated/openapi/cards.openapi.json post /cards/simulations/transaction/authorization
openapi: 3.1.0
info:
  title: Cards API
  version: 2.0.0
  description: Version 2
  license:
    name: UNLICENSED
    url: https://docs.equalsmoney.com
servers:
  - url: https://api.equalsmoney.com/v2
    description: Production
  - url: https://api-sandbox.equalsmoney.com/v2
    description: Sandbox
security: []
paths:
  /cards/simulations/transaction/authorization:
    post:
      tags:
        - Simulations
      summary: Simulate a card authorisation
      description: |2-

         Simulates a card authorisation.

         This endpoint is for testing purposes only and won't work in production.
            
      operationId: simulateCardAuthorization
      parameters:
        - name: accountId
          in: query
          schema:
            description: The ID of the account to work with.
            type:
              - string
            example: F50091
          required: true
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              type:
                - object
              properties:
                cardId:
                  description: The ID of the card to work with.
                  type:
                    - string
                  format: uuid
                  maxLength: 36
                  example: e9293471-5eb3-4dbc-916c-dbaf9e2deefd
                amount:
                  type:
                    - number
                  minimum: 0
                  description: The amount.
                  example: 10
                network:
                  type:
                    - string
                  description: The card network.
                  example: VISA
                cardAcceptor:
                  type:
                    - object
                  properties:
                    mid:
                      type:
                        - string
                      maxLength: 36
                      description: >-
                        The Merchant Identifier (MID). This identifies a
                        specific merchant.
                  required:
                    - mid
              required:
                - cardId
                - amount
                - network
                - cardAcceptor
              example:
                cardId: e9293471-5eb3-4dbc-916c-dbaf9e2deefd
                amount: 10
                network: VISA
                cardAcceptor:
                  mid: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  transaction:
                    type:
                      - object
                    properties:
                      acquirerFeeAmount:
                        type:
                          - string
                        description: The acquirer fee amount.
                        example: '1.2'
                      type:
                        type:
                          - string
                        description: The type of transaction.
                        example: authorization.clearing
                      state:
                        type:
                          - string
                        description: The state of the transaction.
                        example: COMPLETION
                      token:
                        type:
                          - string
                        format: uuid
                        description: The transaction token.
                        example: 7bff9f48-8c68-4937-917a-bf7cf4f0de27
                      userToken:
                        type:
                          - string
                        format: uuid
                        description: The user token.
                        example: f0d5cae0-fb3f-417f-8f1c-51c5fb66259a
                      cardToken:
                        type:
                          - string
                        format: uuid
                        description: The card token.
                        example: 3c5d4203-99dc-4bbb-a8c4-e5c61fbe563a
                      requestAmount:
                        type:
                          - string
                        description: The request amount.
                        example: '10.0'
                      response:
                        type:
                          - object
                        properties:
                          code:
                            type:
                              - string
                            description: The transaction response code.
                            example: '0000'
                          memo:
                            type:
                              - string
                            description: The transaction response memo.
                            example: Approved or completed successfully
                        description: Details about the transaction response.
                      createdTime:
                        type:
                          - string
                        format: date-time
                        description: >-
                          The date and time at which the resource was initially
                          created, in ISO 8601 format without milliseconds.
                        example: '2022-12-06T21:41:48Z'
                      userTransactionTime:
                        type:
                          - string
                        format: date-time
                        description: >-
                          The date and time of the user transaction, in ISO 8601
                          format without milliseconds.
                        example: '2022-12-06T21:41:49Z'
                      settlementDate:
                        type:
                          - string
                        format: date-time
                        description: >-
                          The settlement date, in ISO 8601 format without
                          milliseconds.
                        example: '2022-12-06T21:41:50Z'
                      amount:
                        type:
                          - string
                        description: The transaction amount.
                        example: '10.0'
                      gpa:
                        type:
                          - object
                        properties:
                          ledgerBalance:
                            type:
                              - string
                            description: The ledger balance.
                            example: '240.0'
                          availableBalance:
                            type:
                              - string
                            description: The available balance.
                            example: '240.0'
                          impactedAmount:
                            type:
                              - string
                            description: The impacted amount.
                            example: '-10.0'
                      currencyCode:
                        type:
                          - string
                        description: The currency code, in ISO 4217 format.
                        example: GBP
                      currencyConversion:
                        type:
                          - object
                        properties:
                          originalAmount:
                            type:
                              - string
                            description: The original amount.
                            example: '10.0'
                          conversionRate:
                            type:
                              - number
                            description: The conversion rate.
                            example: 1
                          originalCurrencyCode:
                            type:
                              - string
                            description: >-
                              The numeric code of the currency used in the
                              transaction, in ISO 4217 format.
                            example: '826'
                      precedingRelatedTransactionToken:
                        type:
                          - string
                        format: uuid
                        description: The token of the preceding related transaction.
                        example: 8a6d911e-cb3d-41d2-b843-5f9dc97d503c
                      network:
                        type:
                          - string
                        description: The card network.
                        example: VISA
                      subnetwork:
                        type:
                          - string
                        description: The sub-network.
                        example: VISANET
                      cardAcceptor:
                        type:
                          - object
                        properties:
                          postalCode:
                            type:
                              - string
                            description: The postal or ZIP code of the card acceptor.
                            example: '33705'
                          mid:
                            type:
                              - string
                            description: >-
                              The Merchant identifier (MID). This identifies a
                              specific merchant.
                            example: '000000000011111'
                          mcc:
                            type:
                              - string
                            description: The Merchant Category Code (MCC).
                            example: '6411'
                          name:
                            type:
                              - string
                            description: The name of the card acceptor.
                            example: Card Acceptor Name
                          city:
                            type:
                              - string
                            description: The city of the card acceptor.
                            example: Seattle
                          state:
                            type:
                              - string
                            description: The state of the card acceptor.
                            example: WA
                          countryCode:
                            type:
                              - string
                            description: >-
                              The country code of the card acceptor's country,
                              in ISO 3166-1 format (alpha-2).
                            example: USA
                    description: Details about the transaction.
                example:
                  transaction:
                    acquirerFeeAmount: '1.2'
                    type: authorization.clearing
                    state: COMPLETION
                    token: 7bff9f48-8c68-4937-917a-bf7cf4f0de27
                    userToken: f0d5cae0-fb3f-417f-8f1c-51c5fb66259a
                    cardToken: 3c5d4203-99dc-4bbb-a8c4-e5c61fbe563a
                    requestAmount: '10.0'
                    response:
                      code: '0000'
                      memo: Approved or completed successfully
                    createdTime: '2022-12-06T21:41:48Z'
                    userTransactionTime: '2022-12-06T21:41:49Z'
                    settlementDate: '2022-12-06T21:41:50Z'
                    amount: '10.0'
                    gpa:
                      ledgerBalance: '240.0'
                      availableBalance: '240.0'
                      impactedAmount: '-10.0'
                    currencyCode: GBP
                    currencyConversion:
                      originalAmount: '10.0'
                      conversionRate: 1
                      originalCurrencyCode: '826'
                    precedingRelatedTransactionToken: 8a6d911e-cb3d-41d2-b843-5f9dc97d503c
                    network: VISA
                    subnetwork: VISANET
                    cardAcceptor:
                      postalCode: '33705'
                      mid: '000000000011111'
                      mcc: '6411'
                      name: Card Acceptor Name
                      city: Seattle
                      state: WA
                      countryCode: USA
      security:
        - CommonAuth: []
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.equalsmoney.com/v2/cards/simulations/transaction/authorization?accountId={{accountId}}' \
              --header 'Authorization: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '
            {
              "cardId": "e9293471-5eb3-4dbc-916c-dbaf9e2deefd",
              "amount": 10,
              "network": "VISA",
              "cardAcceptor": {
                "mid": "string"
              }
            }
            '
components:
  securitySchemes:
    CommonAuth:
      type: apiKey
      in: header
      name: Authorization

````