Skip to main content
Faira lets your customers pay with credit at checkout. This guide walks a merchant from account creation on the Faira website to a fully wired integration: credentials, authenticating API calls, initiating a checkout session, and receiving signed webhooks.
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.
The API secret and webhook signing secret are shown only when first issued or rotated. Store them in your secrets manager immediately. If lost, rotate credentials from the merchant dashboard (web.getfaira.com/merchant/login).

Step 1 — Create your merchant account

Self-serve (standard path)

  1. Open the merchant registration page: https://web.getfaira.com/merchant/register
  2. Complete the form (organization details, contact, password, optional website / webhook URL).
  3. 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.
  4. Open the merchant dashboard at https://web.getfaira.com/merchant/login to manage profile, webhooks, and credential rotation.
There is no supported partner integration that creates merchants via POST /api/v1/merchants/register. Use the web app.
If Faira provisions your organization for you, you receive a set-password email with a one-time link. Complete it before first login:
200 OK
The set-password link expires after a limited window. If it expires, use Forgot password.

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
Send the session on dashboard endpoints:
Response is always 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/sandbox webhook_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.
Auth (either):

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
The previous key and secret stop working immediately. Update servers before rotating in production.

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 as POST /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.
Requests fail if X-Timestamp is more than ~5 minutes from server time, or if X-Nonce was already used (~6 minute window). Generate a fresh timestamp and nonce every request.

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
Optional fields:
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.
Minimum DIY loop: web signup → store secrets → set webhook URL → HMAC initiate → redirect → verify webhooks. You do not need dashboard login or PIN authorize APIs for the hosted path.

Step 5 — Configure webhooks

Faira POSTs 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=.
Verify the raw body bytes. Reject timestamps older than ~5 minutes. Make handlers idempotent — dedupe on transaction_id + event or Faira-Webhook-Delivery-ID.

Retries

Any 2xx is success. Failures retry with backoff (about 1, 2, 4, 8, 16 minutes), up to ~5 attempts by default: queuedprocessingdelivered, or retryingfailed.

Inspect deliveries

Requires a dashboard session (fai_mst_...):
Query params: status, event, page, per_page.

Inbound payment events (optional)

If you settle payments yourself, notify Faira:
Signature covers timestamp.raw_json_body with the webhook signing secret.
Provide 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.
Need help? Contact your Faira representative or support with your merchant_id (never share your API secret or webhook signing secret).