B BASHFLY API

API Documentation

Sell data, airtime and bill payments inside your own app or website — powered by Bashfly. Instant delivery, cheapest-wins pricing, one API key.

Getting started

1. Apply for API access and complete KYC. 2. We issue your API key. 3. Fund your Bashfly wallet (in the app). 4. Start calling the API. Every purchase is charged to your wallet balance.

Base URL

https://api.bashflylimited.com/v1/api

Authentication

Send your secret API key as a Bearer token in the Authorization header on every request. Keep it secret — treat it like a password.

Authorization: Bearer bsk_live_xxxxxxxxxxxxxxxx

Endpoints

GET /plans

List all available data plans with your business price.

# request
curl https://api.bashflylimited.com/v1/api/plans \
  -H "Authorization: Bearer bsk_live_xxx"

# response
[
  { "plan": "mtn-data-1gb-30d", "name": "1GB - 30 Days",
    "network": "mtn", "duration": "monthly", "price": 260 }
]

GET /balance

Check your wallet balance.

curl https://api.bashflylimited.com/v1/api/balance \
  -H "Authorization: Bearer bsk_live_xxx"

# response
{ "balanceNaira": 5000, "currency": "NGN" }

POST /data

Buy a data plan for a phone number.

FieldTypeDescription
planstringPlan code from /plans
phonestringRecipient phone (e.g. 08031234567)
referencestring (optional)Your unique idempotency reference
curl -X POST https://api.bashflylimited.com/v1/api/data \
  -H "Authorization: Bearer bsk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{ "plan": "mtn-data-1gb-30d", "phone": "08031234567", "reference": "ord_123" }'

# response
{ "reference": "API-XXXX", "status": "successful", "amount": "260.00" }

POST /airtime

Send airtime to a phone number.

FieldTypeDescription
networkstringmtn · airtel · glo · 9mobile
amountnumberNaira amount (₦50 – ₦50,000)
phonestringRecipient phone
referencestring (optional)Your unique idempotency reference
curl -X POST https://api.bashflylimited.com/v1/api/airtime \
  -H "Authorization: Bearer bsk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{ "network": "mtn", "amount": 500, "phone": "08031234567" }'

Pricing

Data — you pay the cheapest provider cost plus a small fixed margin. Airtime — you pay face value minus a discount, so you keep the difference when you resell. Prices are always returned live from /plans.

Idempotency: pass a unique reference on each request. Retrying with the same reference never charges or delivers twice — it returns the original order.
Failures auto-refund: if delivery fails, your wallet is refunded automatically and the order status becomes refunded.

Errors

CodeMeaning
NO_API_KEY / INVALID_API_KEYMissing or revoked key
INSUFFICIENT_BALANCEFund your wallet
NOT_FOUNDPlan / network not available
VALIDATION_ERRORBad request fields

Support

Questions? Chat with us on WhatsApp or email admin@bashflylimited.com.