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

# Overview

> Swerv Collection allows businesses to accept payments from their customers using virtual accounts & payment link.

## Supported partners

Below are the list of currently supported partners for virtual account issuing

* VFD Microfinance Bank
* Bridge for USD collection accounts

## Create Virtual Account

To create a virtual account, use the [create](/api-reference/collections/create) collection endpoint.

**Parameters**

<ParamField body="customer_id" type="string">
  The unique identifier for the customer to whom the card will be issued.
</ParamField>

<ParamField body="currency" type="string" required>
  The three-letter ISO currency code in uppercase. Use `NGN` for Naira accounts and `USD` for USD collection accounts.
</ParamField>

<ParamField body="merchant_name" type="string">
  merchant name that will be displayed on the virtual account. Required for ONE\_TIME (Temporary) virtual account.
</ParamField>

<ParamField body="type" type="string" required>
  virtual account type e.g DEFAULT (Permanent), ONE\_TIME (Temporary)
</ParamField>

<ParamField body="amount" type="integer">
  amount expected to be paid into the virtual account. Required for ONE\_TIME (Temporary) virtual account.
</ParamField>

<ParamField body="additional_information" type="object">
  Required when `currency` is `USD`. This contains the customer identity, address, document, source of funds, and supporting document details required for USD account issuance.
</ParamField>

<Note>
  Note: `customer_id` is required for `DEFAULT` permanent virtual accounts.
</Note>

```JSON Request Body theme={null}
{
    "customer_id": "user",
    "currency": "NGN",
    "merchant_name": "Swerv",
    "amount": 10,
    "type": "ONE_TIME"
}
```

### USD collection accounts

USD collection accounts are issued through Swervpay's Bridge-backed collection flow. Before creating a USD collection account, create the customer and submit customer KYC. Then create a `DEFAULT` collection with `currency` set to `USD` and include the required `additional_information` payload.

USD account issuance can be asynchronous. If the customer is already approved, the account details may be available shortly after creation. If additional review is required, listen for the `collection.created` or `collection.created.failed` webhook event.

```json USD Request Body theme={null}
{
  "customer_id": "cus_123456789",
  "currency": "USD",
  "merchant_name": "Ada Okafor",
  "amount": 0,
  "type": "DEFAULT",
  "additional_information": {
    "account_type": "INDIVIDUAL",
    "nin": "12345678901",
    "tax_number": "12345678901",
    "date_of_birth": "1994-04-12",
    "employment_status": "EMPLOYED",
    "account_designation": "PERSONAL",
    "income_band": "UNDER_10000",
    "source_of_income": "SALARY",
    "address": {
      "street": "12 Admiralty Way",
      "city": "Lagos",
      "state": "Lagos",
      "country": "Nigeria",
      "zip_code": "100001"
    },
    "document": {
      "type": "NIN",
      "number": "12345678901",
      "issue_date": "2020-01-01",
      "expiry_date": "2030-01-01",
      "urls": ["https://example.com/document-front.jpg"]
    },
    "utility_bill": "https://example.com/utility-bill.pdf",
    "bank_statement": "https://example.com/bank-statement.pdf"
  }
}
```

Swervpay securely submits the required customer data to Bridge, creates or reuses the Bridge customer profile, and issues the USD deposit account when the customer is approved.

### 🔍 Get Collection Details

Retrieve detailed information of a specific collection with their unique identifier using the [get](/api-reference/collections/get) collection endpoint.

**Path Parameters**

<ParamField path="id" type="string" required>
  The unique identifier of the collection to retrieve.
</ParamField>

### 🔍 Get All collections

Retrieve a list of all collections by sending a request to the [get all](/api-reference/collections/get-all-collections) collections endpoint.

**Query Parameters**

<ParamField query="page" type="string" default={1} required>
  The page to return.
</ParamField>

<ParamField query="limit" type="string" default={10} required>
  The maximum number of results to return.
</ParamField>

**Response Example**

The response provides an array of wallet objects, each containing comprehensive details about the wallets associated with your Swerv account.

```json Response theme={null}
[
  {
    "account_name": "string",
    "account_number": "string",
    "account_type": "string",
    "balance": 100000, // Balance in the smallest currency unit
    "bank_address": "string",
    "bank_code": "string",
    "bank_name": "string",
    "created_at": "2024-01-01T00:00:00Z",
    "id": "wlt_123456789",
    "is_blocked": false,
    "pending_balance": 50000, // Pending balance in the smallest currency unit
    "reference": "string",
    "routing_number": "string",
    "total_received": 1500000, // Total amount received in the smallest currency unit
    "updated_at": "2024-01-02T00:00:00Z"
  }
  // ...other wallets
]
```
