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

# Quickstart

This guides demonstrate how to use Swervpay NodeJS SDK to integrate Swervpay into your NodeJS application.

### Setup

Make sure you have create a Swervpay business and have your API keys ready. Don't forget to check our recommended [go live checklist](/go-live-checklist).

### Install the SDK

Install [swervpay-node](https://www.npmjs.com/package/@swervpaydev/sdk) sdk into your new or existing NodeJS application using any of your favorite package manager.

<CodeGroup>
  ```bash npm theme={null}
  $ npm install @swervpaydev/sdk
  ```

  ```bash yarn theme={null}
  $ yarn add @swervpaydev/sdk
  ```

  ```bash pnpm theme={null}
  $ pnpm add @swervpaydev/sdk
  ```

  ```bash bun theme={null}
  $ bun install @swervpaydev/sdk
  ```
</CodeGroup>

### Usage

```javascript NodeJS theme={null}
import { SwervpayClient } from "@swervpaydev/sdk";

const config = {
    secretKey: "<SECRET_KEY>",
    businessId: "<BUSINESS_ID>"
}

const swervpay = new SwervpayClient(config);

// Create a new customer
await swervpay.customer.create({
    firstname: "user",
    lastname: "user",
    middlename: "user",
    country: "user",
    email: "user@mailinator.com"
})

// Create a new card
await swervpay.card.create({
    customer_id: "user",
    amount: 10,
    currency: "USD",
    provider: "MASTERCARD",
    type: "DEFAULT"
})

// Create a USD collection account for a customer
await swervpay.collection.create({
    customer_id: "user",
    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"
    }
})

// Create a new payout
await swervpay.payout.create({
    bank_code: "user",
    account_number: "user",
    amount: "user",
    currency: "NGN",
    reference: "user",
    narration: "user"
})
```

Here, we initialize the Swervpay client with our secret key and business id. Then we create a new customer, card, USD collection account, and payout.

### Next Steps

* [Go Live Checklist](/go-live-checklist)

* [API Reference](/api-reference)

### Other SDKs

* [PHP](https://packagist.org/packages/swervpaydev/sdk)
* [Laravel](https://packagist.org/packages/swervpaydev/laravel)
* [Go](https://github.com/swerv-ltd/swervpay-go)
