> ## 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.

# Supported Payment Methods

> Retrieve available payment methods with charges, fees, and metadata for a specific transaction or payment amount.

This endpoint returns all supported payment methods available for a transaction based on the customer's country, currency, amount, and payable type. It calculates fees, taxes, and exchange rates for each payment method.

## Authentication

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

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

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

## Request Body

<ParamField body="pcn" type="string" required>
  Payment Control Number - unique identifier for the payable item
</ParamField>

<ParamField body="payAbleType" type="enum" required>
  Type of payable item

  **Options:**

  * `TRANSACTION` - Remittance/money transfer
  * `WALLET` - Generic wallet payment
  * `WALLET_CUSTOMER` - Personal wallet payment
  * `WALLET_PAYCENTER` - Agent wallet payment
  * `BILL` - Bill payment
  * `MERCHANT` - Product payment
  * `VOUCHER` - Voucher purchase
  * `WITHDRAWAL` - Wallet withdrawal
</ParamField>

<ParamField body="countryIsoCode3" type="string" required>
  Three-letter ISO country code (e.g., "USA", "GBR", "NGA")
</ParamField>

<ParamField body="currency" type="string">
  Three-letter currency code (e.g., "USD", "GBP", "NGN"). Required if PCN is not provided.
</ParamField>

<ParamField body="amount" type="string">
  Payment amount as string. Required if PCN is not provided.
</ParamField>

<ParamField body="appId" type="string">
  Application identifier for specific integrations
</ParamField>

<ParamField body="transactionType" type="enum">
  Specific transaction type filter

  **Options:**

  * `ACCOUNTPAYMENT` - Bank transfer
  * `CASHPICKUP` - Cash pickup
  * `MOBILE_MONEY` - Mobile money
  * `WALLET` - Wallet payment
  * `BILL_PAYMENT` - Bill payment
</ParamField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://remitjunction.fincode.software/api/v6/services/paymentmanagement/supported-payment-methods \
    --header 'Content-Type: application/json' \
    --header 'X-Auth-Token: your_auth_token' \
    --header 'uuid: device_uuid' \
    --header 'platform: WEB' \
    --data '{
      "pcn": "PCN123456789",
      "payAbleType": "TRANSACTION",
      "countryIsoCode3": "USA"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://remitjunction.fincode.software/api/v6/services/paymentmanagement/supported-payment-methods', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-Auth-Token': 'your_auth_token',
      'uuid': 'device_uuid',
      'platform': 'WEB'
    },
    body: JSON.stringify({
      pcn: 'PCN123456789',
      payAbleType: 'TRANSACTION',
      countryIsoCode3: 'USA'
    })
  });

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

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

  url = "https://remitjunction.fincode.software/api/v6/services/paymentmanagement/supported-payment-methods"
  headers = {
      "Content-Type": "application/json",
      "X-Auth-Token": "your_auth_token",
      "uuid": "device_uuid",
      "platform": "WEB"
  }
  payload = {
      "pcn": "PCN123456789",
      "payAbleType": "TRANSACTION",
      "countryIsoCode3": "USA"
  }

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

## Use Cases

### 1. Display Payment Options

Use this endpoint to show customers all available payment methods:

```javascript theme={null}
// Fetch payment methods
const methods = await getPaymentMethods(pcn, 'TRANSACTION');

// Display to user
methods.data.paymentMethodsMetadata.forEach(method => {
  console.log(`${method.paymentMethodLabel}: ${method.totalAmount}`);
});
```

### 2. Pre-calculate Total Amount

Calculate the total amount before payment:

```javascript theme={null}
const response = await getPaymentMethods(pcn);
const { principal_amount, fee, tax, fx_rate } = response.data;

console.log(`Amount: ${principal_amount}`);
console.log(`Fee: ${fee}`);
console.log(`Tax: ${tax}`);
console.log(`Total: ${principal_amount + fee + tax}`);
console.log(`You will receive: ${principal_amount * fx_rate}`);
```

### 3. Check Wallet Balance

Determine if customer has sufficient wallet balance:

```javascript theme={null}
const methods = await getPaymentMethods(pcn);
const walletMethod = methods.data.paymentMethodsMetadata
  .find(m => m.paymentMethod === 'E_WALLET');

if (walletMethod && walletMethod.metadata.sufficient) {
  // Show wallet as primary option
  showWalletPayment(walletMethod);
} else {
  // Show alternative methods
  showOtherMethods(methods.data.paymentMethodsMetadata);
}
```
