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

# Payment Methods Charges

> Retrieve applicable charges for a selected payment method based on transaction or transfer details.

This endpoint allows a user to **calculate payment charges** associated with different payment methods.

It supports scenarios including:

* Customer transactions (`subAction = "transaction"`)
* Money transfers (`subAction = "transfer"`)

Charges are determined based on:

* Selected payment method
* Amount and currency
* Organisation and customer country

## Authentication

<ParamField header="X-Auth-Token" type="string" required>
  Authentication token obtained after login.
</ParamField>

<ParamField header="uuid" type="string" required>
  Device UUID used for request tracking.
</ParamField>

<ParamField header="platform" type="string" required>
  Platform identifier (e.g., "WEB", "ANDROID", "IOS").
</ParamField>

## Request Body

<ParamField body="pcn" type="string">
  Payment code number. Required if `subAction = "transaction"`.
</ParamField>

<ParamField body="subAction" type="string" required>
  Action type. Accepted values:

  * `"transaction"`
  * `"transfer"`
</ParamField>

<ParamField body="payment_method" type="string" required>
  Selected payment method. Must match `PaymentMethod` enum, e.g., `"ONLINE_CARD_PAYMENT"`, `"BANK_TRANSFER"`.
</ParamField>

<ParamField body="currency" type="string">
  Currency code for the transfer (required if `subAction = "transfer"`).
</ParamField>

<ParamField body="amount" type="string">
  Amount for the transfer (required if `subAction = "transfer"`).
</ParamField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url "https://remitjunction.fincode.software/api/v6/services/paymentmanagement/payment-methods-charges" \
    --header 'Content-Type: application/json' \
    --header 'X-Auth-Token: your_auth_token' \
    --header 'uuid: your_device_uuid' \
    --header 'platform: WEB' \
    --data '{
      "subAction": "transfer",
      "payment_method": "BANK_TRANSFER",
      "currency": "USD",
      "amount": "150"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://remitjunction.fincode.software/api/v6/services/paymentmanagement/payment-methods-charges",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "X-Auth-Token": authToken,
        "uuid": deviceUuid,
        "platform": "WEB"
      },
      body: JSON.stringify({
        subAction: "transfer",
        payment_method: "BANK_TRANSFER",
        currency: "USD",
        amount: "150"
      })
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  url = "https://remitjunction.fincode.software/api/v6/services/paymentmanagement/payment-methods-charges"
  headers = {
      "Content-Type": "application/json",
      "X-Auth-Token": "your_auth_token",
      "uuid": "your_device_uuid",
      "platform": "WEB"
  }
  payload = {
      "subAction": "transfer",
      "payment_method": "BANK_TRANSFER",
      "currency": "USD",
      "amount": "150"
  }

  response = requests.post(url, json=payload, headers=headers)
  data = response.json()
  ```
</CodeGroup>

## Use Cases

### 1. Retrieve Charges for a Transfer

```javascript theme={null}
await paymentMethodsCharges({
  subAction: "transfer",
  payment_method: "BANK_TRANSFER",
  currency: "USD",
  amount: "150"
});
```

### 2. Retrieve Charges for a Transaction

```javascript theme={null}
await paymentMethodsCharges({
  subAction: "transaction",
  pcn: "PCN123",
  payment_method: "ONLINE_CARD_PAYMENT"
});
```
