Start here
Overview
Accept Libyan payment methods through one API, a hosted checkout and signed webhooks.
Customers pay with bank cards, Edfali or MobiCash, whichever your application has enabled.
How a payment flows
Section titled “How a payment flows”- Your server creates a payment intent (
POST /payment-intents) and stores itsuuid. - You redirect the customer to its
checkout_url. - The customer pays on Fanak. You never handle cards or one-time codes.
- Fanak sends your server a signed
payment_intent.succeededwebhook. - Your server re-fetches the intent (
GET /payment-intents/{uuid}) and fulfils only onsucceeded. - The customer returns to your
return_url, where you re-fetch it too.
What you need
Section titled “What you need”- An API key (
pk_...), an access token and a webhook secret (whsec_...) from the dashboard. See Authentication. - A server for every API call. Never call from a browser or app.
- An HTTPS webhook endpoint.
https://pay.fanak.ly/api/v1Not available yet
Section titled “Not available yet”- List, update or cancel intents through the API.
- Refunds. A succeeded payment is final; settle reversals with your customer.
Next steps
Section titled “Next steps”QuickstartCreate your first payment intent and send a customer to pay.
WebhooksReceive payment events and verify their signature.
Payment intentsFields, statuses and expiry.
API referenceEvery endpoint, field and response.