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

# Void Authorization API

> The Void Authorization API is used to cancel a previously authorized payment before the funds are captured, releasing the hold on the customer’s account.

### Key Points

<Info>
  * The Void Authorization API is crucial when a decision is made not to proceed with a transaction that has been authorised but not yet captured.

  * Once the authorization is voided, the funds that were held on the customer’s account are released, making them available to the customer again.

  * This API is typically used in scenarios where an order is cancelled before fulfilment or if there’s a change in transaction details requiring re-authorisation.
</Info>

## Flow diagram

<img src="https://mintcdn.com/dasdoc/kfo25CLU3J6KbVVp/images/timeline-diagram/flows-API-void.svg?fit=max&auto=format&n=kfo25CLU3J6KbVVp&q=85&s=fa301274e728aea8c770aa9e36bbad55" alt="Flow diagram image" width="1997" height="868" data-path="images/timeline-diagram/flows-API-void.svg" />

## Api Parameters


## OpenAPI

````yaml api-reference/en/open-api-config/server-to-server/void-authorization.json POST /api/v1/server-to-server-interface/void
openapi: 3.0.1
info:
  title: Payment Options API
  description: API for generating Hosted Payment Page (HPP) links and processing payments.
  version: 1.0.0
servers:
  - url: https://api-dev.paymentoptions.com
security:
  - apiKeyAuth: []
    xApiKeyAuth: []
paths:
  /api/v1/server-to-server-interface/void:
    post:
      summary: Void a Transaction
      description: This endpoint allows merchants to void an authorized transaction.
      operationId: voidTransaction
      requestBody:
        description: The request payload to void a transaction.
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                transactionId:
                  type: string
                  description: The original transaction ID of the authorized transaction.
                  example: ab8444e7-fec0-40dd-994d-0ad813785f74
                  maxLength: 36
                merchant_id:
                  type: string
                  description: The merchant ID (DASMID).
                  example: < Merchant ID >
                  maxLength: 10
              required:
                - transactionId
                - merchant_id
      responses:
        '201':
          description: Transaction voided successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: True on successful transaction, false on failure.
                    example: true
                  status_code:
                    type: integer
                    description: The status code of the transaction.
                    example: 201
                  is_live:
                    type: boolean
                    description: True if live transaction, false if test transaction.
                    example: false
                  transaction_type:
                    type: string
                    description: The transaction type (e.g., VOID).
                    example: VOID
                  gateway_response:
                    type: object
                    description: A JSON object containing the response from the gateway.
                    properties:
                      version:
                        type: string
                        description: The version of the gateway.
                        example: '1'
                      type:
                        type: string
                        description: Type of response (e.g., INFO).
                        example: INFO
                      message:
                        type: string
                        description: The message response from the gateway.
                        example: Authorization Successfully Cancelled.
                      code:
                        type: string
                        description: Message code of the response.
                        example: INFO0003
                  merchant_details:
                    type: object
                    description: A JSON object containing the details of the merchant.
                    properties:
                      legal_name:
                        type: string
                        description: The merchant’s legal name.
                        example: Tink15 Factory
                      mid:
                        type: string
                        description: The merchant ID (DASMID).
                        example: < Merchant ID >
                      merchant_txn_ref:
                        type: string
                        description: The merchant transaction reference.
                        example: qwe
                  payment_details:
                    type: object
                    description: >-
                      A JSON object containing the payment details of the
                      transaction.
                    properties:
                      amount:
                        type: number
                        description: The amount value of the transaction.
                        example: 1000
                      response_code:
                        type: integer
                        description: The acquirer response code.
                        example: 0
                      auth_code:
                        type: string
                        description: The acquirer authorization code.
                        example: '917290'
                      currency:
                        type: string
                        description: The currency of the transaction.
                        example: JPY
                      payment_method:
                        type: string
                        description: >-
                          The payment card type (e.g., Credit Card or Debit
                          Card).
                        example: ECMC-SSL
                      scheme:
                        type: string
                        description: The card brand scheme (e.g., MASTERCARD).
                        example: MASTERCARD
                      card:
                        type: object
                        description: A JSON object containing details of the card.
                        properties:
                          name:
                            type: string
                            description: The cardholder’s name on the card.
                            example: John Doe
                          number:
                            type: string
                            description: The card number (masked).
                            example: '5200000000001005'
                          exp_month:
                            type: string
                            description: The expiry month of the card.
                            example: '12'
                          exp_year:
                            type: string
                            description: The expiry year of the card.
                            example: '29'
                      additional_data:
                        type: object
                        description: A JSON object containing additional data.
                        properties:
                          payment_data_source:
                            type: object
                            description: A JSON object containing payment data source.
                            properties:
                              type:
                                type: string
                                description: >-
                                  The type of payment data source (e.g., Card,
                                  GooglePay, ApplePay).
                                example: card
                  transaction_details:
                    type: object
                    description: A JSON object containing details of the transaction.
                    properties:
                      id:
                        type: string
                        description: The transaction ID of the transaction.
                        example: 9e9255f5-d3dc-423e-9026-6e4da194bab5
                      ref:
                        type: integer
                        description: The authorization code of the transaction.
                        example: 74813
                      timestamp:
                        type: string
                        description: Date and time of the transaction.
                        example: '2024-11-25T08:33:48.000Z'
                      merchant_txn_ref:
                        type: string
                        description: The merchant transaction reference ID.
                        example: qwe
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: Authorization
      in: header
      description: 'API Key for Authorization. Format: ''Basic YOUR_API_KEY_HERE'''
    xApiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header
      description: API Key specific to x-api-key.

````