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

# Simulate Authorization Reversal

> Simulates different types of authorizations across several merchant categories and channels.



## OpenAPI

````yaml openapi.json get /cards/simulator/authorization/{id}/reversal
openapi: 3.1.0
info:
  title: Sudo Sandbox API
  version: '1.0'
servers:
  - url: https://api.sandbox.sudo.cards
security:
  - sec0: []
paths:
  /cards/simulator/authorization/{id}/reversal:
    get:
      summary: Simulate Authorization Reversal
      description: >-
        Simulates different types of authorizations across several merchant
        categories and channels.
      operationId: simulate-authorization-reversal
      parameters:
        - name: id
          in: path
          description: The `_id` of the authorization you wish to reverse.
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Authorization reversed successfully.
          headers:
            X-Powered-By:
              schema:
                type: string
              example: Express
            Access-Control-Allow-Origin:
              schema:
                type: string
              example: '*'
            X-RateLimit-Limit:
              schema:
                type: integer
              example: '250000'
            X-RateLimit-Remaining:
              schema:
                type: integer
              example: '249999'
            X-RateLimit-Reset:
              schema:
                type: integer
              example: '0'
            Content-Type:
              schema:
                type: string
              example: application/json; charset=utf-8
            ETag:
              schema:
                type: string
              example: W/"2dd-sfRBgLV2BqnKnzwqFCi2UGdBgUQ"
            Connection:
              schema:
                type: string
              example: keep-alive
            Keep-Alive:
              schema:
                type: string
              example: timeout=5
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: >-
                      Status code of the response. `200` indicates a successful
                      request.
                  message:
                    type: string
                    description: Human-readable description of the result.
                  data:
                    type: object
                    description: Response payload.
                    properties:
                      _id:
                        type: string
                        description: Unique identifier of the object.
                      business:
                        type: string
                        description: Identifier of the business that owns this object.
                      customer:
                        type: object
                        description: >-
                          Associated customer — an id, or a summary object on
                          nested resources.
                        properties:
                          _id:
                            type: string
                            description: Unique identifier of the object.
                          name:
                            type: string
                            description: Display name.
                      account:
                        type: object
                        description: >-
                          Associated account — an id, or a summary object on
                          nested resources.
                        properties:
                          _id:
                            type: string
                            description: Unique identifier of the object.
                          type:
                            type: string
                            description: Type of the object.
                          currency:
                            type: string
                            description: ISO 4217 currency code (e.g. `NGN`).
                          accountName:
                            type: string
                            description: Name on the account.
                          accountNumber:
                            type: string
                            description: Account number (NUBAN).
                      card:
                        type: object
                        description: >-
                          Associated card — an id, or a summary object on nested
                          resources.
                        properties:
                          _id:
                            type: string
                            description: Unique identifier of the object.
                          type:
                            type: string
                            description: Type of the object.
                          brand:
                            type: string
                            description: Card scheme/brand (e.g. `Verve`, `MasterCard`).
                          currency:
                            type: string
                            description: ISO 4217 currency code (e.g. `NGN`).
                          maskedPan:
                            type: string
                            description: Masked card number (PAN).
                      pendingRequest:
                        type: object
                        description: Details of the amount currently being authorized.
                        properties:
                          amount:
                            type: integer
                            description: Amount in the minor currency unit (e.g. kobo).
                          currency:
                            type: string
                            description: ISO 4217 currency code (e.g. `NGN`).
                          merchantAmount:
                            type: integer
                            description: Amount in the merchant's currency.
                          merchantCurrency:
                            type: string
                            description: Merchant's ISO 4217 currency code.
                      transactionMetadata:
                        type: object
                        description: Channel and reference metadata for the transaction.
                        properties:
                          channel:
                            type: string
                            description: >-
                              Channel the transaction occurred on (`web`, `pos`,
                              `atm`).
                          type:
                            type: string
                            description: Type of the object.
                          reference:
                            type: string
                            description: Unique reference assigned to the object.
                      amount:
                        type: integer
                        description: Amount in the minor currency unit (e.g. kobo).
                      fee:
                        type: integer
                        description: Fee charged, in the minor currency unit.
                      vat:
                        type: integer
                        description: VAT charged, in the minor currency unit.
                      approved:
                        type: boolean
                        description: Whether the authorization was approved.
                      currency:
                        type: string
                        description: ISO 4217 currency code (e.g. `NGN`).
                      status:
                        type: string
                        description: Current status of the object.
                      authorizationMethod:
                        type: string
                        description: How the authorization was performed.
                      createdAt:
                        type: string
                        format: date-time
                        description: ISO 8601 timestamp of when the object was created.
                      updatedAt:
                        type: string
                        format: date-time
                        description: >-
                          ISO 8601 timestamp of when the object was last
                          updated.
                      __v:
                        type: integer
                        description: Internal document version (Mongo).
              example:
                statusCode: 200
                message: Authorization reversed successfully.
                data:
                  _id: 6840c1aa2b3c4d5e6f700222
                  business: 670cec9d25852ba485d74273
                  customer:
                    _id: 64a1b2c3d4e5f6a7b8c9d0e1
                    name: John Doe
                  account:
                    _id: 67974b365c184d20fc340889
                    type: account
                    currency: NGN
                    accountName: John Doe
                    accountNumber: '1234567890'
                  card:
                    _id: 6418eb71a37e405064694518
                    type: virtual
                    brand: Verve
                    currency: NGN
                    maskedPan: 506110******1234
                  pendingRequest:
                    amount: 5000
                    currency: NGN
                    merchantAmount: 5000
                    merchantCurrency: NGN
                  transactionMetadata:
                    channel: web
                    type: purchase
                    reference: TRX-250604-2156
                  amount: 5000
                  fee: 0
                  vat: 0
                  approved: true
                  currency: NGN
                  status: reversed
                  authorizationMethod: online
                  createdAt: '2025-06-04T21:05:26.115Z'
                  updatedAt: '2025-06-05T09:15:00.000Z'
                  __v: 0
        '400':
          description: Validation error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: >-
                      Status code of the response. `200` indicates a successful
                      request.
                  message:
                    type: string
                    description: Human-readable description of the result.
                  data:
                    nullable: true
                    description: Always `null` for error responses.
              example:
                statusCode: 400
                message: Invalid authorization id.
                data: null
        '401':
          description: Authentication failed — missing or invalid API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: >-
                      Status code of the response. `200` indicates a successful
                      request.
                  message:
                    type: string
                    description: Human-readable description of the result.
                  data:
                    nullable: true
                    description: Response payload.
              example:
                statusCode: 401
                message: >-
                  Unauthorized. Provide a valid API key in the Authorization
                  header.
                data: null
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      x-default: '{{APIKey}}'

````