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

# Awaiting Payment Actions

> Perform actions on an awaiting payment record such as marking it as 'paid' or 'cancel'. Returns the updated list of awaiting payments based on filters.

This endpoint allows a user (excluding cashiers) to **perform actions** on an existing awaiting bank transfer payment.

Supported actions include:

* Marking a payment as **paid**
* Marking a payment as **cancelled**
* Returning an **updated list of awaiting payments** using optional date and currency filters

## 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="awaitingPaymentId" type="string" required>
  Unique ID of the awaiting payment to update.
</ParamField>

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

  * `"paid"`
  * `"cancel"`
</ParamField>

<ParamField body="selectedCurrency" type="string">
  Currency used to filter updated list results (e.g., `"USD"`, `"NGN"`).
</ParamField>

<ParamField body="fromDate" type="string">
  Start date (`dd/MM/yyyy`) for fetching updated awaiting payments.
</ParamField>

<ParamField body="toDate" type="string">
  End date (`dd/MM/yyyy`) for fetching updated awaiting payments.
</ParamField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url "https://remitjunction.fincode.software/api/v6/services/paymentmanagement/awaiting-payment-actions" \
    --header 'Content-Type: application/json' \
    --header 'X-Auth-Token: your_auth_token' \
    --header 'uuid: your_device_uuid' \
    --header 'platform: WEB' \
    --data '{
      "awaitingPaymentId": "AP12345",
      "subAction": "paid",
      "selectedCurrency": "USD",
      "fromDate": "01/01/2024",
      "toDate": "31/01/2024"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://remitjunction.fincode.software/api/v6/services/paymentmanagement/awaiting-payment-actions",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "X-Auth-Token": authToken,
        "uuid": deviceUuid,
        "platform": "WEB"
      },
      body: JSON.stringify({
        awaitingPaymentId: "AP12345",
        subAction: "paid",
        selectedCurrency: "USD",
        fromDate: "01/01/2024",
        toDate: "31/01/2024"
      })
    }
  );

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

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

  url = "https://remitjunction.fincode.software/api/v6/services/paymentmanagement/awaiting-payment-actions"
  headers = {
      "Content-Type": "application/json",
      "X-Auth-Token": "your_auth_token",
      "uuid": "your_device_uuid",
      "platform": "WEB"
  }

  payload = {
      "awaitingPaymentId": "AP12345",
      "subAction": "paid",
      "selectedCurrency": "USD",
      "fromDate": "01/01/2024",
      "toDate": "31/01/2024"
  }

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