---
updatedAt: 2025-04-29T20:32:51.000Z
agentTools:
  projectIndex: https://alliance-pay.readme.io/llms.txt
---

# Fetch Transaction fees

Query the fee for a transaction. This endpoint accepts only encrypted requests. Learn more about <a href="https://alliance-pay.readme.io/reference/getting-started#fetch-transaction-fees">unencrypted requested</a> and <a href="https://alliance-pay.readme.io/docs/getting-started-1">encryption</a>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "alliance-pay-apis-v1",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://checkout-api.alliancepay.cloud"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/checkout/order/fee": {
      "post": {
        "summary": "Fetch Transaction fees",
        "description": "Query the fee for a transaction. This endpoint accepts only encrypted requests. Learn more about <a href=\"https://alliance-pay.readme.io/reference/getting-started#fetch-transaction-fees\">unencrypted requested</a> and <a href=\"https://alliance-pay.readme.io/docs/getting-started-1\">encryption</a>",
        "operationId": "create-orders-copy-2",
        "parameters": [
          {
            "name": "api-key",
            "in": "header",
            "description": "The merchant's public key e.g. `PA-PUBKEY-TEST-0a9bxxxx-xxxx-xxxx-xxxx-xxxxb286xxxx`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "data"
                ],
                "properties": {
                  "data": {
                    "type": "string",
                    "description": "The encrypted data for this request. Learn more about encryption <a href=\"https://alliance-pay.readme.io/docs/getting-started-1\">here.</a>"
                  }
                }
              },
              "examples": {
                "Sample request": {
                  "value": {
                    "data": "B9pQJ1HoxybgfjNnEro+26w7lQZ6jriF3AFiUeGH2Ggacn6cF0srUlqiHEXeEncJcMw6ThDobjuS+AsmvhNfvGPGMddjbt5rcK2JrUnUI4cHk0XebJKoNnjEqivcyq0UKEMdYOLd6mYZtvKu5FMlpz0Lo0aMY49pnYvUGLSsCf/wOhlPx9PHgQDXptT+WBJcO3lzeD8O0S4IVSWPCWPLi7GhGlqhZpheEi1FHq39TCHk12hL3sqkkIktZIkkQVAe8AkwZGhy/CMJZrTzU6IXZr2ulT7mJenZljSk66m0pARcUqwMw/+5PEPECDo8SX3IkX2hmym02pGuWZeHE9ONWcaW7h8UIroQ/+kThz/RtP/UMiK3596cij66JcW+RcXKPiqNKysskcnaOlQFIFuhEiAczimLgd320RrQzehaw1C33UGsCzAG1p2EnDthjTF63BZtEhVlu9kN7qtFCz9AvojZeaZFKOxpJJ0usfwl9Hq5oAa56AFt/3IIsvqrAktTOyMgQ/jGQ6uhRYpA6UAH0CcYyv7L99hgVtRTXAxA/rpCtY7aTR9Pjxb5Lt1IV0Q1V8fWxAv0yY+ss07qeiSIsccsdJiN4LaMx3RvmDlu54XF68w51L34hOCDj/NBoPVUZrSaCJK2GPJ6CjOHI8q2/U2TkU+y+a80XCAC/rgqGhw="
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"data\": {\n        \"fee\": 6.00,\n        \"amount\": 100.0,\n        \"subsidiaryFee\": 0.00,\n        \"customerFee\": 6.00,\n        \"totalChargedAmount\": 106.00,\n        \"paymentOption\": \"C\"\n    },\n    \"status\": \"success\",\n    \"statusCode\": \"00\",\n    \"message\": \"Operation successful\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "fee": {
                          "type": "integer",
                          "example": 6,
                          "default": 0
                        },
                        "amount": {
                          "type": "integer",
                          "example": 100,
                          "default": 0
                        },
                        "subsidiaryFee": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "customerFee": {
                          "type": "integer",
                          "example": 6,
                          "default": 0
                        },
                        "totalChargedAmount": {
                          "type": "integer",
                          "example": 106,
                          "default": 0
                        },
                        "paymentOption": {
                          "type": "string",
                          "example": "C"
                        }
                      }
                    },
                    "status": {
                      "type": "string",
                      "example": "success"
                    },
                    "statusCode": {
                      "type": "string",
                      "example": "00"
                    },
                    "message": {
                      "type": "string",
                      "example": "Operation successful"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid amount": {
                    "value": "{\n    \"status\": \"failed\",\n    \"message\": \"The Amount field is required.\"\n}"
                  },
                  "Invalid Payment Option": {
                    "value": "{\n    \"status\": \"failed\",\n    \"message\": \"payment_option is required!\"\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "title": "Invalid amount",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "failed"
                        },
                        "message": {
                          "type": "string",
                          "example": "The Amount field is required."
                        }
                      }
                    },
                    {
                      "title": "Invalid Payment Option",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "failed"
                        },
                        "message": {
                          "type": "string",
                          "example": "payment_option is required!"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```