Partner accounts are not created via the public API. Sign up at
web.getfaira.com/merchant/register,
then integrate using the API base URLs below.Timestamps are RFC 3339 unless a field is explicitly a Unix timestamp.
Amounts depend on the endpoint — see Amount units.
Base URLs
All API routes in this guide are under
/api/v1 on the API host. Example:
Use the exact hosts issued to your account. Do not mix production credentials
with the sandbox API host (or the reverse).
Amount units
Faira stores money in minor units internally. Checkout requests use major units
and are converted server-side. Webhooks report minor units. Using minor units on
sessions/initiate will charge ~100× too much.
Credentials & tokens at a glance
Faira issues several distinct secrets. They are not interchangeable.Step 1 — Create your merchant account
Self-serve (standard path)
- Open the merchant registration page: https://web.getfaira.com/merchant/register
- Complete the form (organization details, contact, password, optional website / webhook URL).
- After successful signup, copy your API credentials immediately when the UI shows them (API key + API secret). Treat the secret as a one-time reveal.
- Open the merchant dashboard at https://web.getfaira.com/merchant/login to manage profile, webhooks, and credential rotation.
POST /api/v1/merchants/register. Use the web app.
Enterprise / admin-provisioned accounts
Enterprise / admin-provisioned accounts
If Faira provisions your organization for you, you receive a set-password
email with a one-time link. Complete it before first login:The set-password link expires after a limited window. If it expires, use
Forgot password.
200 OK
Step 2 — Log in to the merchant dashboard (optional for pure server integrate)
Use the web dashboard at https://web.getfaira.com/merchant/login, or exchange email and password for a dashboard session token (fai_mst_) via
the API when you need dashboard-only actions (credential rotation, webhook
delivery log).
Request
200 OK
Forgot / reset password
Forgot / reset password
200 (no email enumeration). If the account exists, a reset
link is emailed. Then:Step 3 — Complete your profile
Set settlement details and your production/sandboxwebhook_url if you did not
set them at signup.
PATCH body
200 OK
organization_name, business_type, country, and status are locked after
registration. Contact support if those need to change.Step 4 — Store & rotate credentials
Rotating credentials revokes the current API key and secret and issues a new pair. Requires a dashboard session — a leaked API key cannot rotate itself.200 OK
Authenticating your requests
API key (bearer)
Some read endpoints.
Authorization: Bearer fai_live_mk_....Dashboard session
Sensitive dashboard actions.
Authorization: Bearer fai_mst_....HMAC signing
Server-to-server checkout. Sign with your API secret.
HMAC request signing
Checkout endpoints such asPOST /api/v1/sessions/initiate and
POST /api/v1/sessions/token require:
String-to-sign — five lines joined by
\n:
HMAC-SHA256(api_secret, string-to-sign) → lowercase hex. Sign the exact bytes
you send as the body.
Checkout session flow (hosted — recommended DIY path)
Your backend starts a session; Faira hosts login/onboarding/authorization for the customer. You learn the outcome primarily via webhooks.1
Initiate the session (HMAC)
Request
transaction.amount is in major units (100 = £100.00), not pence.201 Created
2
Redirect the customer
Send the browser to
redirect_url from the response. The customer logs in or
completes onboarding on Faira and approves or declines the pending transaction.3
Receive the outcome
Faira queues a signed webhook to your
webhook_url (transaction.authorized,
transaction.declined, transaction.paid, etc.). Optionally resume UX on your
redirect_url using your own order/merchant_ref state — do not trust the
return URL alone for money movement.Step 5 — Configure webhooks
FairaPOSTs signed JSON to your webhook_url when transaction state changes.
Set the URL at signup in the web form or later via
profile.
Webhook URL requirements
Must be HTTPS in production.
Must not be localhost, a private IP, or a blocked consumer domain.
Should respond
2xx quickly (delivery timeout ~10 seconds).Events
Delivery headers
Example payload
Webhook
amount is in minor units (pence). 10000 with GBP means £100.00.
Some optional fields appear only when available.Verifying the signature
HMAC-SHA256 of timestamp + "." + raw_body with your webhook signing
secret, prefixed with sha256=.
Retries
Any2xx is success. Failures retry with backoff (about 1, 2, 4, 8, 16 minutes),
up to ~5 attempts by default: queued → processing → delivered, or
retrying → failed.
Inspect deliveries
Requires a dashboard session (fai_mst_...):
status, event, page, per_page.
Inbound payment events (optional)
If you settle payments yourself, notify Faira:timestamp.raw_json_body with the webhook signing secret.
transaction_id or merchant_ref. Deduped by event_id.
Error handling
Errors use a flat JSON envelope:Go-live checklist
1
Account created on the web
Registered at web.getfaira.com/merchant/register
(or sandbox equivalent). API key + secret stored securely.
2
Webhook secret stored
Webhook signing secret saved; never committed to source control.
3
Profile complete
Settlement details and production
webhook_url set.4
HMAC initiate works in sandbox
Signed
POST /api/v1/sessions/initiate against https://dev.getfaira.com returns 201.
Amount sent in major units.5
Webhook endpoint live
HTTPS, signature verification, idempotent,
2xx within 10s.6
Redirect handling
Your
redirect_url resumes the shopper UX; money state comes from webhooks.merchant_id
(never share your API secret or webhook signing secret).