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

# Fund Customer Wallet by Payment Token

> Verify a payment token and process a payment request. If a token is provided, the payment gateway is used; otherwise, the wallet is used.

This endpoint allows a customer to **fund their wallet account** either via a **payment token** or directly from the wallet.

Supported payment flows include:

* Using an **online card payment token** from a supported payment gateway
* Funding via the **customer wallet** if no token is provided

## 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="payableType" type="enum" required>
  Type of payable item.
</ParamField>

<ParamField body="payAbleId" type="string" required>
  Unique ID of the payable item to fund.
</ParamField>

<ParamField body="paymentGatewayRef" type="string" required>
  Payment gateway token reference when using card payment.
</ParamField>

<ParamField body="supportedPaymentGateWayProvider" type="enum" required>
  Payment gateway provider. Options:

  * `STRIPE_ACH`
  * `COINBASE_PAYMENT_API`
  * `POLI_PAYMENT_API`
  * `SECURE_TRADING`
  * `RAVE_FLUTTERWAVE`
  * `CUSTOM_POINT_OF_SALE`
</ParamField>

<ParamField body="paymentMethod" type="enum" required>
  Method of payment. Options include:

  * `ONLINE_CARD_PAYMENT`
  * `E_WALLET`
</ParamField>

<ParamField body="totalCheckOutAmount" type="number" required>
  Total amount to process for checkout.
</ParamField>

<ParamField body="beneficiaryLookUpPhoneNumber" type="string">
  Optional beneficiary phone number for payment processing.
</ParamField>

<ParamField body="passWord" type="string">
  Optional password required for certain wallet payments.
</ParamField>

<ParamField body="accountNumber" type="string">
  Optional account number for wallet or bank account payment.
</ParamField>

<ParamField body="paymentAccountNumbeCurrencyCode" type="enum">
  Currency code for the payment account, if applicable.
</ParamField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url "https://remitjunction.fincode.software/api/v6/services/paymentmanagement/processpaymentwithpaymenttoken" \
    --header 'Content-Type: application/json' \
    --header 'X-Auth-Token: your_auth_token' \
    --header 'uuid: your_device_uuid' \
    --header 'platform: WEB' \
    --data '{
      "payableType": "TRANSACTION",
      "payAbleId": "PAY12345",
      "paymentGatewayRef": "TOKEN_98765",
      "supportedPaymentGateWayProvider": "RAVE_FLUTTERWAVE",
      "paymentMethod": "ONLINE_CARD_PAYMENT",
      "totalCheckOutAmount": 150.00,
      "accountNumber": "1234567890",
      "paymentAccountNumbeCurrencyCode": "USD"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://remitjunction.fincode.software/api/v6/services/paymentmanagement/processpaymentwithpaymenttoken",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "X-Auth-Token": authToken,
        "uuid": deviceUuid,
        "platform": "WEB"
      },
      body: JSON.stringify({
        payableType: "TRANSACTION",
        payAbleId: "PAY12345",
        paymentGatewayRef: "TOKEN_98765",
        supportedPaymentGateWayProvider: "RAVE_FLUTTERWAVE",
        paymentMethod: "ONLINE_CARD_PAYMENT",
        totalCheckOutAmount: 150.00,
        accountNumber: "1234567890",
        paymentAccountNumbeCurrencyCode: "USD"
      })
    }
  );

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

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

  url = "https://remitjunction.fincode.software/api/v6/services/paymentmanagement/processpaymentwithpaymenttoken"
  headers = {
      "Content-Type": "application/json",
      "X-Auth-Token": "your_auth_token",
      "uuid": "your_device_uuid",
      "platform": "WEB"
  }
  payload = {
      "payableType": "TRANSACTION",
      "payAbleId": "PAY12345",
      "paymentGatewayRef": "TOKEN_98765",
      "supportedPaymentGateWayProvider": "RAVE_FLUTTERWAVE",
      "paymentMethod": "ONLINE_CARD_PAYMENT",
      "totalCheckOutAmount": 150.00,
      "accountNumber": "1234567890",
      "paymentAccountNumbeCurrencyCode": "USD"
  }

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