Get your API keyOpen Developer in the Fricopay app. Your key is there, and starts with fp_.
Fund your walletOn the same Developer page, tap Get payment details. Send Mobile Money to the number shown and put your unique reference in the Reference box. Your wallet is credited automatically a moment later.
Send a requestPass the key as a Bearer token. This one is free and lists the data networks and prices:
The same key works for Fricobiz too. Only Fricobiz test mode has a separate test key, which starts with fbt_. See Fricobiz.
Fund your wallet
Services you sell through the API are paid from your Fricopay wallet. Fund it without leaving Developer.
Enter an amountOn Developer, choose how much to add, from GHS 10 to GHS 5,000.
Send the moneySend Mobile Money from any number to the number we show. Type your unique reference in the Reference box, exactly as shown.
It is credited for youWe match your payment and add it to your wallet automatically. No fee.
Only send to the number we show
Money sent to any other number, or without your reference, cannot be matched to your wallet. Payments of GHS 500 or more are checked by our team before they are credited.
Test with your own key
Paste your key in the box at the bottom of the left menu and every sample on this site fills it in for you. It is saved only in this browser.
Keep it safe
Your key can spend your money
Anyone with the key can make purchases from your wallet. Keep it on your server and never put it in a mobile app, a web page or a public repository.
Call the API from your backend, not from the browser.
Store the key in an environment variable or a secrets manager.
If a key leaks, make a new one in Developer. The old key stops working straight away.
Problems with your key
Message
What it means
Missing API key
The Authorization header is missing or does not start with Bearer .
Invalid API key format
The key must start with fp_.
Invalid API key
No account has this key. Check for a copy and paste mistake.
API key revoked
The key was replaced or switched off. Use your current key from Developer.
Get a signed callback the moment an order or payment changes status, instead of polling.
HMAC-SHA256 signedAutomatic retriesOne page for everything
Fricobiz payments
The webhook for collecting payments. We call you the moment a customer's payment is paid.
Set your addressIn the Fricobiz section of the Fricopay app, save a webhook URL that starts with https://, and copy the signing secret. You can also pass a callbackUrl when you create a payment to use a different address for that one.
Receive the callWe POST JSON to your URL when a payment is paid.
Check it, then replyVerify the signature, mark the order paid once, and reply with a 2xx status.
Event
Sent when
payment.paid
A payment was paid. This includes payments the owner confirmed by hand, which also carry confirmedByOwner.
Order events are sent with the headers X-FricoPay-Signature (a hex HMAC-SHA256 of the raw body) and X-FricoPay-Event. We make up to 3 attempts, one and two seconds apart.
import crypto from 'crypto';
// Order events are signed with a plain hex HMAC-SHA256 of the raw body, using your signing secret from Developer.
export function isFromFricopay(rawBody, signature, secret) {
const expected = crypto.createHmac('sha256', secret).update(rawBody).digest('hex');
const a = Buffer.from(expected), b = Buffer.from(signature);
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
The API spec in the OpenAPI format. Use it to generate a client or import into Postman.
Ready-made prompts
Copy one, change the last line to what you need, and paste it into your assistant.
Any task
You are helping me build on the Fricopay API.
Read https://fricopay.com/llms-full.txt first. It is the full documentation.
The machine-readable spec is https://fricopay.com/openapi.json.
Rules:
- Base URL is https://fricopay.com. Authenticate every request with the header Authorization: Bearer <key>.
- Read my API key from the environment variable FRICOPAY_API_KEY. Never write the key into code, logs or chat.
- Call the API from my server only, never from a browser or mobile app.
- Amounts are in Ghana cedis (GHS). Phone numbers are 10 digits starting with 0.
- Use the order reference to check status, and verify webhook signatures as the docs describe.
Task:
Sell data bundles
Read https://fricopay.com/llms-full.txt, then add data bundle sales to my app using the Cheap data API.
1. Call GET /devapi/cheap-data/networks to list networks and prices, and show them to my customer.
2. When they choose one, call POST /devapi/cheap-data/purchase with networkKey, recipient and capacity.
3. Save the reference from the reply, then check GET /devapi/cheap-data/orders/:reference or listen for the webhook.
4. Treat placed and processing as in progress, success as delivered, and failed as refunded.
Read the key from FRICOPAY_API_KEY. Never hard-code it.
Collect payments
Read https://fricopay.com/llms-full.txt, then add Mobile Money checkout to my website using Fricobiz Collect.
1. On my server, call POST /fbapi/v1/payments with the amount and my own order reference.
2. Send the customer to the payUrl in the reply.
3. Receive the signed webhook, verify its signature, and only then mark the order as paid. Never trust the browser.
4. Use my test key (fbt_) while building so no real money moves.
Read the key from FRICOPAY_API_KEY. Never hard-code it.
Stay safe
Your key can spend your money
An assistant that reads our docs cannot spend anything. Only your own code with your key can. Do not paste your key into an AI chat.
Put the key in an environment variable such as FRICOPAY_API_KEY.
Test with a small amount first, and read the code before you run it.
Ask the assistant to protect purchases from being sent twice: check the order reference before retrying.
If a key is exposed, make a new one in Developer. The old one stops working at once.
Collect Mobile Money payments on your own number, with a hosted pay page, checkout and signed webhooks.
Mobile Money collectionsTest mode, no real moneySigned webhooks
How it works
Fricobiz turns your own phone into a payment gateway. Customers send Mobile Money to your number, the Fricobiz app reads the confirmation, and your site is told the payment is paid.
Set up FricobizOpen Fricobiz in the Fricopay app, subscribe, install the Fricobiz app on the phone that receives the money, and connect and verify your number.
Create a paymentFrom your server, call POST /fbapi/v1/payments. You get back a unique code and a hosted pay page.
The customer paysThey send the amount to your number with the code as the reference, or open the pay page, which shows them exactly what to do.
We tell your siteWhen the money arrives, the payment becomes paid and we send a signed webhook. Credit the order from that, never from the browser.
Your keys
Key
Looks like
Use it for
Live
fp_ + 48 characters
Real payments. This is your Fricopay API key, the same one every other API uses. Money goes to your verified number.
Test
fbt_ + 48 characters
Trying your whole flow with no money. Test payments are marked sandbox.
Find both in the Fricobiz section of the app. Keys that start with fb_ were issued earlier and still work. Send either one as Authorization: Bearer .... Keep keys on your server. A key stops working if your Fricobiz plan has ended, until you renew.
Endpoints
Create a payment
POST/fbapi/v1/payments
Creates a payment that waits for the customer. It is valid for 30 minutes. Amounts are between GHS 1 and GHS 10,000.
Field
Type
Notes
amount
number
Required. In cedis, for example 50.
reference
string
Your own order or customer ID. Returned to you everywhere. Up to 64 characters.
customerName
string
Optional. Used to compare against the name on the Mobile Money message.
callbackUrl
string
Optional, https only. Where to send the webhook for this payment instead of your default.
returnUrl
string
Optional, https only. Where the pay page sends the customer afterwards.
Send an Idempotency-Key header so a retry never creates a second payment. The same key always returns the same payment.
The money arrived and was matched. Safe to deliver the order.
review
Money arrived, but something did not match (wrong amount, a late payment, an amount of GHS 500 or more). The owner confirms it in the Fricobiz app, and it then becomes paid or rejected.
rejected
The owner declined it.
expired
No payment arrived in time. Late money is still kept for the owner to confirm.
Checkout
Show the hosted pay page on top of your own site, without sending the customer away.
Create the payment on your server, pass its payUrl to the page, then open it:
<script src="https://fricopay.com/checkout.js"></script>
<script>
// payment.payUrl comes from POST /fbapi/v1/payments, created on YOUR SERVER
Fricobiz.checkout({
payUrl: payment.payUrl,
onSuccess: function (p) { /* p = { id, reference, amount, status } */ },
onClose: function () { /* the customer closed it */ }
});
</script>
Or add the pay link to any button or link:
<a href="#" data-fricobiz-pay="https://fricopay.com/pay/PAYMENT_ID">Pay with Mobile Money</a>
Never trust the browser
onSuccess is only a convenience for your page. Credit the order from the webhook, or by calling Get a payment from your server.
The pay page shows the number to pay and the reference, counts down the time left, and lets the customer confirm with the transaction ID from their Mobile Money message if the match is slow. It also has a help box for questions about the payment.
Test mode
Use your fbt_ key to try the whole flow with no money.
Create payments with the test key. They work exactly like live ones, and are marked sandbox.
Open the pay page of a test payment and use the buttons there to pretend the customer paid, or that it needs review.
Your webhook fires as normal, with "sandbox": true in the body.
Chat widget
Add a live chat bubble to your site. Messages reach you in the Fricobiz app.
Paste this before the closing </body> tag. Your widget ID is in the Chat settings of the Fricobiz app.
All matches with scores and status. Supports ?when=today (default), yesterday, or tomorrow. Each match returns home, away, time, score, status (scheduled/live/finished), plus homeLogo and awayLogo (team crest URLs served from our domain).
Look up the score for any specific match by team names. Required: home, away. Optional: when (today / yesterday / tomorrow). Returns teams, score, and status (FT, HT, live, not_started).
Rich detail for a single match by team names. Required: home, away. Optional: when (today / yesterday / tomorrow). Returns team names with crest logos, score, status, a full events timeline (goals, cards, substitutions with player & minute), bookmaker odds (1 / X / 2 across multiple bookmakers), the predicted outcome, and a match analysis. Cached ~3 min. Matches are findable while in the today / yesterday / tomorrow windows - use the matching when value (a finished match moves from today to yesterday).
Team crest images are served directly from our domain (no auth required, safe to use in <img> tags). The homeLogo/awayLogo fields in livescores and match-detail already contain ready-to-use URLs. If a crest is unavailable, a clean placeholder with the team initials is returned automatically.
Get predictions and betting tips
GET/devapi/football/predictions
Correct-score predictions plus betting tips for each match. Each entry includes home, away, kickoff time, league, predicted correct_score (e.g. 2:0), and a derived tip (e.g. , ). Supports ?when=today/yesterday/tomorrow.