Skip to navigation

Quickstart

Create an onramp and follow it through settlement
View as Markdown

This walkthrough uses the onramp request shape shared by the mock and live provider flows.

1. Check the service

curl https://ramps.clixpesa.com/health
{
"status": "ok"
}

2. Create an onramp

Generate one idempotency key for the transaction and retain it with your local payment state.

curl --request POST \
--url https://ramps.clixpesa.com/onramp \
--header 'content-type: application/json' \
--header 'idempotency-key: order-4df218ae' \
--data '{
"amount": "1",
"source_amount": "130",
"source": {
"currency": "KES",
"payment_rail": "momo",
"bank_name": "Safaricom",
"account_number": "254700000000"
},
"destination": {
"currency": "USDC",
"chain": "Base Sepolia",
"address": "0x1111111111111111111111111111111111111111"
}
}'

A successful request is accepted for asynchronous settlement:

{
"txId": "order-4df218ae",
"status": "processing",
"instructions": {
"message": "Kindly accept the prompt sent to 254700000000",
"amount": "130",
"currency": "KES",
"account_number": "254700000000"
}
}

3. Check settlement status

curl --request POST \
--url https://ramps.clixpesa.com/onramp/status \
--header 'content-type: application/json' \
--data '{ "transaction_id": "order-4df218ae" }'
{
"status": "complete",
"transactionHash": "0x..."
}

Production onramp requests can initiate a real mobile-money prompt and move real funds. Use the local mock guide for integration testing.

Next steps