Skip to main content

Overview

The monei.offramp namespace provides a full suite of services for converting crypto to fiat, tracking transactions, and managing payout accounts. Included services:
  • Exchange — retrieve assets, get quotes, and initiate swaps
  • Ledger — view transaction history and track orders
  • Payouts — retrieve supported banks and verify bank accounts
All services require a properly configured MoneiClient instance.

Offramp Exchange

monei.offrampExchange allows you to retrieve available assets, get crypto-to-fiat quotes, and initiate swaps.

Get Offramp Assets

Retrieve a list of assets available for offramp transactions.
const assets = await monei.offrampExchange.getAssets();

console.log(assets);

Get Crypto-to-Fiat Quote

Retrieve a quote for swapping crypto to fiat.
const quoteRequest = {
  crypto: "USDT",
  fiat: "NGN",
  amount: 100
};

const quote = await monei.offrampExchange.getQuote(quoteRequest);

console.log(quote);

Initiate Swap

Initiate a crypto-to-fiat swap.
const swapData = {
  crypto: "USDT",
  fiat: "NGN",
  amount: 100,
  destinationBankAccount: "1234567890"
};

const order = await monei.offrampExchange.initiateSwap(swapData);

console.log(order);

Offramp Ledger

monei.offrampLedger provides methods to track transaction history and order statuses.

Get Offramp Transactions

Retrieve a paginated list of offramp transactions.
const requestData = {
  userId: "user-123",
  page: 1,
  limit: 10
};

const transactions = await monei.offrampLedger.getTransactions(requestData);

console.log(transactions);

Track Order

Track an individual order by reference.
const reference = "order-123";

const orderDetails = await monei.offrampLedger.trackOrder(reference);

console.log(orderDetails);

Offramp Payouts

monei.offrampPayouts provides methods to retrieve supported banks and verify payout accounts.

Get Offramp Banks

Retrieve a list of supported payout banks.
const banks = await monei.offrampPayouts.getBanks();

console.log(banks);

Verify Offramp Bank Account

Verify a bank account before initiating a payout.
const verifyData = {
  accountNumber: "0123456789",
  bankCode: "057"
};

const verification = await monei.offrampPayouts.verifyBankAccount(verifyData);

console.log(verification);

Notes

  • All requests require a properly configured MoneiClient with authentication.
  • DTOs used by the SDK include:
    • AssetsResponseDto
    • OfframpQuoteRequestDto / OfframpQuoteResponseDto
    • SwapCryptoToFiatRequestDto / OfframpOrderResponseDto
    • OfframpHistoryRequestDto / OfframpTransactionListResponseDto
    • OfframpStatusRequestDto / OfframpTransactionDetailResponseDto
    • PayoutBanksResponseDto
    • VerifyOfframpBankAccountRequestDto / VerifyOfframpBankAccountResponseDto
  • Always validate input data and ensure the correct crypto/fiat codes before initiating swaps.