> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.epaygames.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.epaygames.io/_mcp/server.

# Calculate Total w/ Fee

GET https://v1/biller/channels/calculate

### Calculate Total with Fee

The **Calculate Total with Fee** endpoint lets you pre-calculate the payment channel's fee before generating a transaction. This is useful if you want to display a UI confirmation showing the total amount including fees on your platform.

This endpoint is optional and depends on how you design your payment flow. It is recommended if your credentials apply an additional fee on top of the original amount.

Reference: https://docs.epaygames.io/epaygames-payments-disbursement-api/payments-api/calculate-total-w-fee

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /v1/biller/channels/calculate:
    get:
      operationId: ' Fee'
      summary: Calculate Total w/ Fee
      description: >-
        ### Calculate Total with Fee


        The **Calculate Total with Fee** endpoint lets you pre-calculate the
        payment channel's fee before generating a transaction. This is useful if
        you want to display a UI confirmation showing the total amount including
        fees on your platform.


        This endpoint is optional and depends on how you design your payment
        flow. It is recommended if your credentials apply an additional fee on
        top of the original amount.
      tags:
        - paymentsApi
      parameters:
        - name: channel_code
          in: query
          description: >-
            Values are available via the Get Channels endpoint. Refer to the
            code parameter in the response.
          required: false
          schema:
            type: string
        - name: amount
          in: query
          description: Must be between 0.01 and 50,000.
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Payments API_Calculate Total w/
                  Fee_Response_200
servers:
  - url: https:/
    description: https://{payments_api_host}
components:
  schemas:
    V1BillerChannelsCalculateGetResponsesContentApplicationJsonSchemaDataCurrency:
      type: object
      properties:
        name:
          type: string
        code:
          description: Any type
        symbol:
          description: Any type
      required:
        - name
      title: >-
        V1BillerChannelsCalculateGetResponsesContentApplicationJsonSchemaDataCurrency
    V1BillerChannelsCalculateGetResponsesContentApplicationJsonSchemaDataChannelCategory:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        slug:
          type: string
      required:
        - name
        - description
        - slug
      title: >-
        V1BillerChannelsCalculateGetResponsesContentApplicationJsonSchemaDataChannelCategory
    V1BillerChannelsCalculateGetResponsesContentApplicationJsonSchemaDataChannel:
      type: object
      properties:
        name:
          type: string
        desciption:
          description: Any type
        slug:
          type: string
        code:
          type: string
        logo:
          type: string
          format: uri
        category:
          $ref: >-
            #/components/schemas/V1BillerChannelsCalculateGetResponsesContentApplicationJsonSchemaDataChannelCategory
      required:
        - name
        - slug
        - code
        - logo
        - category
      title: >-
        V1BillerChannelsCalculateGetResponsesContentApplicationJsonSchemaDataChannel
    V1BillerChannelsCalculateGetResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        subtotal_amount:
          type: integer
        service_fee:
          type: integer
        total_amount:
          type: integer
        is_web_payment:
          type: boolean
        items:
          type: array
          items:
            description: Any type
        currency:
          $ref: >-
            #/components/schemas/V1BillerChannelsCalculateGetResponsesContentApplicationJsonSchemaDataCurrency
        channel:
          $ref: >-
            #/components/schemas/V1BillerChannelsCalculateGetResponsesContentApplicationJsonSchemaDataChannel
      required:
        - subtotal_amount
        - service_fee
        - total_amount
        - is_web_payment
        - items
        - currency
        - channel
      title: V1BillerChannelsCalculateGetResponsesContentApplicationJsonSchemaData
    Payments API_Calculate Total w/ Fee_Response_200:
      type: object
      properties:
        message:
          type: string
        data:
          $ref: >-
            #/components/schemas/V1BillerChannelsCalculateGetResponsesContentApplicationJsonSchemaData
      required:
        - message
        - data
      title: Payments API_Calculate Total w/ Fee_Response_200

```

## Examples



**Response**

```json
{
  "message": "",
  "data": {
    "subtotal_amount": 1000,
    "service_fee": 0,
    "total_amount": 1000,
    "is_web_payment": true,
    "items": [],
    "currency": {
      "name": "Philippine Peso"
    },
    "channel": {
      "name": "GCash",
      "slug": "gcash-qrph",
      "code": "GCASH_QRPH",
      "logo": "https://cdn.eplayment.co/payment-channels/gcash.png",
      "category": {
        "name": "E-Wallet",
        "description": "E-Wallet payment channels.",
        "slug": "e-wallet"
      }
    }
  }
}
```

**SDK Code**

```python Payments API_Calculate Total w/ Fee_example
import requests

url = "https://https/v1/biller/channels/calculate"

querystring = {"amount":"1000","channel_code":"GCASH_QRPH"}

response = requests.get(url, params=querystring)

print(response.json())
```

```javascript Payments API_Calculate Total w/ Fee_example
const url = 'https://https/v1/biller/channels/calculate?amount=1000&channel_code=GCASH_QRPH';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Payments API_Calculate Total w/ Fee_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://https/v1/biller/channels/calculate?amount=1000&channel_code=GCASH_QRPH"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Payments API_Calculate Total w/ Fee_example
require 'uri'
require 'net/http'

url = URI("https://https/v1/biller/channels/calculate?amount=1000&channel_code=GCASH_QRPH")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java Payments API_Calculate Total w/ Fee_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://https/v1/biller/channels/calculate?amount=1000&channel_code=GCASH_QRPH")
  .asString();
```

```php Payments API_Calculate Total w/ Fee_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://https/v1/biller/channels/calculate?amount=1000&channel_code=GCASH_QRPH');

echo $response->getBody();
```

```csharp Payments API_Calculate Total w/ Fee_example
using RestSharp;

var client = new RestClient("https://https/v1/biller/channels/calculate?amount=1000&channel_code=GCASH_QRPH");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift Payments API_Calculate Total w/ Fee_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://https/v1/biller/channels/calculate?amount=1000&channel_code=GCASH_QRPH")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```