Cashramp
  • Introduction
    • Getting Started
    • Payment Rails
    • API Endpoints
    • Authentication
    • Webhooks
    • Integration Guide
    • SDKs
  • Hosted Ramp
    • Overview
    • Deposits
    • Withdrawals
    • Cancel Payment
  • Direct Ramp
    • Overview
    • Ramp Quotes
    • Deposits
    • Withdrawals
  • Onchain Ramp
    • Overview
    • On-Off Ramp
  • Cashramp API
    • Queries
    • Customers
    • Payment Methods
    • Withdraw Onchain
Powered by GitBook
On this page
  • Getting a Quote
  • Arguments
  • Response
  • Quote Lifecycle
  • Refreshing Quotes
  • Arguments
  1. Direct Ramp

Ramp Quotes

Ramp quotes provide real-time exchange rates for converting between local African currencies and USD stablecoins. Each quote is valid for a limited time and must be used or refreshed before expiration.

Getting a Quote

Arguments

Argument
Type
Description

customer

ID!

amount

Decimal!

Amount to convert

currency

P2PPaymentCurrency!

local_currency or usd

paymentType

PaymentType

deposit or withdrawal

paymentMethodType

String!

Payment rail identifier (e.g., bank_transfer_ng)

query {
  rampQuote(
    amount: 100
    currency: usd
    customer: "VHlwZXM6OkNhc2hyYW1wOjpBUEk6Ok1lcmNoYW50Q3VzdG9tZXItMzgwYzEwZTctNzgwNC00MmU3LWI2NTItYWNiMGQ5OTA4NDYy"
    paymentType: deposit
    paymentMethodType: "bank_transfer_ng"
  ) {
    id
    exchangeRate
    paymentType
  }
}

Getting a quote might fail if there's insufficient liquidity for the requested amount or payment method.

Response

Field
Description

id

Ramp quote global ID for use in subsequent calls

exchangeRate

Current rate for the currency pair

paymentType

deposit or withdrawal

Quote Lifecycle

  1. Creation: Quote is generated with current market rate

  2. Valid Period: 30-180 seconds depending on market volatility

  3. Expiration: Quote becomes invalid and must be refreshed

  4. Usage: Quote is consumed by initiating a deposit or withdrawal

Refreshing Quotes

When a quote expires or is close to expiring, refresh it to get updated rates.

Arguments

Argument
Type
Description

rampQuote

ID!

ID of the quote to refresh

amount

Decimal

Optional new amount (keeps original if omitted)

Refreshing a quote might fail if there's insufficient liquidity for the requested amount or payment method.

mutation {
  refreshRampQuote(
    rampQuote: "VHlwZXM6OkNhc2hyYW1wOjpBUEk6OlJhbXBRdW90ZS04ZGFkZjEzYS1mYzNjLTQzN2EtYmZkZC04NDAyN2Y2MmIxZjY="
    amount: 100
  ) {
    id
    exchangeRate
    paymentType
  }
}
PreviousOverviewNextDeposits

Last updated 2 days ago

Global ID of the paying customer ()

Create a Customer