Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Your First Ramp Integration

Build a TEST on-ramp flow from quote and customer creation through simulated payment and verified crypto delivery.

Complete one TEST on-ramp on this page: get a quote, create the transaction and customer, simulate the fiat payment, then verify crypto delivery. No real bank transfer is needed.

On-ramp means a customer pays local currency and receives crypto in their wallet. Off-ramp means a customer sends crypto and receives local currency in a bank or mobile-money account. For order collections into your business balance or payouts from that balance, use Ivorypay Business (IVB). Compare the products before starting.

1. Prepare TEST access

New to On/Off Ramp? Create an On/Off Ramp account and verify your email before setting up your API key.

Use an On/Off Ramp TEST secret key from the On/Off Ramp dashboard, stored privately on your backend as IVORYPAY_RAMP_SECRET_KEY. IVB keys cannot be used here. Keep secret keys out of browsers and mobile apps.

This example uses NGN, USDT and BSC_TESTNET. Confirm that this TEST route is enabled for your business and that the amount meets its minimum. If you use another enabled test route, update the currency, amount, token, network and destination together. TEST credentials do not make a mainnet destination a test wallet.

Use the same terminal session for the commands below. Replace the email with your own test customer's email and the wallet placeholder with a wallet you control on the selected test network. Use a new UUID reference for each new transaction and save it against your test order before initiation.

RAMP_BASE_URL="https://ramp-api.ivorypay.io/api/v1"
RAMP_REFERENCE="b904720b-1c5d-4c36-9a40-7e4c44a508f0"
RAMP_TEST_EMAIL="developer@example.com"
RAMP_TEST_WALLET="YOUR_BSC_TESTNET_WALLET_ADDRESS"

2. Get a quote

curl --request POST "$RAMP_BASE_URL/exchange-rates/onramp" \
  --header "Authorization: $IVORYPAY_RAMP_SECRET_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "fiatAmount": 50000,
    "businessFeeInFiat": 0,
    "fiatCurrency": "NGN",
    "token": "USDT",
    "blockchain": "BSC_TESTNET"
  }'

Check the HTTP status and success before reading data. The quote includes fiatAmountPayable, cryptoAmountLessFee and the fee breakdown. Show these to the customer. The instructions returned at initiation determine the amount and expiry for the actual payment.

If the quote is rejected, resolve the error before continuing. An example route is not automatically enabled for every account.

3. Create the customer and on-ramp

This endpoint accepts customer details and creates the customer if needed. You do not need a separate customer-creation request for this walkthrough.

On success, save data.reference, the customer data.refCode and data.transferDetails with the test order. For this NGN example, your interface displays the returned bank/account details, exact amountPayable and expiresAt. Also retain the returned crypto amount, token, network and wallet address for reconciliation.

Do not transfer money to TEST bank details. The next step simulates payment. If initiation times out, check the saved reference with the status request in step 5 before creating another transaction.

For a customer already in your account, use Create On-Ramp for an Existing Customer in later integrations. Its request identifies the existing customer by email.

4. Simulate the fiat payment

Only after initiation succeeds, use the same TEST key and reference:

A successful response means simulation was accepted. Crypto delivery is asynchronous, so it does not yet mean the on-ramp is complete. Do not use this endpoint to simulate an off-ramp crypto deposit.

5. Verify the final result

Read data.transferDetails.status, not just the top-level success flag:

Result
What your application should do

SUCCESS

Crypto delivery completed. Match the reference, amounts, token, network and wallet address to the saved order, then complete that order once.

INITIATED, PENDING, FIAT_PAYMENT_RECEIVED or CRYPTO_PAYOUT_PROCESSING

Keep the order pending. Use webhook updates or check status again with backoff.

FAILED or EXPIRED

Show the failure or expiry and reconcile the existing transaction before offering another attempt.

Missing or unrecognized status

Keep the order unresolved and investigate; do not treat it as success.

An HTTP success, simulated fiat receipt or browser redirect is not proof of crypto delivery. See errors and safe retries for recovery.

6. Receive updates automatically

Configure a TEST webhook endpoint and verify its signature. Save events durably, return HTTP 200, and process duplicates once. Relevant events are onramp.fiatPaymentReceived, onramp.cryptoPayoutProcessing, onramp.success and onramp.failed.

Use the status request above to reconcile delayed or missing events. Webhook configuration uses a business-user session; the TEST secret key used in this walkthrough is for the transaction requests. See Authentication for the credential required by each flow.

Choose your next flow

Goal
Guide

Sell crypto for local currency

Let Ivorypay handle the customer interface

Build your own EFT or Capitec Pay interface

Receive repeat deposits and settle them

Prepare for production

Last updated