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

# Quickstart

<Highlight># Quickstart</Highlight>

DollarPe provides a comprehensive suite of APIs that enables businesses to offer **fiat-to-crypto** (onramp) and **crypto-to-fiat** (offramp) services to their customers. By managing the intricacies of cryptocurrency transactions, KYC compliance, and banking processes, our solution enables you to deliver smooth onramp and offramp experiences while staying focused on your core operations.

<Note>
  **Partner Integration Benefits**

  * Enable **fiat-to-crypto** and **crypto-to-fiat** conversions without the complexity of building blockchain infrastructure
  * Leverage our pre-built KYC verification and banking relationships to meet global compliance requirements
  * Access industry-leading exchange rates and minimal transaction fees to maximize your profitability
  * Deliver fast, reliable conversion options that enhance customer satisfaction and retention
</Note>

## Integration Journey

As a DollarPe partner, your integration journey involves these key steps:

<CardGroup cols={2}>
  <Card title="Getting Started" icon="rocket" href="/guides/introduction">
    Learn the basics of DollarPe integration, including authentication,
    environment setup, and initial configuration.
  </Card>

  <Card title="Stablecoins & Blockchains" icon="coins" href="/guides/support/stablecoins_and_blockchains">
    Understand our supported cryptocurrencies and blockchain asset, networks for
    optimal implementation.
  </Card>

  <Card title="Fiat Payment Methods" icon="credit-card" href="/guides/support/fiatMethods">
    Explore the available fiat options you can offer to your customers.
  </Card>

  <Card title="KYC Integration" icon="user-shield" href="/api-reference-exchange/integration-guides/kyc-integration-guide">
    Implement our KYC verification flow to ensure regulatory compliance for your
    users.
  </Card>

  <Card title="PayIn Integration" icon="bitcoin" href="/api-reference-exchange/integration-guides/payin-integration-guide">
    Connect to our payin system to enable <strong>fiat-to-crypto</strong>{" "}
    transfers to wallet addresses.
  </Card>

  <Card title="Payout Integration" icon="money-bill-trend-up" href="/api-reference-exchange/integration-guides/payout-integration-guide">
    Connect to our payout system to enable <strong>crypto-to-fiat</strong>{" "}
    transfers to bank accounts.
  </Card>

  <Card title="Remittance Payout Integration" icon="money-bill-transfer" href="/api-reference-exchange/integration-guides/remittance-payout-guide">
    Create a remitter and route a <strong>crypto-to-fiat</strong>{" "}
    payout on behalf of a remittance user.
  </Card>

  <Card title="Webhooks & Notifications" icon="bell" href="/guides/webhooks">
    Set up webhooks to receive real-time updates on transaction statuses and
    important events.
  </Card>

  <Card title="Testing & Sandbox" icon="vial" href="/guides/sandbox-testing">
    Learn how to test your integration in our sandbox environment before going
    live.
  </Card>
</CardGroup>

## Partner Integration Flow

The typical partner integration flow follows these steps:

```mermaid theme={null}
flowchart TD
    Start([Start Integration]) --> Auth[Set Up API Authentication]
    Auth --> Webhook[Configure Webhooks for
    Notifications]

    Webhook --> KYC[Implement Customer KYC Flow]
    KYC --> KYCVerified{KYC Verified?}

    KYCVerified -->|No| HandleKYCFailure[Handle KYC Failure]
    HandleKYCFailure --> KYC

    KYCVerified -->|Yes| AddBank[Add Customer Bank Account]
    AddBank --> BankVerified{Bank Verified?}

    BankVerified -->|No| HandleBankFailure[Handle Bank Verification Failure]
    HandleBankFailure --> AddBank

    BankVerified -->|Yes| FlowType{Choose Flow}

    FlowType -->|Payout| PayoutFlow[Fetch Payout Configurations]
    PayoutFlow --> FetchRate[Fetch Current Exchange Rate]
    FetchRate --> CreateQuote[Create Payout Quotation]
    CreateQuote --> InitiatePayout[Initiate Fiat Payout]
    InitiatePayout --> MonitorStatus[Monitor Payout Status]
    MonitorStatus --> Complete([Integration Complete])

    FlowType -->|PayIn| PayInFlow[Fetch PayIn Configurations]
    PayInFlow --> FetchPayInRate[Fetch PayIn Exchange Rate]
    FetchPayInRate --> CreatePayInQuote[Create PayIn Quotation]
    CreatePayInQuote --> SendFiat[Send Fiat to Bank Details]
    SendFiat --> InitiatePayIn[Initiate PayIn Transaction]
    InitiatePayIn --> MonitorPayInStatus[Monitor PayIn Status]
    MonitorPayInStatus --> Complete

    classDef startEndNode fill:#dcedc8,stroke:#558b2f,stroke-width:1px,color:#000,font-size:12px
    classDef mainNode fill:#e3f2fd,stroke:#1976d2,stroke-width:1px,color:#000,font-size:12px
    classDef decisionNode fill:#f3e5f5,stroke:#8e24aa,stroke-width:1px,color:#000,font-size:12px
    classDef successNode fill:#e8f5e9,stroke:#2e7d32,stroke-width:1px,color:#000,font-size:12px
    classDef failureNode fill:#ffebee,stroke:#c62828,stroke-width:1px,color:#000,font-size:12px

    class Start,Complete startEndNode
    class Auth,Webhook,KYC,AddBank,PayoutFlow,FetchRate,CreateQuote,InitiatePayout,MonitorStatus,PayInFlow,FetchPayInRate,CreatePayInQuote,SendFiat,InitiatePayIn,MonitorPayInStatus mainNode
    class KYCVerified,BankVerified,FlowType decisionNode
    class HandleKYCFailure,HandleBankFailure failureNode

    linkStyle default stroke:#64748b,stroke-width:1px;
```

## Key Integration Components

### 1. API Authentication

Secure your API requests to our platform using our authentication system:

```javascript theme={null}
// Example authentication header setup
const crypto = require("crypto");

/**
 * Generates authentication headers for DollarPe API requests.
 * @param {string} apiKey - Your partner API key.
 * @param {string} apiSecret - Your partner API secret.
 * @param {Object} [body={}] - The request body.
 * @returns {Object} - The headers object containing authentication details.
 */
const generateHeaders = (apiKey, apiSecret, body = {}) => {
  // Get current timestamp
  const timestamp = Math.floor(Date.now() / 1000);

  // Sort and stringify the body
  const sortedBody = JSON.stringify(body, Object.keys(body).sort());

  // Create message string
  const message = `${apiKey}|${timestamp}|${sortedBody}`;

  // Generate signature
  const signature = crypto
    .createHmac("sha256", apiSecret)
    .update(message)
    .digest("base64");

  return {
    "Content-Type": "application/json",
    "X-API-KEY": apiKey,
    "X-TIMESTAMP": timestamp.toString(),
    "X-SIGNATURE": signature,
  };
};
```

### 2. Customer KYC Integration

Implement our KYC flow to verify your customers' identities:

<Accordion title="KYC Implementation Steps (Sharing based)">
  1. Initiate a customer profile through the [/customer/create](/api-reference-exchange/endpoint/customer/create) endpoint
  2. Submit KYC documents and information using [/kyc/add-kyc-data](/api-reference-exchange/endpoint/kyc/add-kyc-data)
  3. Monitor verification status via [/customer/{customer_id}](/api-reference-exchange/endpoint/customer/\{customer_id}) or webhooks
  4. Handle verification issues if needed using [/kyc/update-tax-info](/api-reference-exchange/endpoint/kyc/update-tax-info) or [/kyc/update-document-info](/api-reference-exchange/endpoint/kyc/update-document-info)
  5. Add bank account details once verified using [/bank/create](/api-reference-exchange/endpoint/bank/create)

  See our [KYC Integration Guide](/api-reference-exchange/integration-guides/kyc-integration-guide) for detailed implementation steps.
</Accordion>

### 3. PayIn Service Integration

Connect to our payin system to enable **fiat-to-crypto** transfers:

<Accordion title="PayIn Implementation Steps">
  1. Fetch payin configurations using [/payin/configuration](/api-reference-exchange/endpoint/payin/configuration)
  2. Fetch current exchange rates using [/payin/fetch-rate](/api-reference-exchange/endpoint/payin/fetch-rate)
  3. Create a quotation using [/payin/quotation](/api-reference-exchange/endpoint/payin/quotation)
  4. Send fiat amount to the provided bank details
  5. Initiate the payin with transaction details using [/payin/initiate](/api-reference-exchange/endpoint/payin/initiate)
  6. Monitor the payin status using [/payin/payin\_id](/api-reference-exchange/endpoint/payin/\{payin_id}) or webhooks

  See our [PayIn Integration Guide](/api-reference-exchange/integration-guides/payin-integration-guide) for detailed implementation steps.
</Accordion>

### 4. Payout Service Integration

Connect to our payout system to enable **crypto-to-fiat** transfers:

<Accordion title="Payout Implementation Steps">
  1. Fetch payout configurations using [/payout/configuration](/api-reference-exchange/endpoint/payout/configuration)
  2. Fetch current exchange rates using [/payout/fetch-rate](/api-reference-exchange/endpoint/payout/fetch-rate)
  3. Create a quotation using [/payout/quotation](/api-reference-exchange/endpoint/payout/quotation)
  4. Initiate the payout with transaction details using [/payout/initiate](/api-reference-exchange/endpoint/payout/initiate)
  5. Monitor the payout status using [/payout/payout\_id](/api-reference-exchange/endpoint/payout/\{payout_id}) or webhooks

  See our [Payout Integration Guide](/api-reference-exchange/integration-guides/payout-integration-guide) for detailed implementation steps.
</Accordion>

### 5. Remittance Payout Integration

Route a **crypto-to-fiat** payout on behalf of a remittance user, identified by a remitter record:

<Accordion title="Remittance Payout Implementation Steps">
  1. Create the beneficiary using [/customer/create](/api-reference-exchange/endpoint/customer/create) with `alpha_3_country_code: "IND"`
  2. Complete the beneficiary's PAN-only KYC using [/kyc/remittance-beneficiary-kyc](/api-reference-exchange/endpoint/kyc/remittance-beneficiary-kyc)
  3. Add the beneficiary's bank account using [/bank/create](/api-reference-exchange/endpoint/bank/create)
  4. Create the sending party using [/kyc/remitter/create](/api-reference-exchange/endpoint/kyc/remitter/create)
  5. Create a quotation using [/remittance-payout/quotation](/api-reference-exchange/endpoint/remittance-payout/quotation) and initiate the payout using [/remittance-payout/initiate](/api-reference-exchange/endpoint/remittance-payout/initiate)
  6. Monitor the payout status using [/payout/payout\_id](/api-reference-exchange/endpoint/payout/\{payout_id}) or webhooks

  See our [Remittance Payout Integration Guide](/api-reference-exchange/integration-guides/remittance-payout-guide) for detailed implementation steps.
</Accordion>
