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

# Ramp

> RampAPI — On-ramp, off-ramp, KYB, recipients, and transaction management

## RampAPI

Access via `client.ramp`.

***

### KYB

#### getKybStatus

Get current KYB verification status.

```typescript theme={null}
async getKybStatus(): Promise<RampKybStatusResponse>
```

#### startKyb

Initiate KYB verification. Returns a hosted form URL.

```typescript theme={null}
async startKyb(): Promise<{ kybUrl: string; status: string }>
```

#### checkKybStatus

Force re-check KYB status with payment provider.

```typescript theme={null}
async checkKybStatus(): Promise<RampKybStatusResponse>
```

#### simulateKybApproval

Sandbox only: instantly approve KYB.

```typescript theme={null}
async simulateKybApproval(): Promise<RampKybStatusResponse>
```

#### simulateKybRejection

Sandbox only: instantly reject KYB.

```typescript theme={null}
async simulateKybRejection(): Promise<RampKybStatusResponse>
```

***

### On-Ramp Accounts

#### createOnrampAccount

Create an org-level virtual bank account.

```typescript theme={null}
async createOnrampAccount(params: CreateRampOnrampAccountRequest): Promise<RampOnrampAccountResponse>
```

#### getOnrampAccount

Get the org on-ramp account.

```typescript theme={null}
async getOnrampAccount(): Promise<RampOnrampAccountResponse | null>
```

***

### Transactions & Summary

#### listTransactions

List on-ramp transactions with optional filters.

```typescript theme={null}
async listTransactions(params?: RampExportParams): Promise<RampTransactionListResponse>
```

#### getTransaction

Get a transaction by ID.

```typescript theme={null}
async getTransaction(id: number): Promise<RampTransactionResponse>
```

#### getSummary

Aggregate volume/fee statistics.

```typescript theme={null}
async getSummary(params?: RampExportParams): Promise<RampSummaryResponse>
```

#### exportTransactions

Export transactions as CSV.

```typescript theme={null}
async exportTransactions(params?: RampExportParams): Promise<string>
```

***

### Off-Ramp

#### createOfframpAccount

Create an org off-ramp account.

```typescript theme={null}
async createOfframpAccount(params: CreateRampOfframpAccountRequest): Promise<RampOfframpAccountResponse>
```

#### listOfframpAccounts

List org off-ramp accounts.

```typescript theme={null}
async listOfframpAccounts(): Promise<RampOfframpAccountResponse[]>
```

#### getOfframpStatus

Get off-ramp status.

```typescript theme={null}
async getOfframpStatus(): Promise<RampOfframpStatusResponse>
```

#### listOfframpTransactions

List off-ramp transactions with optional filters.

```typescript theme={null}
async listOfframpTransactions(params?: RampExportParams): Promise<RampTransactionListResponse>
```

#### getOfframpTransaction

Get an off-ramp transaction by ID.

```typescript theme={null}
async getOfframpTransaction(id: number): Promise<RampTransactionResponse>
```

#### exportOfframpTransactions

Export off-ramp transactions as CSV.

```typescript theme={null}
async exportOfframpTransactions(params?: RampExportParams): Promise<string>
```

***

### Recipients

#### createRecipient

Create a recipient (initiates KYB).

```typescript theme={null}
async createRecipient(params: CreateRecipientRequest): Promise<RecipientResponse>
```

#### listRecipients

List recipients with pagination.

```typescript theme={null}
async listRecipients(params?: { page?: number; perPage?: number }): Promise<RecipientListResponse>
```

#### getRecipient

Get a recipient by ID.

```typescript theme={null}
async getRecipient(id: number): Promise<RecipientResponse>
```

#### archiveRecipient

Archive a recipient.

```typescript theme={null}
async archiveRecipient(id: number): Promise<RecipientResponse>
```

#### createRecipientOnrampAccount

Create an on-ramp account for a recipient.

```typescript theme={null}
async createRecipientOnrampAccount(
  recipientId: number,
  params: CreateRecipientOnrampAccountRequest
): Promise<RampOnrampAccountResponse>
```

#### createRecipientOfframpAccount

Create an off-ramp account for a recipient.

```typescript theme={null}
async createRecipientOfframpAccount(
  recipientId: number,
  params: CreateRecipientOfframpAccountRequest
): Promise<RampOfframpAccountResponse>
```

#### listRecipientOfframpAccounts

List off-ramp accounts for a recipient.

```typescript theme={null}
async listRecipientOfframpAccounts(recipientId: number): Promise<RampOfframpAccountResponse[]>
```

#### simulateRecipientOnrampTransaction

Sandbox only: simulate an on-ramp transaction for a recipient.

```typescript theme={null}
async simulateRecipientOnrampTransaction(
  recipientId: number,
  params?: SimulateTransactionRequest
): Promise<SimulationResponse>
```

#### simulateRecipientOfframpTransaction

Sandbox only: simulate an off-ramp transaction for a recipient.

```typescript theme={null}
async simulateRecipientOfframpTransaction(
  recipientId: number,
  params?: SimulateOfframpTransactionRequest
): Promise<SimulationResponse>
```

***

### Simulation (Org-Level)

#### simulateOnrampTransaction

Sandbox only: simulate an on-ramp transaction.

```typescript theme={null}
async simulateOnrampTransaction(params?: SimulateTransactionRequest): Promise<SimulationResponse>
```

#### simulateOfframpTransaction

Sandbox only: simulate an off-ramp transaction.

```typescript theme={null}
async simulateOfframpTransaction(params?: SimulateOfframpTransactionRequest): Promise<SimulationResponse>
```

***

## Types

### KYB

```typescript theme={null}
interface RampKybStatusResponse {
  kybStatus: string | null;
  applicationUrl: string | null;
  onrampAccount: RampOnrampAccountResponse | null;
  onrampAccounts: RampOnrampAccountResponse[];
}
```

### On-Ramp Accounts

```typescript theme={null}
interface CreateRampOnrampAccountRequest {
  orgWalletId?: number;
  walletAddress?: string;
  blockchain?: string;
  destinationAsset: string;
  rail?: string;
}

interface RampOnrampAccountResponse {
  id: number;
  dakotaOnrampId: string;
  bankAccountNumber: string;
  routingNumber: string;
  bankName: string;
  capabilities: string[];
  status: string;
  sourceAsset: string;
  destinationAsset: string;
  networkId: string;
  destinationWallet?: { id: number; name: string; address: string; network: string };
}
```

### Transactions

```typescript theme={null}
interface RampTransactionResponse {
  id: number;
  dakotaTransactionId: string;
  usdAmount: string;
  totalFeeAmount?: string;
  developerFeeAmount?: string;
  deliveredAmount?: string;
  status: string;
  type?: string;
  sourceAsset?: string;
  destinationAsset?: string;
  networkId?: string;
  exchangeRate?: string;
  txHash?: string;
  paymentRail?: string;
  paymentReference?: string;
  failureReason?: string;
  statusHistory: { status: string; timestamp: string }[];
  createdAt: string;
  completedAt?: string;
}

interface RampTransactionListResponse {
  data: RampTransactionResponse[];
  pagination: { page: number; perPage: number; total: number };
}

interface RampExportParams {
  status?: string;
  dateFrom?: string;
  dateTo?: string;
}
```

### Summary

```typescript theme={null}
interface RampSummaryResponse {
  totalVolumeUsd: number;
  totalFeesUsd: number;
  totalDelivered: number;
  activeRampRecipients: number;
  transactionCount: number;
  periodBreakdown: Array<{ date: string; volumeUsd: number; transactions: number }>;
}
```

### Off-Ramp

```typescript theme={null}
interface CreateRampOfframpAccountRequest {
  orgWalletId: number;
  sourceAsset?: string;
  rail?: string;
  bankDetails: {
    routingNumber: string;
    accountNumber: string;
    accountType: string;
    accountHolderName: string;
    bankName: string;
  };
}

interface RampOfframpAccountResponse {
  id: number;
  dakotaOfframpId: string;
  sourceCryptoAddress?: string;
  sourceAsset?: string;
  destinationAsset?: string;
  networkId?: string;
  rail?: string;
  fiatRoutingNumber?: string;
  fiatAccountNumberMasked?: string;
  fiatAccountType?: string;
  fiatAccountHolderName?: string;
  fiatBankName?: string;
  status: string;
  sourceWallet?: { id: number; name: string; address: string; network: string };
}

interface RampOfframpStatusResponse {
  kybStatus: string | null;
  offrampAccounts: RampOfframpAccountResponse[];
}
```

### Recipients

```typescript theme={null}
interface CreateRecipientRequest {
  name: string;
  type?: string;
  externalId?: string;
  address?: {
    street1: string;
    street2?: string;
    city: string;
    region?: string;
    postalCode?: string;
    country?: string;
  };
}

interface RecipientResponse {
  id: number;
  name: string;
  type: string;
  externalId?: string;
  destinationWalletId?: number;
  destinationWallet?: { id: number; name: string; address: string; network: string };
  address?: {
    street1: string;
    street2?: string;
    city: string;
    region?: string;
    postalCode?: string;
    country?: string;
  };
  bankAccount?: RampOnrampAccountResponse;
  bankAccounts?: RampOnrampAccountResponse[];
  onrampAccountCount?: number;
  offrampAccountCount?: number;
  totalVolumeUsd?: number;
  monthlyVolumeUsd?: number;
  transactionCount?: number;
  createdAt: string;
  archivedAt?: string;
}

interface RecipientListResponse {
  data: RecipientResponse[];
  pagination: { page: number; perPage: number; total: number };
}

interface CreateRecipientOnrampAccountRequest {
  destinationWalletId: number;
  sourceAsset?: string;
  destinationAsset?: string;
  rail?: string;
}

interface CreateRecipientOfframpAccountRequest {
  orgWalletId: number;
  sourceAsset?: string;
  rail?: string;
  bankDetails: {
    routingNumber: string;
    accountNumber: string;
    accountType: string;
    accountHolderName: string;
    bankName: string;
  };
}
```

### Simulation

```typescript theme={null}
interface SimulateTransactionRequest {
  scenario?: 'success' | 'failed' | 'rejected' | 'reversed';
  usdAmount?: number;
  onrampAccountId?: number;
}

interface SimulateOfframpTransactionRequest {
  scenario?: 'success' | 'failed';
  usdAmount?: number;
  offrampAccountId?: number;
}

interface SimulationResponse {
  success: boolean;
  data: { simulation_id: string; state: string };
}
```
