🚀 FacePOS API Test Dashboard

Test all API endpoints interactively

📱 AWS Cognito Authentication (Phone-based)

Production authentication system using AWS Cognito with phone number login

POST /api/v1/auth/signup
Format: +[country code][number] (e.g., +353871234567 for Ireland)
Use encrypted password format from your encryption service
Default: IE (Ireland)

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "https://api3.facepos.ie/api/v1/auth/signup" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+353871234567",
    "password": "NYrt@1234",
    "market": "IE"
  }'

PowerShell:

$body = @{
    phone_number = "+353871234567"
    password = "NYrt@1234"
    market = "IE"
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/auth/signup" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body

Response Example:

{
  "success": true,
  "data": {
    "message": "User registered successfully",
    "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  "timestamp": "2025-10-30T12:00:00.000Z"
}

🔐 Password Encryption Helper

Convert plain text password to encrypted format for testing

POST /api/v1/auth/signin
Format: +[country code][number]
Use encrypted password format. Special bypass: NYrt@1234 (decrypts to test@1234)
Use the Encryption Helper above to convert plain text to encrypted format.

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "https://api3.facepos.ie/api/v1/auth/signin" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+353871234567",
    "password": "NYrt@1234"
  }'

PowerShell:

$body = @{
    phone_number = "+353871234567"
    password = "NYrt@1234"
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/auth/signin" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body

Response Example:

{
  "success": true,
  "data": {
    "message": "Sign in successful",
    "profile_status": "Complete",
    "profile_data": [...],
    "merchantresponse": true
  },
  "timestamp": "2025-10-30T12:00:00.000Z"
}
POST /api/v1/auth/verify-signup
OTP sent to your phone. Valid for 5 minutes.

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "https://api3.facepos.ie/api/v1/auth/verify-signup" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+353871234567",
    "confirmation_code": "123456"
  }'

PowerShell:

$body = @{
    phone_number = "+353871234567"
    confirmation_code = "123456"
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/auth/verify-signup" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body
POST /api/v1/auth/forgot-password
OTP will be sent to this phone number

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "https://api3.facepos.ie/api/v1/auth/forgot-password" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+353871234567"
  }'

PowerShell:

$body = @{
    phone_number = "+353871234567"
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/auth/forgot-password" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body
POST /api/v1/auth/confirm-forgot-password
OTP valid for 5 minutes

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "https://api3.facepos.ie/api/v1/auth/confirm-forgot-password" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+353871234567",
    "confirmation_code": "123456",
    "new_password": "NewPassword123"
  }'

PowerShell:

$body = @{
    phone_number = "+353871234567"
    confirmation_code = "123456"
    new_password = "NewPassword123"
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/auth/confirm-forgot-password" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body
POST /api/v1/auth/change-password-with-old

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "https://api3.facepos.ie/api/v1/auth/change-password-with-old" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+353871234567",
    "old_password": "OldPassword123",
    "new_password": "NewPassword123"
  }'

PowerShell:

$body = @{
    phone_number = "+353871234567"
    old_password = "OldPassword123"
    new_password = "NewPassword123"
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/auth/change-password-with-old" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body
DELETE /api/v1/auth/delete-account
⚠️ Warning: This action cannot be undone!

📋 cURL Commands ⚠️

Bash/Linux/Mac:

curl -X DELETE "https://api3.facepos.ie/api/v1/auth/delete-account" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+353871234567"
  }'

PowerShell:

$body = @{
    phone_number = "+353871234567"
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/auth/delete-account" `
  -Method DELETE `
  -ContentType "application/json" `
  -Body $body
POST /api/v1/auth/verify-token
Paste the jwt_access_token from signin response

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "https://api3.facepos.ie/api/v1/auth/verify-token" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
  }'

PowerShell:

$body = @{
    token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/auth/verify-token" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body
POST /api/v1/auth/refresh-token
Paste the jwt_refresh_token from signin response

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "https://api3.facepos.ie/api/v1/auth/refresh-token" \
  -H "Content-Type: application/json" \
  -d '{
    "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
  }'

PowerShell:

$body = @{
    refresh_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/auth/refresh-token" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body

📱 Passwordless Authentication (OTP Sign-In)

Sign in using OTP sent via SMS - no password required

POST /api/v1/auth/signin-otp
6-digit OTP will be sent via SMS. Valid for 5 minutes.

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "https://api3.facepos.ie/api/v1/auth/signin-otp" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+353871234567"
  }'

PowerShell:

$body = @{
    phone_number = "+353871234567"
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/auth/signin-otp" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body

Response Example:

{
  "success": true,
  "data": {
    "message": "OTP sent successfully",
    "phone_number": "+353871234567"
  },
  "timestamp": "2025-11-03T10:30:00.000Z"
}
POST /api/v1/auth/signin-otp/verify
Enter the 6-digit OTP received via SMS

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "https://api3.facepos.ie/api/v1/auth/signin-otp/verify" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+353871234567",
    "otp_code": "123456"
  }'

PowerShell:

$body = @{
    phone_number = "+353871234567"
    otp_code = "123456"
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/auth/signin-otp/verify" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body

Response Example:

{
  "success": true,
  "data": {
    "message": "Sign-in successful",
    "profile_status": "Complete",
    "password_status": "Password is set",
    "profile_data": [...],
    "merchantresponse": true,
    "jwt_access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "jwt_refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "access_token_issued_at": "2025-11-03T10:35:00.000Z",
    "access_token_expires_at": "2025-11-03T10:40:00.000Z",
    "refresh_token_issued_at": "2025-11-03T10:35:00.000Z",
    "refresh_token_expires_at": "2025-11-10T10:35:00.000Z",
    "access_token_expiry": "5 minutes",
    "refresh_token_expiry": "7 days"
  },
  "timestamp": "2025-11-03T10:35:00.000Z"
}
POST /api/v1/auth/resend-otp
Select whether to resend OTP for signup verification or password reset

📋 cURL Commands

Resend for Sign Up (Bash/Linux/Mac):

curl -X POST "https://api3.facepos.ie/api/v1/auth/resend-otp" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+353871234567",
    "action_type": "sign_up"
  }'

Resend for Forgot Password (Bash/Linux/Mac):

curl -X POST "https://api3.facepos.ie/api/v1/auth/resend-otp" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+353871234567",
    "action_type": "forgot_password"
  }'

PowerShell:

$body = @{
    phone_number = "+353871234567"
    action_type = "sign_up"
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/auth/resend-otp" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body

Response Example:

{
  "success": true,
  "data": {
    "message": "OTP resent for Sign Up",
    "profile_data": {
      "filtered_count": 1,
      "data": [...]
    }
  },
  "timestamp": "2025-11-13T10:30:00.000Z"
}

🔐 Private API's - Authentication Required

These endpoints require JWT authentication. To access these APIs:

  1. Sign in using the Sign In API from the Authentication tab
  2. Copy the jwt_access_token from the response
  3. Paste the token in the API input fields below

Token Status: ❌ No Token

GET /api/v1/getalllist
Select the database table to query

🔍 Filters (Optional)

Exact match for sender profile ID
Exact match for receiver profile ID (uses OR with pid if both provided)
Filter by date range in format: start_date,end_date
Filter by amount range in format: min,max

📋 cURL Commands

Bash/Linux/Mac (Basic Query):

curl -X GET "https://api3.facepos.ie/api/v1/getalllist?table=merchanttrans&page=1&limit=10"

With Filters (Profile ID):

curl -X GET "https://api3.facepos.ie/api/v1/getalllist?table=merchanttrans&page=1&limit=10&pid_eq=3960"

With Date Range:

curl -X GET "https://api3.facepos.ie/api/v1/getalllist?table=merchanttrans&page=1&limit=10&date_datebetween=2024-01-01,2024-12-31"

PowerShell:

$params = @{
    table = "merchanttrans"
    page = 1
    limit = 10
    pid_eq = "3960"
}
$query = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$($_.Value)" }) -join "&"
Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/getalllist?$query" -Method GET

Response Example:

{
  "table": "merchanttrans",
  "total_count": 1034,
  "filtered_count": 25,
  "limit": 10,
  "offset": 0,
  "page": 1,
  "filters": {
    "pid_eq": "3960"
  },
  "data": [
    {
      "uid": "12345",
      "pid": "3960",
      "to_pid": "1234",
      "mid": "456",
      "amount": "100.00",
      "currency": "EUR",
      "status": "completed",
      "date": "2024-12-10T10:30:00Z",
      "sender_name": "John Doe",
      "receiver_name": "Jane Smith",
      "bank_name": "Bank of Ireland",
      ...
    }
  ]
}
GET /api/v1/profile
Get your profile data with all related information (bank accounts, merchants, transactions)

📋 cURL Commands

Bash/Linux/Mac:

curl -X GET "https://api3.facepos.ie/api/v1/profile" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN"

PowerShell:

$token = "YOUR_JWT_ACCESS_TOKEN"
Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/profile" `
  -Method GET `
  -Headers @{Authorization="Bearer $token"}

Response Example:

{
  "success": true,
  "data": {
    "profile": {
      "uid": 3960,
      "email": null,
      "mobile": "+916380213623",
      "name": null,
      "status": "1",
      "createdAt": "2025-10-30T09:30:45Z",
      "bankAccounts": [...],
      "bankInfo": [...],
      "merchants": [...],
      "customerPaymentDetails": [...],
      "sentTransactions": [...],
      "receivedTransactions": [...]
    },
    "statistics": {
      "total_bank_accounts": 0,
      "total_bank_info": 0,
      "total_merchants": 0,
      "total_payment_links": 0,
      "total_sent_transactions": 0,
      "total_received_transactions": 0,
      "active_merchants": 0
    }
  },
  "timestamp": "2025-10-31T09:33:41.26Z"
}
PUT /api/v1/profile/update
Update any profile field(s) - all fields are optional

👤 Personal Information

📍 Address Information

📞 Contact Information

🖼️ Images & Documents

🏦 Banking Information

⚙️ Settings & Status

📋 cURL Commands

Update Personal Info (Bash/Linux/Mac):

curl -X PUT "https://api3.facepos.ie/api/v1/profile/update" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Doe",
    "email": "john@example.com",
    "mobile": "+353871234567",
    "gender": "Male"
  }'

Update Address (Bash/Linux/Mac):

curl -X PUT "https://api3.facepos.ie/api/v1/profile/update" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "add1": "123 Main Street",
    "city": "Dublin",
    "state": "Leinster",
    "country": "Ireland",
    "postcode": "D01 ABC1"
  }'

Update ALL Fields Example (Bash/Linux/Mac):

curl -X PUT "https://api3.facepos.ie/api/v1/profile/update" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Doe",
    "email": "john@example.com",
    "mobile": "+353871234567",
    "gender": "Male",
    "password": "NewPassword123",
    "add1": "123 Main Street",
    "add2": "Apt 4B",
    "city": "Dublin",
    "state": "Leinster",
    "country": "Ireland",
    "postcode": "D01 ABC1",
    "cont_person_name": "Jane Doe",
    "cont_number": "+353871234568",
    "profileimage": "https://example.com/profile.jpg",
    "profileimage2": "https://example.com/profile2.jpg",
    "image": "https://example.com/image.jpg",
    "add_image": "https://example.com/address.jpg",
    "id_image": "https://example.com/id.jpg",
    "id_no": "PPS1234567X",
    "bankauthid": "AUTH123456",
    "selectedbankid": "123",
    "selectedbankcount": "2",
    "total_bank_count": "5",
    "status": "active",
    "Subscription": "premium",
    "sms": "1",
    "openurlstatus": "enabled",
    "profile_type": 1,
    "profile_id": 123,
    "market": "IE",
    "deviceid": "device-abc123",
    "is_password": 1,
    "notes": "Additional profile notes"
  }'

Update Multiple Fields (PowerShell):

$token = "YOUR_JWT_ACCESS_TOKEN"
$body = @{
    name = "John Doe"
    email = "john@example.com"
    mobile = "+353871234567"
    city = "Dublin"
    country = "Ireland"
    status = "active"
    profileimage = "https://example.com/profile.jpg"
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/profile/update" `
  -Method PUT `
  -Headers @{Authorization="Bearer $token"} `
  -ContentType "application/json" `
  -Body $body

Response Example:

{
  "success": true,
  "data": {
    "message": "Profile updated successfully",
    "profile": {
      "uid": 3960,
      "name": "John Doe",
      "email": "john@example.com",
      "mobile": "+353871234567",
      "city": "Dublin",
      "country": "Ireland",
      "status": "active",
      "profileimage": "https://example.com/profile.jpg",
      "createdAt": "2025-10-30T09:30:45.000Z",
      "updatedAt": "2025-11-04T10:15:30.000Z"
    }
  },
  "timestamp": "2025-11-04T10:15:30.000Z"
}
GET /api/v1/merchant
Get all merchant data for your profile (all columns from merchant table)

📋 cURL Commands

Bash/Linux/Mac:

curl -X GET "https://api3.facepos.ie/api/v1/merchant" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN"

PowerShell:

$token = "YOUR_JWT_ACCESS_TOKEN"
Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/merchant" `
  -Method GET `
  -Headers @{Authorization="Bearer $token"}

Response Example:

{
  "success": true,
  "data": {
    "merchants": [
      {
        "id": 1,
        "add_image": "...",
        "add1": "123 Main St",
        "add2": "Suite 100",
        "city": "Dublin",
        "country": "Ireland",
        "email": "merchant@example.com",
        "id_image": "...",
        "id_no": "ID123456",
        "name": "My Business",
        "postcode": "D01 X2Y3",
        "profile_id": 3960,
        "profileimage": "...",
        "state": "Leinster",
        "status": "1",
        "createddate": "2025-10-30T12:00:00.000Z",
        "market": "IE",
        "profileimage2": "..."
      }
    ]
  },
  "timestamp": "2025-10-31T10:00:00.000Z"
}
POST /api/v1/merchant

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "https://api3.facepos.ie/api/v1/merchant" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Business",
    "email": "business@example.com",
    "add1": "123 Main Street",
    "city": "Dublin",
    "country": "Ireland",
    "postcode": "D01 X123",
    "market": "IE",
    "status": "1"
  }'

PowerShell:

$token = "YOUR_JWT_ACCESS_TOKEN"
$body = @{
    name = "My Business"
    email = "business@example.com"
    add1 = "123 Main Street"
    city = "Dublin"
    country = "Ireland"
    postcode = "D01 X123"
    market = "IE"
    status = "1"
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/merchant" `
  -Method POST `
  -Headers @{Authorization="Bearer $token"; "Content-Type"="application/json"} `
  -Body $body
PUT /api/v1/merchant/{id}
ID of the merchant to update (from GET merchant response)

📋 cURL Commands

Bash/Linux/Mac:

curl -X PUT "https://api3.facepos.ie/api/v1/merchant/123" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Business Name",
    "city": "Cork",
    "status": "1"
  }'

PowerShell:

$token = "YOUR_JWT_ACCESS_TOKEN"
$merchantId = 123
$body = @{
    name = "Updated Business Name"
    city = "Cork"
    status = "1"
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/merchant/$merchantId" `
  -Method PUT `
  -Headers @{Authorization="Bearer $token"; "Content-Type"="application/json"} `
  -Body $body
DELETE /api/v1/merchant/{id}
⚠️ Warning: This action cannot be undone!

📋 cURL Commands ⚠️

Bash/Linux/Mac:

curl -X DELETE "https://api3.facepos.ie/api/v1/merchant/123" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN"

PowerShell:

$token = "YOUR_JWT_ACCESS_TOKEN"
$merchantId = 123

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/merchant/$merchantId" `
  -Method DELETE `
  -Headers @{Authorization="Bearer $token"}
GET /api/v1/trans
Get all transactions from trans table for your profile (with enriched data)
Number of transactions to return (1-200)

📋 cURL Commands

Bash/Linux/Mac:

curl -X GET "https://api3.facepos.ie/api/v1/trans?limit=50" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN"

PowerShell:

$token = "YOUR_JWT_ACCESS_TOKEN"
Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/trans?limit=50" `
  -Method GET `
  -Headers @{Authorization="Bearer $token"}

Response Example:

{
  "success": true,
  "data": {
    "transactions": [
      {
        "uid": 3724,
        "pid": 8566,
        "amount": "2.00",
        "description": "Payment",
        "status": "SETTLED",
        "auto_trigger": 0,
        "senderacc": "IE12345678901234567890",
        "receiveracc": "IE07AIBK93331773233082",
        "refnum": "REF123456",
        "to_pid": 8201,
        "currency": "EUR",
        "paymenttype": "SEPA_CREDIT_TRANSFER",
        "invoiceid": "123",
        "expirydate": null,
        "payeeid": null,
        "commission": "0.02",
        "notification_sent": 0,
        "paymentrequestid": null,
        "date": "2025-11-08 07:50:39",
        "paymentfor": "customer",
        "sendername": "John Doe",
        "senderphoneno": "+353871234567",
        "receivername": "Business Name",
        "receiverphoneno": "+353852462865",
        "bank_name": "Bank of Ireland",
        "bank_logo": "https://cdn.tink.com/...",
        "transactionHistory": [...],
        "tinkDetails": null
      }
    ],
    "statistics": {
      "total_transactions": 155,
      "total_amount": 5280.50,
      "by_status": {
        "INITIATED": 5,
        "ONPROCESS": 0,
        "SENT": 10,
        "AWAITING_CREDENTIALS": 0,
        "DECLINED": 2,
        "FAILED": 18,
        "EXPIRED": 45,
        "CANCELLED": 3,
        "SETTLED_PAYER": 0,
        "SETTLED_PAYEE": 0,
        "SETTLED": 72
      },
      "total_commission": 52.80
    }
  },
  "timestamp": "2025-11-17T10:00:00.000Z"
}
GET /api/v1/merchanttrans
Get merchant transactions with sender name, receiver name, and transaction type
Optional - Leave empty to get all transactions, or specify 1-200 to limit results

🔍 Optional Filters

📋 cURL Commands

Bash/Linux/Mac:

curl -X GET "https://api3.facepos.ie/api/v1/merchanttrans?limit=50" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN"

PowerShell:

$token = "YOUR_JWT_ACCESS_TOKEN"
Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/merchanttrans?limit=50" `
  -Method GET `
  -Headers @{Authorization="Bearer $token"}

Response Example (Simplified):

{
  "success": true,
  "data": {
    "transactions": [
      {
        "uid": 1001,
        "pid": 123,
        "to_pid": 456,
        "amount": "100.00",
        "description": "Payment for services",
        "status": "SETTLED",
        "refnum": "REF789",
        "sendername": "John Customer",
        "receivername": "ABC Business Ltd",
        "transaction_type": "C2M"
      },
      {
        "uid": 1002,
        "pid": 456,
        "to_pid": 123,
        "amount": "50.00",
        "description": "Refund",
        "status": "COMPLETED",
        "refnum": "REF790",
        "sendername": "XYZ Merchant",
        "receivername": "Jane Customer",
        "transaction_type": "M2C"
      },
      {
        "uid": 1003,
        "pid": 789,
        "to_pid": 456,
        "amount": "200.00",
        "description": "B2B Payment",
        "status": "SETTLED",
        "refnum": "REF791",
        "sendername": "DEF Business",
        "receivername": "ABC Business Ltd",
        "transaction_type": "M2M"
      }
    ],
    "total_count": 3
  },
  "timestamp": "2025-12-09T10:00:00.000Z"
}

🔍 Transaction Types

  • C2M - Customer to Merchant (Customer pays Business)
  • M2C - Merchant to Customer (Business pays Customer, e.g., refund)
  • M2M - Merchant to Merchant (Business to Business payment)
GET /api/v1/public/trans
Filter by profile ID (leave empty for all transactions)
Number of transactions to return (1-200)

📋 cURL Commands (No Authentication Required)

Bash/Linux/Mac (All transactions):

curl -X GET "https://api3.facepos.ie/api/v1/public/trans?limit=50"

Bash/Linux/Mac (Filter by profile):

curl -X GET "https://api3.facepos.ie/api/v1/public/trans?profile_id=123&limit=50"

PowerShell:

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/public/trans?limit=50"
GET /api/v1/public/trans-raw
Filter by profile ID (leave empty for all)
Get specific transaction by UID
Number of transactions to return (1-500) - RAW endpoint has higher limit

📋 cURL Commands (Raw Database Data)

Get by UID:

curl -X GET "https://api3.facepos.ie/api/v1/public/trans-raw?uid=456"

Get by Profile ID:

curl -X GET "https://api3.facepos.ie/api/v1/public/trans-raw?profile_id=123&limit=200"

PowerShell:

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/public/trans-raw?limit=100"
GET /api/v1/transhistory
Get transaction history for your profile (all columns with statistics)
Number of records to return (1-200)

📋 cURL Commands

Bash/Linux/Mac:

curl -X GET "https://api3.facepos.ie/api/v1/transhistory?limit=50" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN"

PowerShell:

$token = "YOUR_JWT_ACCESS_TOKEN"
Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/transhistory?limit=50" `
  -Method GET `
  -Headers @{Authorization="Bearer $token"}

Response Example:

{
  "success": true,
  "data": {
    "transhistory": [
      {
        "id": 123,
        "transdate": "2025-10-31T10:00:00.000Z",
        "mid": 1,
        "pid": 3960,
        "refid": "REF123456",
        "status": "SUCCESS",
        "transmessage": "Transaction completed successfully",
        "requestmessage": "Payment request processed",
        "sysdate": "2025-10-31T09:59:00.000Z",
        "processed": 1,
        "autotrigger": 0
      }
    ],
    "statistics": {
      "total_records": 10,
      "by_status": {
        "SUCCESS": 8,
        "FAILED": 1,
        "PENDING": 1
      },
      "processed": 9,
      "unprocessed": 1,
      "autotrigger": 3
    }
  },
  "timestamp": "2025-10-31T10:00:00.000Z"
}
GET /api/v1/payee
Get all payees for your profile with statistics
POST /api/v1/payee (FacePOS)
Mobile number of the FacePOS user to add as payee
Override name (uses profile name if not provided)
POST /api/v1/payee (Non-FacePOS)
GET /api/v1/merchant-bank-account
Get all merchant bank accounts for your profile (from merchantbankaccount table)
Filter by specific merchant ID (leave empty for all merchants)

📋 cURL Commands

Get All Merchant Bank Accounts:

curl -X GET "https://api3.facepos.ie/api/v1/merchant-bank-account?limit=50" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN"

Filter by Merchant ID:

curl -X GET "https://api3.facepos.ie/api/v1/merchant-bank-account?mid=5475&limit=50" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN"

Response Example:

{
  "success": true,
  "data": {
    "bank_accounts": [
      {
        "uid": 1,
        "pid": 3960,
        "mid": 123,
        "bankname": "Bank of Ireland",
        "accounttype": "Business Current Account",
        "accountno": "12345678",
        "currency": "EUR",
        "iban": "IE29AIBK93115212345678",
        "sortcode": "931152",
        "accholdername": "My Business Name",
        "is_primary": 1,
        "merchant_name": "My Business",
        "merchant_logo": "https://...",
        "profile_name": "John Doe",
        "profile_image": "https://...",
        "bank_logo": "https://s3.eu-west-1.amazonaws.com/img.facepos.com/ie-bankofireland.png"
      }
    ],
    "statistics": {
      "total_accounts": 1,
      "primary_accounts": 1,
      "by_currency": {
        "EUR": 1
      },
      "by_bank": {
        "Bank of Ireland": 1
      },
      "by_account_type": {
        "Business Current Account": 1
      }
    }
  },
  "timestamp": "2025-11-07T10:00:00.000Z"
}
POST /api/v1/merchant-bank-account
Must be a merchant that belongs to your profile
If set to Yes, all other accounts for this merchant will be set to non-primary

📋 cURL Commands

Create Merchant Bank Account:

curl -X POST "https://api3.facepos.ie/api/v1/merchant-bank-account" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN" \
  -d '{
    "mid": 123,
    "bankname": "Bank of Ireland",
    "accounttype": "Business Current Account",
    "accountno": "12345678",
    "currency": "EUR",
    "iban": "IE29AIBK93115212345678",
    "sortcode": "931152",
    "accholdername": "My Business Name",
    "is_primary": true
  }'

Response Example:

{
  "success": true,
  "data": {
    "bank_account": {
      "uid": 1,
      "pid": 3960,
      "mid": 123,
      "bankname": "Bank of Ireland",
      "accounttype": "Business Current Account",
      "accountno": "12345678",
      "currency": "EUR",
      "iban": "IE29AIBK93115212345678",
      "sortcode": "931152",
      "accholdername": "My Business Name",
      "is_primary": 1,
      "merchant_name": "My Business",
      "merchant_logo": "https://...",
      "bank_logo": "https://s3.eu-west-1.amazonaws.com/img.facepos.com/ie-bankofireland.png"
    },
    "message": "Merchant bank account created successfully"
  },
  "timestamp": "2025-11-07T10:00:00.000Z"
}
PUT /api/v1/merchant-bank-account?uid={uid}

Update a merchant bank account. When setting is_primary to 1, all other accounts for the merchant automatically become non-primary.

📋 cURL Commands

Update Bank Account Name:

curl -X PUT "https://api3.facepos.ie/api/v1/merchant-bank-account?uid=1" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -d '{
    "bankname": "Updated Bank Name"
  }'

Set Account as Primary (removes primary from others):

curl -X PUT "https://api3.facepos.ie/api/v1/merchant-bank-account?uid=1" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -d '{
    "is_primary": 1
  }'

Update Multiple Fields:

curl -X PUT "https://api3.facepos.ie/api/v1/merchant-bank-account?uid=1" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -d '{
    "bankname": "AIB Bank",
    "accounttype": "Current",
    "accountno": "87654321",
    "iban": "IE29AIBK93115287654321",
    "sortcode": "931152",
    "accholdername": "John Smith",
    "is_primary": 1
  }'
DELETE /api/v1/merchant-bank-account?uid={uid}

Delete a merchant bank account. Requires account UID and proper authorization.

📋 cURL Commands

Delete Merchant Bank Account:

curl -X DELETE "https://api3.facepos.ie/api/v1/merchant-bank-account?uid=9995" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwaG9uZU51bWJlciI6Iis5MTkwNzQxODk2OTkiLCJwcm9maWxlSWQiOjE5NjcsInR5cGUiOiJhY2Nlc3MiLCJpYXQiOjE3NjI1ODgxMzgsImV4cCI6MTc2MjY3NDUzOCwiYXVkIjoiZmFjZXBvcy1jbGllbnQiLCJpc3MiOiJmYWNlcG9zLWFwaSJ9.vKq7raMjEYE3H3D7HUYN1i6KaqtMnw4OGpjA9W9hzRg"

Success Response Example:

{
  "success": true,
  "data": {
    "uid": 9997,
    "message": "Bank account deleted successfully",
    "deletedAccount": {
      "uid": 9997,
      "bankname": "AIB",
      "accountno": "87654321",
      "accholdername": "John Doe",
      "merchantname": "Levi's"
    }
  },
  "timestamp": "2025-11-08T10:00:00.000Z"
}

Error Response Example (Primary Account):

{
  "success": false,
  "error": {
    "code": "PRIMARY_ACCOUNT_ERROR",
    "message": "Cannot delete primary account while other accounts exist. Please set another account as primary first or delete all other accounts."
  },
  "timestamp": "2025-11-08T10:00:00.000Z"
}

💰 Refund Management (JWT Protected)

Process and manage transaction refunds - Requires JWT Authentication

POST /api/v1/refund 🔒 JWT REQUIRED

Create a refund record for a transaction. This records the transaction's total amount and metadata; payment is handled separately via /api/v1/refund-payment.

Get from Sign In API in Authentication tab
GET /api/v1/refund 🔒 JWT REQUIRED

Get list of all refunds with optional filters

GET /api/v1/refund/[id] 🔒 JWT REQUIRED

Get detailed information about a specific refund

PUT /api/v1/refund/[id] 🔒 JWT REQUIRED

Update refund details (amount, description, refund reason)

POST /api/v1/refund-payment 🔒 JWT REQUIRED

Process a refund payment (1st or 2nd installment). Second payment must match the exact pending amount.

DELETE /api/v1/refund/[id] 🔒 JWT REQUIRED

Delete a refund record from the database

GET /api/v1/bank-accounts
Get all bank accounts for your profile (from bankaccount table)
Maximum number of records to return

📋 cURL Commands

Bash/Linux/Mac:

curl -X GET "https://api3.facepos.ie/api/v1/bank-accounts?limit=50" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN"

PowerShell:

$token = "YOUR_JWT_ACCESS_TOKEN"
Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/bank-accounts?limit=50" `
  -Method GET `
  -Headers @{Authorization="Bearer $token"}

Response Example:

{
  "success": true,
  "data": [
    {
      "uid": 10017,
      "pid": 4353,
      "bankname": "AIB",
      "accounttype": "Current",
      "accountno": "IE80AIBK93356235238072",
      "currency": "EUR",
      "bban": "AIBK93356235238072",
      "iban": "IE80AIBK93356235238072",
      "primary": true,
      "accholdername": "John Doe",
      "sortcode": "933562",
      "logo": "https://cdn.tink.se/bank-logos/ie-aib.png",
      "country": "Ireland"
    }
  ],
  "count": 1,
  "message": "Bank accounts retrieved successfully",
  "timestamp": "2025-12-25T08:00:00.000Z"
}
GET /api/v1/bank-accounts/{id}

📋 cURL Commands

Bash/Linux/Mac:

curl -X GET "https://api3.facepos.ie/api/v1/bank-accounts/123" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN"

PowerShell:

$token = "YOUR_JWT_ACCESS_TOKEN"
Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/bank-accounts/123" `
  -Method GET `
  -Headers @{Authorization="Bearer $token"}
PUT /api/v1/bank-accounts/{id}
Toggle primary status (will auto-unset other primary accounts)

📋 cURL Commands

Toggle Primary via Query Param:

curl -X PUT "https://api3.facepos.ie/api/v1/bank-accounts/123?is_primary=1" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Update Bank Details:

curl -X PUT "https://api3.facepos.ie/api/v1/bank-accounts/123" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "bankname": "Bank of Ireland",
    "accountno": "87654321",
    "primary": true
  }'
DELETE /api/v1/bank-accounts/{id}

📋 cURL Commands

Bash/Linux/Mac:

curl -X DELETE "https://api3.facepos.ie/api/v1/bank-accounts/123" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN"

PowerShell:

$token = "YOUR_JWT_ACCESS_TOKEN"
Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/bank-accounts/123" `
  -Method DELETE `
  -Headers @{Authorization="Bearer $token"}
POST /api/v1/bank-accounts
If checked, this will become the primary account and unset other primary accounts

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "https://api3.facepos.ie/api/v1/bank-accounts" \
  -H "Authorization: Bearer YOUR_JWT_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "pid": 9947,
    "bankname": "AIB",
    "accounttype": "Current",
    "accountno": "12345678",
    "currency": "EUR",
    "bban": "AIBK93115212345678",
    "iban": "IE29AIBK93115212345678",
    "primary": true,
    "accholdername": "John Doe",
    "sortcode": "931152"
  }'

PowerShell:

$token = "YOUR_JWT_ACCESS_TOKEN"
$body = @{
    pid = 9947
    bankname = "AIB"
    accounttype = "Current"
    accountno = "12345678"
    currency = "EUR"
    bban = "AIBK93115212345678"
    iban = "IE29AIBK93115212345678"
    primary = $true
    accholdername = "John Doe"
    sortcode = "931152"
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/bank-accounts" `
  -Method POST `
  -Headers @{Authorization="Bearer $token"; "Content-Type"="application/json"} `
  -Body $body

Response Example:

{
  "success": true,
  "data": {
    "uid": 10234,
    "pid": 9947,
    "bankname": "AIB",
    "accounttype": "Current",
    "accountno": "12345678",
    "currency": "EUR",
    "bban": "AIBK93115212345678",
    "iban": "IE29AIBK93115212345678",
    "primary": true,
    "accholdername": "John Doe",
    "sortcode": "931152"
  },
  "message": "Bank account created successfully",
  "timestamp": "2025-11-04T08:00:00.000Z"
}

📚 Additional CRUD API Endpoints

The following endpoints are available with full CRUD operations (GET, POST, PUT, DELETE). All require JWT authentication via Bearer token.

Data Management
  • /api/v1/api-calls
  • /api/v1/api-clients
  • /api/v1/banks
  • /api/v1/bank-list
  • /api/v1/commissions
  • /api/v1/commission-history
User Management
  • /api/v1/contact-info
  • /api/v1/face-images
  • /api/v1/face-logs
  • /api/v1/id-management
  • /api/v1/login-devices
  • /api/v1/merchant-users
Transactions
  • /api/v1/trans
  • /api/v1/transaction-history
  • /api/v1/merchant-transactions
  • /api/v1/blockchain-transactions
  • /api/v1/payee-list
Communication
  • /api/v1/notifications
  • /api/v1/newsletter-subscriptions
  • /api/v1/websocket-connections
Admin
  • /api/v1/staff
  • /api/v1/reject-reasons
  • /api/v1/users
Banking & Tink
  • /api/v1/banking/accounts
  • /api/v1/banking/payments/initiate
  • /api/v1/tink-banks
  • /api/v1/tink-countries
  • /api/v1/tink-bank-list

💡 Usage Pattern: All endpoints follow RESTful conventions:
GET /api/v1/{resource} - List all items
GET /api/v1/{resource}/{id} - Get single item
POST /api/v1/{resource} - Create new item
PUT /api/v1/{resource}/{id} - Update item
DELETE /api/v1/{resource}/{id} - Delete item

🔐 Authentication: Include JWT token in headers:
Authorization: Bearer YOUR_JWT_TOKEN

🚀 Quick Test - Generic API Tester

Test any endpoint quickly with custom parameters

POST /api/v1/invoice
Generate invoices from eligible transactions (SENT/SETTLED status)
Choose customer for trans table (use PID) or merchant for merchanttrans table (use MID)
Leave empty to process ALL merchants (merchant action only)
Leave empty to process ALL profiles (customer action) or defaults to 0 (merchant action)
Leave empty to process ALL months that have transactions
Enter year (e.g., 2025) - Required

ℹ️ Invoice Generation Info

  • Automatic Processing: Analyzes only merchanttrans table
  • Smart Detection: Only creates invoices for months that have transactions
  • Options:
    • Leave MID empty = Process all merchants
    • Specify MID = Process only that merchant
    • Leave PID empty = Default to 0 in invoice
    • Specify PID = Filter transactions by PID and store in invoice
    • Leave Month empty = Process all 12 months
    • Specify Month = Process only that month
  • Uses CurrentDate column from merchanttrans table
  • One invoice row per merchant per month
  • All month's transactions stored as JSON array
  • Sets merchant_id = 0 (always) in invoice table
GET /api/v1/invoice
Retrieve invoices with optional filters
Filter by customer profile ID
Filter by merchant ID
Filter by payment status
Filter by invoice month (format: YYYY-MM, e.g., 2025-09)
Maximum number of records (default: 100, max: 500)

ℹ️ Get Invoices Info

  • Flexible Filters: Combine any filters for precise results
  • Available Filters:
    • pid - Customer profile ID
    • merchant_id - Merchant ID
    • is_paid - Payment status (0=unpaid, 1=paid)
    • month - Invoice month in YYYY-MM format
    • limit - Max records (default: 100, max: 500)
  • Example: Get unpaid invoices for merchant 9173 in September 2025
  • All filters are optional - leave empty to get all invoices

💰 Commission Management

GET /api/v1/commissions
GET /api/v1/commissions/:id
PUT /api/v1/commissions/:id
Enter percentage value (e.g., 2.50 for 2.5%)
Enter percentage value (e.g., 1.50 for 1.5%)
ℹ️ Auto-Logging Feature:

When you update commission values, the system automatically logs the change to the commissionhistory table with:

  • Old and new merchant/customer commission percentages
  • Updated by: "admin" (static)
  • Timestamp of the change
DELETE /api/v1/commissions/:id
GET /api/v1/commission-history
ℹ️ Commission History:

This endpoint shows the audit trail of all commission changes, including who updated them and when.

👥 Merchant Users Management

✨ About Merchant Users:

Manage merchant staff/employees. Each merchant can have multiple users (managers, cashiers, etc.) with different roles and permissions.

GET /api/v1/merchant-users 🔒 AUTH REQUIRED
GET /api/v1/merchant-users/:id 🔒 AUTH REQUIRED
POST /api/v1/merchant-users 🔒 AUTH REQUIRED
✅ What This Creates:
  • New staff member for the merchant
  • Login credentials for the user
  • Role and permission settings
  • Contact and location information
PUT /api/v1/merchant-users/:id 🔒 AUTH REQUIRED
DELETE /api/v1/merchant-users/:id 🔒 AUTH REQUIRED
⚠️ Warning:

This will permanently delete the merchant user. This action cannot be undone!

📊 Transaction Status Count (Authenticated)

GET /api/v1/statuscount
📊 Both Tables (Authenticated):

Returns status counts and transaction details from both trans and merchanttrans tables. Includes combined summary with grand totals.

GET /api/v1/statuscount?action=trans
💳 Trans Table Only:

Returns status counts from trans table only. Status values: INITIATED (0), ONPROCESS (1), SENT (2), AWAITING_CREDENTIALS (3). Includes uid, refnum (payment_request_id), currentstatus, amount, date, pid, to_pid, bank_name, note.

GET /api/v1/statuscount?action=merchanttrans
🏪 MerchantTrans Table Only:

Returns status counts from merchanttrans table only. Status values: INITIATED, ONPROCESS, SENT, AWAITING_CREDENTIALS (ENUM strings). Includes uid, refnum, currentstatus, amount, currentDate, pid, to_pid, mid, description, currency, invoiceno.

📈 Status Count Features

  • Four Status Types Tracked:
    • INITIATED - Transaction initiated
    • ONPROCESS - Transaction in process
    • SENT - Transaction sent
    • AWAITING_CREDENTIALS - Awaiting credentials
  • Three Query Modes:
    • No parameter - Returns both trans and merchanttrans with combined summary
    • action=trans - Returns trans table data only
    • action=merchanttrans - Returns merchanttrans table data only
  • Response Includes:
    • Count by status for each table
    • Up to 100 transactions per status (most recent)
    • Full transaction details including uid, refnum, currentstatus
    • Summary statistics and totals
  • Data Differences:
    • trans table: Status stored as INT (0-3), converted to text in response
    • merchanttrans table: Status stored as ENUM (string values)
POST /api/v1/checkout-QR 🛒 QR Checkout

Generate encrypted payment QR link for customer checkout (requires JWT token).

Get token from Sign In API in Authentication tab

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/checkout-QR" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -d '{
    "phoneno": "+353123456789",
    "mid": 1042,
    "amount": 100.50,
    "uid": 1,
    "invoiceid": "INV-001",
    "notes": "Payment for services",
    "market": "IE"
  }'

PowerShell:

$headers = @{
    "Content-Type" = "application/json"
    "Authorization" = "Bearer YOUR_JWT_TOKEN"
}
$body = @{
    phoneno = "+353123456789"
    mid = 1042
    amount = 100.50
    uid = 1
    invoiceid = "INV-001"
    notes = "Payment for services"
    market = "IE"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/checkout-QR" `
  -Method POST `
  -Headers $headers `
  -Body $body

Response Example:

{
  "success": true,
  "data": {
    "encryptedUrl": "https://secure2.facepos.ie?q=ABC123...&market=IE",
    "trans_id": 12345
  }
}
POST /api/v1/payment-QR 🏦 Tink Payment 🔒 JWT Required

Process Tink open banking payment, generate payment link, and update transaction refnum.

Get token from Auth endpoints (Login, Verify OTP, etc.)
GB uses FASTER_PAYMENTS with SORT_CODE, others use SEPA_CREDIT_TRANSFER with IBAN

📋 cURL Commands

Bash/Linux/Mac (Ireland - SEPA):

curl -X POST "http://localhost:3000/api/v1/payment-QR" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -d '{
    "mid": 1042,
    "transId": 12345,
    "amount": 100.50,
    "market": "IE",
    "currency": "EUR"
  }'

PowerShell (UK - FASTER_PAYMENTS):

$body = @{
    mid = 1042
    transId = 12345
    amount = 75.00
    market = "GB"
    currency = "GBP"
} | ConvertTo-Json

$headers = @{
    "Content-Type" = "application/json"
    "Authorization" = "Bearer YOUR_JWT_TOKEN"
}

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/payment-QR" `
  -Method POST `
  -Headers $headers `
  -Body $body

Response Example:

{
  "success": true,
  "paymentUrl": "https://link.tink.com/1.0/payment/...",
  "refnum": "pm_ABC123XYZ",
  "message": "Payment initiated successfully"
}
💡 Integration Notes:
  • Requires merchant to have primary bank account with IBAN (SEPA) or SORT_CODE (UK)
  • Transaction must exist in merchanttrans table before calling this API
  • Updates merchanttrans.refnum with Tink payment reference
  • Returns Tink payment link for customer redirect
  • Country-specific payment schemes:
    • GB: FASTER_PAYMENTS (requires SORT_CODE)
    • IE, FR, DE, ES, IT: SEPA_CREDIT_TRANSFER (requires IBAN)
POST /api/v1/customer-payment-link 💳 Customer Payment

Generate encrypted payment link for customer payments (requires JWT token).

Get token from Sign In API in Authentication tab

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/customer-payment-link" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -d '{
    "pid": 123,
    "amount": 50.00,
    "invoiceid": "INV-001",
    "notes": "Payment for services",
    "mobile": "+353123456789",
    "email": "customer@example.com"
  }'

PowerShell:

$headers = @{
    "Content-Type" = "application/json"
    "Authorization" = "Bearer YOUR_JWT_TOKEN"
}
$body = @{
    pid = 123
    amount = 50.00
    invoiceid = "INV-001"
    notes = "Payment for services"
    mobile = "+353123456789"
    email = "customer@example.com"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/customer-payment-link" `
  -Method POST `
  -Headers $headers `
  -Body $body

Response Example:

{
  "success": true,
  "data": {
    "paymentlinkid": "abc123def456",
    "paymentlink": "https://secure2.facepos.ie?q=ENCRYPTED_DATA"
  },
  "message": "Payment link generated successfully"
}
POST /api/v1/merchant-payment-link 🏪 Merchant Payment

Generate encrypted payment link for merchant payments - refunds, payouts (requires JWT token).

Get token from Sign In API in Authentication tab

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/merchant-payment-link" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -d '{
    "mid": 1042,
    "amount": 75.00,
    "phoneno": "+353123456789",
    "invoiceid": "INV-001",
    "notes": "Refund for order #123",
    "email": "merchant@example.com"
  }'

PowerShell:

$headers = @{
    "Content-Type" = "application/json"
    "Authorization" = "Bearer YOUR_JWT_TOKEN"
}
$body = @{
    mid = 1042
    amount = 75.00
    phoneno = "+353123456789"
    invoiceid = "INV-001"
    notes = "Refund for order #123"
    email = "merchant@example.com"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/merchant-payment-link" `
  -Method POST `
  -Headers $headers `
  -Body $body

Response Example:

{
  "success": true,
  "data": {
    "paymentlinkid": "xyz789abc123",
    "paymentlink": "https://secure2.facepos.ie?q=ENCRYPTED_DATA",
    "transid": 12345
  },
  "message": "Merchant payment link generated successfully"
}
POST /api/v1/customertomerchantlink 🔗 Tink Payment 🌍 NO AUTH REQUIRED

Create customer-to-merchant payment via Tink integration (supports guest with pid=0). Public endpoint - no authentication required.

Use 0 for guest customers or positive ID for registered users
⚠️ REQUIRED - Transaction must already exist in merchanttrans table

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/customertomerchantlink" \
  -H "Content-Type: application/json" \
  -d '{
    "pid": 0,
    "to_pid": 1042,
    "amount": 100.00,
    "uid": 12345,
    "description": "Payment for invoice"
  }'

PowerShell:

$headers = @{
    "Content-Type" = "application/json"
}
$body = @{
    pid = 0
    to_pid = 1042
    amount = 100.00
    uid = 12345
    description = "Payment for invoice"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/customertomerchantlink" `
  -Method POST `
  -Headers $headers `
  -Body $body

Response Example:

{
  "success": true,
  "data": {
    "paymentRequestId": "pr_abc123xyz",
    "tinkLinkURL": "https://link.tink.com/1.0/pay/direct/?client_id=..."
  },
  "message": "Customer-to-merchant payment link generated successfully"
}

Check Payment Status (GET)

Bash/Linux/Mac:

curl -X GET "http://localhost:3000/api/v1/customertomerchantlink?paymentRequestId=pr_abc123xyz"

PowerShell:

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/customertomerchantlink?paymentRequestId=pr_abc123xyz" `
  -Method GET

👥 Customer-to-Customer Payment (Tink)

POST /api/v1/customertocustomerlink 👥 P2P Payment 🌍 NO AUTH REQUIRED

Create Tink payment link for peer-to-peer customer transactions. Updates trans table refnum field.

🧪 Test API

Sender customer profile ID (must have bank account)
Receiver customer profile ID (must have bank account)
Payment amount (e.g., 50.00)
⚠️ REQUIRED - Transaction must already exist in trans table

📝 cURL Examples

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/customertocustomerlink" \
  -H "Content-Type: application/json" \
  -d '{
    "pid": 1001,
    "to_pid": 1002,
    "amount": 50.00,
    "uid": 12345,
    "description": "Payment to friend"
  }'

PowerShell:

$headers = @{
    "Content-Type" = "application/json"
}
$body = @{
    pid = 1001
    to_pid = 1002
    amount = 50.00
    uid = 12345
    description = "Payment to friend"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/customertocustomerlink" `
  -Method POST `
  -Headers $headers `
  -Body $body

Response Example:

{
  "success": true,
  "data": {
    "paymentRequestId": "pr_abc123xyz",
    "tinkLinkURL": "https://link.tink.com/1.0/pay/direct/?client_id=..."
  }
}

Check Payment Status (GET)

Bash/Linux/Mac:

curl -X GET "http://localhost:3000/api/v1/customertocustomerlink?payment_request_id=pr_abc123xyz"

PowerShell:

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/customertocustomerlink?payment_request_id=pr_abc123xyz" `
  -Method GET

📱 QR Scan Payment (Tink)

POST /api/v1/qrscanpayment 📱 QR Payment 🌍 NO AUTH REQUIRED

Create Tink payment when customer scans merchant QR code. Updates merchanttrans via external API.

🧪 Test API

Customer who scanned QR (must have bank account)
Merchant whose QR was scanned
Payment amount (e.g., 100.00)
⚠️ REQUIRED - Transaction must exist in merchanttrans table

📝 cURL Examples

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/qrscanpayment" \
  -H "Content-Type: application/json" \
  -d '{
    "pid": 1001,
    "to_pid": 1042,
    "amount": 100.00,
    "uid": 12345,
    "currency": "EUR",
    "description": "QR Payment"
  }'

PowerShell:

$headers = @{
    "Content-Type" = "application/json"
}
$body = @{
    pid = 1001
    to_pid = 1042
    amount = 100.00
    uid = 12345
    currency = "EUR"
    description = "QR Payment"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/qrscanpayment" `
  -Method POST `
  -Headers $headers `
  -Body $body

Response Example:

{
  "success": true,
  "paymentRequestId": "pr_abc123xyz",
  "tinkLinkURL": "https://link.tink.com/1.0/pay/direct/?client_id=...",
  "senderAccount": {...},
  "receiverAccount": {...},
  "transid": 12345
}

Check Payment Status (GET)

Bash/Linux/Mac:

curl -X GET "http://localhost:3000/api/v1/qrscanpayment?paymentRequestId=pr_abc123xyz"

PowerShell:

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/qrscanpayment?paymentRequestId=pr_abc123xyz" `
  -Method GET

🎯 Flexible Payment (Smart Auto-Detect)

POST /api/v1/flexible-payment 🎯 Smart Payment 🌍 NO AUTH REQUIRED

Universal payment API with auto-detection: merchant/customer accounts, market/country, UK/SEPA schemes. Auto-updates merchanttrans status.

🧪 Test API

Auto-detects: merchantbankaccount OR bankaccount
Payment amount (e.g., 100.00)
⚠️ REQUIRED - Transaction must exist in merchanttrans table

✨ Smart Features:

  • 🏦 Flexible Account Lookup: Tries merchantbankaccount → fallback to bankaccount
  • 👤 Smart Name Lookup: Tries merchant table → fallback to profile
  • 🌍 Auto Market Detection: Detects country (IE, GB, EU) from profile
  • 💳 Smart Payment Scheme: UK uses Sort Code, Others use IBAN
  • 🔄 Auto Status Updates: GET endpoint syncs status with Tink automatically
  • 🔐 Dynamic Credentials: Fetches Tink credentials from database

📝 cURL Examples

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/flexible-payment" \
  -H "Content-Type: application/json" \
  -d '{
    "pid": 1042,
    "amount": 100.00,
    "trans_id": 12345,
    "currency": "EUR",
    "description": "Flexible payment"
  }'

PowerShell:

$headers = @{
    "Content-Type" = "application/json"
}
$body = @{
    pid = 1042
    amount = 100.00
    trans_id = 12345
    currency = "EUR"
    description = "Flexible payment"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/flexible-payment" `
  -Method POST `
  -Headers $headers `
  -Body $body

Response Example:

{
  "success": true,
  "data": {
    "paymentRequestId": "pr_abc123xyz",
    "tinkLinkURL": "https://link.tink.com/1.0/pay/direct/?client_id=..."
  }
}

Check Payment Status (GET)

Bash/Linux/Mac:

curl -X GET "http://localhost:3000/api/v1/flexible-payment?paymentRequestId=pr_abc123xyz"

PowerShell:

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/flexible-payment?paymentRequestId=pr_abc123xyz" `
  -Method GET

Status Response Example:

{
  "success": true,
  "data": {
    "paymentRequestId": "pr_abc123xyz",
    "status": "EXECUTED",
    "statusMessage": "Payment successful",
    "tinkResponse": {...}
  }
}

🔔 Customer Insert Static QR Webhook

POST /api/v1/customerinsert-staticqr 🔔 Webhook Handler 🌍 NO AUTH REQUIRED

Tink payment webhook handler - Updates trans and customerpaymentdetails tables based on payment status.

📥 Test Webhook

📚 How It Works

  1. Tink sends webhook callback after payment completion
  2. Updates trans table with payment details or marks as FAILED
  3. Fetches uid from trans table using refnum
  4. Updates customerpaymentdetails table where transid=uid
  5. Returns transaction status and logs

Example Success Webhook (status=1):

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/customerinsert-staticqr?req_id=abc123xyz&status=1" \
  -H "Content-Type: application/json" \
  -d '{
    "paymentRequestCreatedTransfers": [{
      "source": {"accountNumber": "IE96DUYV32142435793575"},
      "destination": {"accountNumber": "IT39P02667051234567890123"},
      "currency": "EUR",
      "sourceMessage": "Payment description",
      "paymentScheme": "SEPA_CREDIT_TRANSFER",
      "amount": 10.50
    }]
  }'

PowerShell:

$body = @{
  paymentRequestCreatedTransfers = @(
    @{
      source = @{accountNumber = "IE96DUYV32142435793575"}
      destination = @{accountNumber = "IT39P02667051234567890123"}
      currency = "EUR"
      sourceMessage = "Payment description"
      paymentScheme = "SEPA_CREDIT_TRANSFER"
      amount = 10.50
    }
  )
} | ConvertTo-Json -Depth 3

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/customerinsert-staticqr?req_id=abc123xyz&status=1" `
  -Method Post `
  -Body $body `
  -ContentType "application/json"

Example Failed Webhook (status=0):

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/customerinsert-staticqr?req_id=abc123xyz&status=0" \
  -H "Content-Type: application/json" \
  -d '{}'

PowerShell:

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/customerinsert-staticqr?req_id=abc123xyz&status=0" `
  -Method Post `
  -ContentType "application/json" `
  -Body "{}"

Success Response:

{
  "message": "Transaction updated successfully",
  "refnum": "abc123xyz",
  "uid": 2151,
  "customerpayment_status": "SENT",
  "log": {
    "req_id": "abc123xyz",
    "status_flag": 1,
    "transfers_count": 1,
    "uid_from_trans": 2151,
    "customerpayment_status": "SENT"
  }
}

🔔 Merchant Insert Static Payment Webhook

POST /api/v1/insertstaticpayment-merchant 🔔 Webhook Handler 🌍 NO AUTH REQUIRED

Tink payment webhook handler for merchant transactions - Updates merchanttrans and customerpaymentdetails tables based on payment status.

📥 Test Merchant Webhook

📚 How It Works

  1. Tink sends webhook callback after merchant payment completion
  2. Updates merchanttrans table:
    • If transfer data provided: Updates 8 fields (senderAcc, receiverAcc, status, currency, description, paymenttype, amount, currentDate)
    • If no transfer data: Updates only status field
  3. Fetches uid from merchanttrans table using refnum
  4. Mirrors status to customerpaymentdetails table where transid=uid
  5. Reads back status from customerpaymentdetails to verify update
  6. Returns transaction status and confirmation

Example Success with Full Data (status=1):

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/insertstaticpayment-merchant?req_id=abc123xyz&status=1" \
  -H "Content-Type: application/json" \
  -d '{
    "paymentRequestCreatedTransfers": [{
      "source": {"accountNumber": "IE96DUYV32142435793575"},
      "destination": {"accountNumber": "IT39P02667051234567890123"},
      "currency": "EUR",
      "sourceMessage": "Merchant payment",
      "paymentScheme": "SEPA_CREDIT_TRANSFER",
      "amount": 100.50
    }]
  }'

PowerShell:

$body = @{
  paymentRequestCreatedTransfers = @(
    @{
      source = @{accountNumber = "IE96DUYV32142435793575"}
      destination = @{accountNumber = "IT39P02667051234567890123"}
      currency = "EUR"
      sourceMessage = "Merchant payment"
      paymentScheme = "SEPA_CREDIT_TRANSFER"
      amount = 100.50
    }
  )
} | ConvertTo-Json -Depth 3

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/insertstaticpayment-merchant?req_id=abc123xyz&status=1" `
  -Method Post `
  -Body $body `
  -ContentType "application/json"

Example Success without Transfer Data (status=1):

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/insertstaticpayment-merchant?req_id=abc123xyz&status=1" \
  -H "Content-Type: application/json" \
  -d '{}'

Example Failed Webhook (status=0):

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/insertstaticpayment-merchant?req_id=abc123xyz&status=0" \
  -H "Content-Type: application/json" \
  -d '{}'

Success Response:

{
  "message": "Transaction updated successfully",
  "refnum": "abc123xyz",
  "uid": 2151,
  "customer_payment_status": "SENT"
}

🌍 Public APIs - No Authentication Required

These endpoints are public and don't require any token or authentication. Perfect for testing and integration!

📊 Transaction Statistics

GET /api/v1/transaction-count 📊 Statistics 🌍 NO AUTH REQUIRED

Get total transaction counts for a profile or merchant including all statuses.

Counts from trans (pid/to_pid) + merchanttrans (pid/to_pid)

🔍 Filters (Optional)

📋 cURL Commands

Profile ID:

curl -X GET "http://localhost:3000/api/v1/transaction-count?pid=1967"

Merchant ID:

curl -X GET "http://localhost:3000/api/v1/transaction-count?mid=456"

✅ Success Response (200)

{
  "success": true,
  "data": {
    "pid": 1967,  // or "mid": 456
    "totalTransactions": 60,
    "initiated": 32,
    "onprocess": 0,
    "sent": 21,
    "failed": 3,
    "expired": 2,
    "cancelled": 0,
    "declined": 0,
    "settledPayer": 2,
    "settledPayee": 0,
    "settled": 0,
    "others": 0
  },
  "timestamp": "2025-12-18T..."
}

ℹ️ How It Works

Profile ID (pid):

  • Trans table: WHERE pid={pid} OR to_pid={pid}
  • MerchantTrans: WHERE pid={pid} OR to_pid={pid}
  • Returns combined count from both tables

Merchant ID (mid):

  • MerchantTrans only: WHERE mid={mid}
  • Returns merchant-specific transaction counts
GET /api/v1/web-transactions 📜 Transactions List 🌍 NO AUTH REQUIRED

Get paginated customer transaction listings with full details (sender/receiver names, bank info, etc.).

💡 How it works:

When you enter a Profile ID (pid), the API automatically queries BOTH trans and merchanttrans tables and combines results with UNION. This gives you complete customer transaction history.

🔍 Filters & Search

Sender or receiver
Receiver only
Filter by receiver
Search by name

📄 Pagination & Sorting

📋 cURL Command Example

curl -X GET "http://localhost:3000/api/v1/web-transactions?pid_eq=123&limit=10&offset=0&sortfield=currentDate&sorttype=desc"

✅ Success Response (200)

{
  "table": "trans",
  "total_count": "1523",
  "filtered_count": "45",
  "limit": 10,
  "offset": 0,
  "filters": { "pid_eq": "123", "status_eq": "SETTLED" },
  "data": [
    {
      "uid": "txn_001",
      "pid": "123",
      "to_pid": "456",
      "amount": "150.00",
      "status": "SETTLED",
      "sender_name": "John Smith",
      "receiver_name": "Mary Johnson",
      "bank_name": "AIB",
      "bank_logo": "https://...",
      "receiver_bank_name": "Bank of Ireland",
      "receiver_bank_logo": "https://...",
      ...
    }
  ]
}

ℹ️ Features

  • ✅ Pagination support (limit, offset)
  • ✅ Dynamic filtering with suffixes (_eq, _gte, _lte, _datebetween, etc.)
  • ✅ UNION queries when pid_eq/to_pid_eq provided
  • ✅ Enriched data: sender/receiver names, bank details, logos
  • ✅ Sorting by any field
  • ✅ Name search across profiles
  • ✅ Receiver filtering (individual/merchant)

👥 Profile Management

GET /api/v1/public/profiles 👥 Profiles 🌍 NO AUTH REQUIRED

Get all profiles (with optional pagination) or get specific profile by ID.

Returns paginated profiles with basic info (name, email, mobile, country, etc.)

📋 cURL Commands

Get Paginated Profiles (Bash):

curl "http://localhost:3000/api/v1/public/profiles?page=1&limit=20"

Get All Profiles (No Pagination):

curl "http://localhost:3000/api/v1/public/profiles"

Get Specific Profile (Bash):

curl "http://localhost:3000/api/v1/public/profiles?id=123"

PowerShell (Paginated):

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/public/profiles?page=1&limit=20" -Method GET

PowerShell (All Profiles):

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/profiles" -Method GET

PowerShell (Specific Profile):

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/public/profiles?id=123" -Method GET

📄 Response Example (All Profiles):

{
  "success": true,
  "data": [
    {
      "uid": 1,
      "name": "John Doe",
      "email": "john@example.com",
      "mobile": "+353123456789",
      "country": "IE",
      "city": "Dublin",
      "state": "Leinster",
      "status": "active",
      "profile_type": 1,
      "profileimage": "https://...",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-12-20T14:45:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 150,
    "totalPages": 8,
    "hasNext": true,
    "hasPrev": false
  },
  "timestamp": "2025-12-23T..."
}

ℹ️ Usage

  • Paginated List: Returns profiles with page/limit parameters and pagination metadata
  • All Profiles: Returns complete list without pagination (omit page/limit params)
  • Single Profile: Returns complete profile with bank accounts and merchants (by ID)
  • Optional Pagination: Include page/limit params only if you need pagination
  • No Auth: Public endpoint for testing and integration

💰 Payment Status Updates

POST /api/v1/linkstatus-update 🔄 Status Update 🌍 NO AUTH REQUIRED

Update payment link status - automatically routes to correct table based on payment type.

Status will be updated in trans table (if mid=0) or merchanttrans table (if mid>0)

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/linkstatus-update" \
  -H "Content-Type: application/json" \
  -d '{
    "transId": 12345,
    "status": "SETTLED"
  }'

PowerShell:

$body = @{
    transId = 12345
    status = "SETTLED"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/linkstatus-update" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body

Response Example:

{
  "success": true,
  "data": {
    "transId": 12345,
    "status": "SETTLED",
    "paymentType": "merchant",
    "tableUpdated": "merchanttrans",
    "mid": 1042
  },
  "message": "Merchant payment status updated successfully",
  "timestamp": "2025-11-24T10:30:00.000Z"
}
💡 How It Works:
  • API checks customerpaymentdetails table for the transaction
  • If mid = 0: Updates trans table (customer payment)
  • If mid > 0: Updates merchanttrans table (merchant payment)
  • Returns payment type and which table was updated
  • No JWT token required - public endpoint
POST /api/v1/customer-payment-status 👤 Customer Payment 🌍 NO AUTH REQUIRED

Update payment status for customer payments (mid = 0). Updates both customerpaymentdetails and trans tables.

Transaction ID from customerpaymentdetails table
Updates status in both customerpaymentdetails and trans tables

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/customer-payment-status" \
  -H "Content-Type: application/json" \
  -d '{
    "trans_id": "12345",
    "status": "SETTLED"
  }'

PowerShell:

$body = @{
    trans_id = "12345"
    status = "SETTLED"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/customer-payment-status" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body

Response Example:

{
  "success": true,
  "message": "Customer payment status updated successfully",
  "data": {
    "trans_id": "12345",
    "status": "SETTLED",
    "mid": 0,
    "updatedTables": ["customerpaymentdetails", "trans"]
  },
  "timestamp": "2025-11-25T10:30:00.000Z"
}
POST /api/v1/merchant-payment-status 🏪 Merchant Payment 🌍 NO AUTH REQUIRED

Update payment status for merchant payments (mid > 0). Updates both customerpaymentdetails and merchanttrans tables.

Transaction ID from customerpaymentdetails table
Updates status in both customerpaymentdetails and merchanttrans tables

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/merchant-payment-status" \
  -H "Content-Type: application/json" \
  -d '{
    "trans_id": "67890",
    "status": "SETTLED"
  }'

PowerShell:

$body = @{
    trans_id = "67890"
    status = "SETTLED"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/merchant-payment-status" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body

Response Example:

{
  "success": true,
  "message": "Merchant payment status updated successfully",
  "data": {
    "trans_id": "67890",
    "status": "SETTLED",
    "mid": 1042,
    "updatedTables": ["customerpaymentdetails", "merchanttrans"]
  },
  "timestamp": "2025-11-25T10:30:00.000Z"
}

👥 Peer-to-Peer (P2P) Payments

POST /api/v1/payee-payment 👥 P2P Payment 🌍 NO AUTH REQUIRED

Peer-to-peer payment using Tink - Send money from one customer to another customer's bank account.

Profile ID of the person receiving the money
Auto-detected from recipient's country if not provided

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/payee-payment" \
  -H "Content-Type: application/json" \
  -d '{
    "pid": 456,
    "amount": 100.50,
    "description": "Splitting dinner bill"
  }'

PowerShell:

$body = @{
    pid = 456
    amount = 100.50
    description = "Splitting dinner bill"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/payee-payment" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body

Response Example:

{
  "success": true,
  "paymentUrl": "https://link.tink.com/1.0/pay/direct/...",
  "paymentRequestId": "pm_abc123xyz",
  "message": "P2P payment initiated successfully",
  "data": {
    "recipientName": "John Doe",
    "amount": 100.50,
    "currency": "EUR",
    "market": "IE"
  }
}
💡 How P2P Payments Work:
  • Recipient must have a primary bank account (IBAN) set up
  • Returns Tink payment link for sender to complete payment
  • Money transfers directly from sender's bank → recipient's bank
  • Uses SEPA network for European transfers
  • Currency and market auto-detected from recipient's country
  • Redirects to: myapp://showpaymentsuc after completion
  • No authentication required - public endpoint

💳 Payment Requests

POST /api/v1/create-requests 💳 Customer → Merchant 🌍 NO AUTH REQUIRED

Create payment request from customer to merchant for invoice/order payment.

Sender's customer profile ID
Receiver's merchant ID
Merchant's business/company ID
User initiating the request
Invoice or order number

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/create-requests" \
  -H "Content-Type: application/json" \
  -d '{
    "pid": 123,
    "to_pid": 456,
    "amount": 50.00,
    "merchantid": 789,
    "userid": 101,
    "invoiceid": "INV-2025-001",
    "notes": "Payment for order"
  }'

PowerShell:

$body = @{
    pid = 123
    to_pid = 456
    amount = 50.00
    merchantid = 789
    userid = 101
    invoiceid = "INV-2025-001"
    notes = "Payment for order"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/create-requests" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body

Response Example:

{
  "success": true,
  "refNumber": "a1b2c3d4e5f6...",
  "data": {
    "pid": 123,
    "to_pid": 456,
    "amount": 50.00,
    "currency": "EUR",
    "status": "Onprocess",
    "merchantid": 789,
    "invoiceid": "INV-2025-001",
    "senderAccount": "IE12BANK12345678",
    "receiverAccount": "IE99MERC98765432",
    "createdAt": "2025-11-26 10:30:45"
  },
  "message": "Payment request created successfully"
}
💡 How It Works:
  • Customer to Merchant - Customer initiates payment to merchant
  • Fetches customer's IBAN from bankaccount table
  • Fetches merchant's IBAN from merchantbankaccount table
  • Creates transaction in merchanttrans table
  • Status starts as "Onprocess" (pending)
  • Generates unique reference number (UUID)
  • No authentication required - public endpoint
POST /api/v1/payment-requests 🏦 Tink Payment 🌍 NO AUTH REQUIRED

Create Tink payment request - Generates payment URL for customer to complete bank-to-bank payment.

Transaction reference from merchanttrans table with status "Onprocess"

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/payment-requests" \
  -H "Content-Type: application/json" \
  -d '{
    "refnum": "abc123xyz789"
  }'

PowerShell:

$body = @{
    refnum = "abc123xyz789"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/payment-requests" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body

Response Example:

{
  "success": true,
  "paymentRequestId": "pm_tink123abc",
  "tinkPaymentURL": "https://link.tink.com/1.0/pay/direct/?client_id=...",
  "refnum": "abc123xyz789",
  "message": "Tink payment request created successfully",
  "timestamp": "2025-11-26T10:30:00.000Z"
}
💡 How It Works:
  • Step 1: Fetches payment details from merchanttrans table using refnum
  • Step 2: Retrieves customer and merchant bank accounts (IBANs)
  • Step 3: Authenticates with Tink API using stored credentials
  • Step 4: Creates Tink payment request via Tink API
  • Step 5: Returns payment URL for customer to complete payment
  • Step 6: Customer opens URL → authenticates with bank → authorizes payment
  • Step 7: Tink redirects back to mobile app with payment status
  • Uses SEPA Credit Transfer for bank-to-bank payments
  • No authentication required - public endpoint
⚠️ Prerequisites:
  • Transaction must exist in merchanttrans with status "Onprocess"
  • Customer must have primary bank account with IBAN in bankaccount
  • Merchant must have primary bank account with IBAN in merchantbankaccount
  • Tink credentials must be configured in bank table (banktype=1)

🏦 QR Transaction Status Management

POST /api/v1/qr-trans 🌍 NO AUTH REQUIRED

Update transaction status with transfer details or mark as failed

🔔 Payment Notifications Management

GET /api/v1/payment-notifications 🌍 NO AUTH REQUIRED

List all payment notifications with pagination and filters

POST /api/v1/payment-notifications 🌍 NO AUTH REQUIRED

Create new payment notification

GET /api/v1/payment-notifications/:id 🌍 NO AUTH REQUIRED

Get single notification by ID

PUT /api/v1/payment-notifications/:id 🌍 NO AUTH REQUIRED

Update notification by ID

DELETE /api/v1/payment-notifications/:id 🌍 NO AUTH REQUIRED

Delete notification by ID

📱 App Versions Management

GET /api/v1/app_versions 🌍 NO AUTH REQUIRED

List all app versions with optional filters and pagination

🔍 Filters

Partial match search
Exact version match

📄 Pagination (Optional)

Max: 100, Default: 20
GET /api/v1/app_versions/:id 🌍 NO AUTH REQUIRED

Get a single app version by ID

POST /api/v1/app_versions 🌍 NO AUTH REQUIRED

Create a new app version entry

PUT /api/v1/app_versions/:id 🌍 NO AUTH REQUIRED

Update an existing app version

DELETE /api/v1/app_versions/:id 🌍 NO AUTH REQUIRED

Delete an app version by ID

🔐 Authentication

POST /api/v1/merchant-user-login 👤 Staff Login 🌍 NO AUTH REQUIRED

Authenticate merchant staff/employees for dashboard or POS access.

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "http://localhost:3000/api/v1/merchant-user-login" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "staff123",
    "password": "password123",
    "merchantId": 9173
  }'

PowerShell:

$body = @{
    username = "staff123"
    password = "password123"
    merchantId = 9173
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:3000/api/v1/merchant-user-login" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body

Success Response:

{
  "success": true,
  "message": "Login successful",
  "data": {
    "usertype": "Admin",
    "merchantid": 9173,
    "uid": 456
  },
  "timestamp": "2025-11-25T10:30:00.000Z"
}

Error Responses:

// Username Not Found
{
  "success": false,
  "message": "Username Not Found",
  "timestamp": "2025-11-25T10:30:00.000Z"
}

// Password Incorrect
{
  "success": false,
  "message": "Password Incorrect",
  "timestamp": "2025-11-25T10:30:00.000Z"
}
💡 User Types:
  • Admin - Full access to merchant dashboard and settings
  • User - Limited access for POS operations only
  • Uses merchantusers table for authentication
  • Different from main merchant account (users/profile table)
  • Returns user type, merchant ID, and user ID for session management
  • No JWT required - this endpoint creates the session
GET /api/v1/public/bank-accounts 🌍 NO AUTH REQUIRED

Get bank accounts without JWT authentication - public access!

📋 cURL Commands

Bash/Linux/Mac:

# Get all accounts
curl -X GET "https://api3.facepos.ie/api/v1/public/bank-accounts?limit=10" \
  -H "Content-Type: application/json"

# Get accounts for specific profile
curl -X GET "https://api3.facepos.ie/api/v1/public/bank-accounts?pid=9947&limit=10" \
  -H "Content-Type: application/json"

PowerShell:

# Get all accounts
Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/public/bank-accounts?limit=10" `
  -Method GET `
  -ContentType "application/json"

# Get accounts for specific profile
Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/public/bank-accounts?pid=9947&limit=10" `
  -Method GET `
  -ContentType "application/json"

Response Example:

{
  "success": true,
  "data": [
    {
      "uid": 10234,
      "pid": 9947,
      "bankname": "AIB",
      "accounttype": "Current",
      "accountno": "12345678",
      "currency": "EUR",
      "bban": "AIBK93115212345678",
      "iban": "IE29AIBK93115212345678",
      "primary": true,
      "accholdername": "John Doe",
      "sortcode": "931152"
    }
  ],
  "count": 1,
  "message": "Bank accounts retrieved successfully",
  "timestamp": "2025-11-04T08:00:00.000Z"
}
POST /api/v1/public/bank-accounts 🌍 NO AUTH REQUIRED

Create a new bank account without JWT authentication - perfect for public forms!

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "https://api3.facepos.ie/api/v1/public/bank-accounts" \
  -H "Content-Type: application/json" \
  -d '{
    "pid": 9947,
    "bankname": "AIB",
    "accounttype": "Current",
    "accountno": "12345678",
    "currency": "EUR",
    "bban": "AIBK93115212345678",
    "iban": "IE29AIBK93115212345678",
    "primary": true,
    "accholdername": "John Doe",
    "sortcode": "931152"
  }'

PowerShell:

$body = @{
    pid = 9947
    bankname = "AIB"
    accounttype = "Current"
    accountno = "12345678"
    currency = "EUR"
    bban = "AIBK93115212345678"
    iban = "IE29AIBK93115212345678"
    primary = $true
    accholdername = "John Doe"
    sortcode = "931152"
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/public/bank-accounts" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body

Response Example:

{
  "success": true,
  "data": {
    "uid": 10234,
    "pid": 9947,
    "bankname": "AIB",
    "accounttype": "Current",
    "accountno": "12345678",
    "currency": "EUR",
    "bban": "AIBK93115212345678",
    "iban": "IE29AIBK93115212345678",
    "primary": true,
    "accholdername": "John Doe",
    "sortcode": "931152"
  },
  "message": "Bank account created successfully",
  "timestamp": "2025-11-04T08:00:00.000Z"
}
GET /api/v1/countries

Get list of all countries with phone codes and pagination support.

📋 cURL Commands

Bash/Linux/Mac:

curl -X GET "https://api3.facepos.ie/api/v1/countries?page=1&limit=10" \
  -H "Content-Type: application/json"

PowerShell:

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/countries?page=1&limit=10" `
  -Method GET `
  -ContentType "application/json"

Response Example:

{
  "success": true,
  "data": {
    "countries": [
      {
        "id": 8,
        "orderno": 1,
        "country_name": "Ireland",
        "iso_code": "IE",
        "phone_code": "+353",
        "flag_url": "https://flagcdn.com/w80/ie.png",
        "currency_code": "EUR",
        "status": 1
      },
      {
        "id": 18,
        "orderno": 2,
        "country_name": "United Kingdom",
        "iso_code": "GB",
        "phone_code": "+44",
        "flag_url": "https://flagcdn.com/w80/gb.png",
        "currency_code": "GBP",
        "status": 1
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 10,
      "total": 19,
      "totalPages": 2,
      "hasNext": true,
      "hasPrev": false
    }
  },
  "message": "Tink countries retrieved successfully",
  "timestamp": "2025-11-03T06:20:48.698Z"
}
GET /api/v1/countrywithcode 🌍 NO AUTH REQUIRED

Get all countries with phone codes from "countries" table - No authentication required!

GET /api/v1/countrywithcode/:id 🌍 NO AUTH REQUIRED

Get single country by ID with phone code - No authentication required!

📋 cURL Examples

Get All Countries (Bash/Linux/Mac):

curl -X GET "https://api3.facepos.ie/api/v1/countrywithcode?page=1&limit=50" \
  -H "Content-Type: application/json"

Get All Countries (PowerShell):

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/countrywithcode?page=1&limit=50" `
  -Method GET `
  -ContentType "application/json"

Get Country By ID (Bash/Linux/Mac):

curl -X GET "https://api3.facepos.ie/api/v1/countrywithcode/1" \
  -H "Content-Type: application/json"

Response Example:

{
  "success": true,
  "data": {
    "countries": [
      {
        "id": 1,
        "name": "Ireland",
        "phoneCode": "353",
        "sortName": "IE",
        "insertedBy": "admin",
        "insertedUserId": "1"
      },
      {
        "id": 2,
        "name": "United States",
        "phoneCode": "1",
        "sortName": "US",
        "insertedBy": "admin",
        "insertedUserId": "1"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 50,
      "total": 195,
      "totalPages": 4,
      "hasNext": true,
      "hasPrev": false
    }
  },
  "message": "Countries with phone codes retrieved successfully",
  "timestamp": "2025-11-20T10:30:00.000Z"
}
💡 Why Use This API?
  • Reads from countries table (not tink_countries)
  • Returns phone codes for international dialing
  • Perfect for registration forms and phone inputs
  • No authentication = Easy integration
GET /api/v1/getacc 🌍 NO AUTH REQUIRED

Advanced bank account management with filtering, sorting & pagination - No authentication required!

Maximum records to return (default: 100)
Number of records to skip for pagination

🔍 Advanced Filters

Filter by exact bank name match
Filter by partial bank name match
Filter by exact account type
Filter by specific profile ID
Filter by currency code

🚀 Quick Test Scenarios

Click buttons above to load different test scenarios with various filters and sorting

📋 cURL Commands

Basic pagination (No API key needed):

curl -X GET "https://api3.facepos.ie/api/v1/getacc?limit=10&offset=0"

Advanced filtering:

curl -X GET "https://api3.facepos.ie/api/v1/getacc?bankname_contains=chase&primary_eq=1&limit=5&sortfield=bankname&sorttype=asc"

PowerShell Example:

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/getacc?limit=10&bankname_contains=bank"

Response Example:

{
  "table": "bankaccount",
  "total_count": 156,
  "filtered_count": 12,
  "limit": 10,
  "offset": 0,
  "filters": {
    "limit": "10",
    "bankname_contains": "chase",
    "primary_eq": "1"
  },
  "data": [
    {
      "uid": 1234,
      "pid": 9947,
      "bankname": "Chase Bank",
      "accounttype": "checking",
      "accountno": "****1234",
      "currency": "USD",
      "primary": true,
      "accholdername": "John Doe",
      "customername": "John Doe",
      "logo": "https://logo.clearbit.com/chase.com"
    }
  ]
}
💡 Why Use This API?
  • Complete bank account management with no authentication
  • Advanced filtering: exact match, contains, between, not equal
  • Flexible sorting and pagination for large datasets
  • Data enrichment: customer names and bank logos
  • Perfect for admin dashboards and analytics
GET /api/v1/tink-bank-list

Get list of all Tink banks with logo and details.

📋 cURL Commands

Bash/Linux/Mac:

curl -X GET "https://api3.facepos.ie/api/v1/tink-bank-list?page=1&limit=20" \
  -H "Content-Type: application/json"

PowerShell:

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/tink-bank-list?page=1&limit=20" `
  -Method GET `
  -ContentType "application/json"

Response Example:

{
  "success": true,
  "data": [
    {
      "uid": 1,
      "alias": "aib-ie",
      "bic": "AIBKIE2D",
      "capabilities": "TRANSFERS,ACCOUNTS",
      "customername": "AIB",
      "financialInstitution": "ie-aib-aibkie2d",
      "logo": "https://cdn.tink.se/provider-images/aib.png",
      "market": "IE",
      "name": "AIB - Allied Irish Bank",
      "pid": null
    },
    {
      "uid": 2,
      "alias": "boi-ie",
      "bic": "BOFIIE2D",
      "capabilities": "TRANSFERS,ACCOUNTS",
      "customername": "BOI",
      "financialInstitution": "ie-boi-bofiie2d",
      "logo": "https://cdn.tink.se/provider-images/bankofireland.png",
      "market": "IE",
      "name": "Bank of Ireland",
      "pid": null
    }
  ],
  "count": 2,
  "message": "Tink bank list retrieved successfully",
  "timestamp": "2025-11-04T08:30:00.000Z"
}

📊 Transaction Status Count (Public)

GET /api/v1/statuscount?public=true 🌍 NO AUTH REQUIRED

Get transaction status counts from both trans and merchanttrans tables - no authentication!

📋 cURL Command

Bash/Linux/Mac:

curl -X GET "https://api3.facepos.ie/api/v1/statuscount?public=true" \
  -H "Content-Type: application/json"

PowerShell:

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/statuscount?public=true" `
  -Method GET `
  -ContentType "application/json"
GET /api/v1/statuscount?public=true&action=trans 🌍 NO AUTH REQUIRED

Get transaction status counts from trans table only - no authentication!

📋 cURL Command

Bash/Linux/Mac:

curl -X GET "https://api3.facepos.ie/api/v1/statuscount?public=true&action=trans" \
  -H "Content-Type: application/json"

PowerShell:

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/statuscount?public=true&action=trans" `
  -Method GET `
  -ContentType "application/json"
GET /api/v1/statuscount?public=true&action=merchanttrans 🌍 NO AUTH REQUIRED

Get transaction status counts from merchanttrans table only - no authentication!

📋 cURL Command

Bash/Linux/Mac:

curl -X GET "https://api3.facepos.ie/api/v1/statuscount?public=true&action=merchanttrans" \
  -H "Content-Type: application/json"

PowerShell:

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/statuscount?public=true&action=merchanttrans" `
  -Method GET `
  -ContentType "application/json"

ℹ️ Status Count Features (Public)

  • No Authentication: These endpoints don't require JWT tokens
  • Four Status Types: INITIATED, ONPROCESS, SENT, AWAITING_CREDENTIALS
  • Case-Insensitive: Matches "Onprocess", "ONPROCESS", etc.
  • Returns: uid, refnum, status for each transaction
  • Counts By Status: Automatic aggregation by status type
  • Limit: Returns up to 1000 most recent transactions
GET /api/v1/public/merchant-bank-accounts 🌍 NO AUTH REQUIRED

Get merchant bank accounts without JWT token. Filter by profile ID (pid) and/or merchant ID (mid).

POST /api/v1/public/merchant-bank-accounts 🌍 NO AUTH REQUIRED

Create a new merchant bank account without JWT authentication!

📋 cURL Commands

Bash/Linux/Mac:

curl -X POST "https://api3.facepos.ie/api/v1/public/merchant-bank-accounts" \
  -H "Content-Type: application/json" \
  -d '{
    "pid": 9947,
    "mid": 123,
    "bankname": "AIB",
    "accounttype": "Business Current",
    "accountno": "12345678",
    "currency": "EUR",
    "bban": "AIBK93115212345678",
    "iban": "IE29AIBK93115212345678",
    "is_primary": true,
    "accholdername": "My Business Ltd",
    "sortcode": "931152"
  }'

PowerShell:

$body = @{
    pid = 9947
    mid = 123
    bankname = "AIB"
    accounttype = "Business Current"
    accountno = "12345678"
    currency = "EUR"
    bban = "AIBK93115212345678"
    iban = "IE29AIBK93115212345678"
    is_primary = $true
    accholdername = "My Business Ltd"
    sortcode = "931152"
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/public/merchant-bank-accounts" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body

Response Example:

{
  "success": true,
  "data": {
    "uid": 789,
    "pid": 9947,
    "mid": 123,
    "bankname": "AIB",
    "accounttype": "Business Current",
    "accountno": "12345678",
    "currency": "EUR",
    "bban": "AIBK93115212345678",
    "iban": "IE29AIBK93115212345678",
    "is_primary": true,
    "accholdername": "My Business Ltd",
    "sortcode": "931152"
  },
  "message": "Merchant bank account created successfully",
  "timestamp": "2025-11-04T12:30:00.000Z"
}
GET /api/v1/public/merchant Get merchants (Public - No Auth)
POST /api/v1/public/merchant Create merchant (Public - No Auth)
PUT /api/v1/public/merchant/:id Update merchant (Public - No Auth)
DELETE /api/v1/public/merchant/:id Delete merchant (Public - No Auth)
GET /api/v1/public/profile
Search by profile ID (takes priority if both are provided)
Search by mobile number (used if profile ID is empty)
PUT /api/v1/public/profile/:id
GET /api/v1/public/merchanttrans
GET /api/v1/public/merchanttrans-raw
GET /api/v1/recent-transactions 🔑 API KEY REQUIRED

Get combined transaction history from both C2C (trans) and C2M (merchanttrans) tables with full profile information

🔑 API Key: Auto-configured (hardcoded like Lambda)

User profile ID to fetch transactions for
Maximum 1000 transactions (leave empty for no limit)
Skip number of records for pagination
Transaction ordering
GET /api/v1/demoqrgen 🔒 NO AUTH

Generate encrypted QR code URL for merchant payment requests. Creates transaction and returns secure payment link.

Customer's phone number (with country code)
The merchant ID receiving payment
Unique invoice/reference number
Payment amount in EUR
Unique user identifier
Transaction description/notes
Market/region code (e.g., IE, UK, US)
GET /api/v1/recentmerchant-transactions 🔑 API KEY REQUIRED

Get recent transactions for a specific merchant from merchanttrans table

🔑 API Key: Auto-configured (hardcoded like Lambda)

Merchant ID to fetch transactions for
Maximum 1000 transactions (leave empty for no limit)
Skip number of records for pagination
POST /api/v1/get-reasons 🔑 API KEY REQUIRED

Get rejection reasons for all merchants associated with a profile ID (pid)

The profile ID to get rejection reasons for
Number of records to retrieve (default: 100)
Number of records to skip (default: 0)
Field to sort by (e.g., id, rejectreason, rejectdate)

🔍 Advanced Filters (Optional)

Get specific rejection reason by ID
Filter reasons containing specific text
Filter by specific merchant ID

📋 cURL Examples

Basic Request:

curl -X POST "https://api3.facepos.ie/api/v1/get-reasons" \
  -H "Content-Type: application/json" \
  -H "x-api-key: v6Dxkb09qk6XCfdHGwlJbUJ8Frn30dPyl4M6" \
  -d '{"pid": 9947}'

With Pagination & Sorting:

curl -X POST "https://api3.facepos.ie/api/v1/get-reasons?limit=10&offset=20&sortfield=rejectdate&sorttype=desc" \
  -H "Content-Type: application/json" \
  -H "x-api-key: v6Dxkb09qk6XCfdHGwlJbUJ8Frn30dPyl4M6" \
  -d '{"pid": 9947}'

With Advanced Filters:

curl -X POST "https://api3.facepos.ie/api/v1/get-reasons?id_eq=1079&rejectreason_contains=documents" \
  -H "Content-Type: application/json" \
  -H "x-api-key: v6Dxkb09qk6XCfdHGwlJbUJ8Frn30dPyl4M6" \
  -d '{"pid": 9947}'

PowerShell Example:

$body = @{
    pid = 9947
} | ConvertTo-Json

$headers = @{
    "Content-Type" = "application/json"
    "x-api-key" = "v6Dxkb09qk6XCfdHGwlJbUJ8Frn30dPyl4M6"
}

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/get-reasons?limit=50&sortfield=rejectdate&sorttype=desc" `
  -Method POST `
  -Headers $headers `
  -Body $body
GET /api/v1/contact-profile 🔑 API KEY REQUIRED

Generic profile data retrieval with advanced filtering, pagination, and sorting

Number of records to retrieve (default: 100)
Number of records to skip (default: 0)
Field to sort by (e.g., name, mobile, status, uid)

🔍 Advanced Filters (Optional)

Special filter: searches both name AND mobile fields
Filter by exact status match
Filter names containing specific text
Filter by exact mobile number

📋 cURL Examples

Basic Request:

curl -X GET "https://api3.facepos.ie/api/v1/contact-profile" \
  -H "x-api-key: v6Dxkb09qk6XCfdHGwlJbUJ8Frn30dPyl4M6"

With Pagination & Sorting:

curl -X GET "https://api3.facepos.ie/api/v1/contact-profile?limit=20&offset=40&sortfield=name&sorttype=desc" \
  -H "x-api-key: v6Dxkb09qk6XCfdHGwlJbUJ8Frn30dPyl4M6"

With Filters:

curl -X GET "https://api3.facepos.ie/api/v1/contact-profile?status_eq=active&item_contains=john&limit=50" \
  -H "x-api-key: v6Dxkb09qk6XCfdHGwlJbUJ8Frn30dPyl4M6"

PowerShell Example:

$headers = @{
    "x-api-key" = "v6Dxkb09qk6XCfdHGwlJbUJ8Frn30dPyl4M6"
}

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/contact-profile?limit=25&sortfield=name&sorttype=asc" `
  -Method GET `
  -Headers $headers
POST /api/v1/contacts 📱 CONTACT SYNC

Phone number lookup to identify FacePOS customers vs non-customers from contact list

Your profile ID to exclude your own number from results
JSON format with contacts array containing id, name, image, and phoneNumbers

🚀 Quick Test Data

Click buttons above to load sample data for testing different scenarios

📋 cURL Examples

Basic Request:

curl -X POST "https://api3.facepos.ie/api/v1/contacts" \
  -H "Content-Type: application/json" \
  -d '{
    "contacts": [
      {
        "id": "contact_123",
        "name": "John Smith", 
        "image": "image_url",
        "phoneNumbers": ["+911234567890"]
      }
    ]
  }'

With PID (exclude own number):

curl -X POST "https://api3.facepos.ie/api/v1/contacts" \
  -H "Content-Type: application/json" \
  -d '{
    "contacts": [
      {
        "id": "contact_456",
        "name": "Jane Doe",
        "phoneNumbers": ["+447123456789", "+353871234567"]
      }
    ],
    "pid": 9947
  }'

PowerShell Example:

$body = @{
    contacts = @(
        @{
            id = "contact_789"
            name = "Mike Wilson"
            phoneNumbers = @("+919876543210", "07987654321")
        }
    )
    pid = 9947
} | ConvertTo-Json -Depth 3

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/contacts" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body
POST /api/v1/Contact 📞 SIMPLE LOOKUP

Simple phone number lookup to find profiles, excluding specific profile ID

Profile ID to exclude from results (required)
JSON format with contacts array and phone numbers in specific format

🚀 Quick Test Data

Click buttons above to load sample data with specific phone number format

📋 cURL Examples

Basic Request:

curl -X POST "https://api3.facepos.ie/api/v1/Contact" \
  -H "Content-Type: application/json" \
  -d '{
    "contacts": [
      {
        "phoneNumbers": [
          {"number": "+911234567890"}
        ]
      }
    ],
    "pid": 9947
  }'

Multiple Phone Numbers:

curl -X POST "https://api3.facepos.ie/api/v1/Contact" \
  -H "Content-Type: application/json" \
  -d '{
    "contacts": [
      {
        "phoneNumbers": [
          {"number": "+447123456789"},
          {"number": "+353871234567"}
        ]
      }
    ],
    "pid": 1234
  }'

PowerShell Example:

$body = @{
    contacts = @(
        @{
            phoneNumbers = @(
                @{ number = "+919876543210" },
                @{ number = "+447987654321" }
            )
        }
    )
    pid = 9947
} | ConvertTo-Json -Depth 3

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/Contact" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body
POST /api/v1/tink/sync-status 🔄 TINK SYNC

Sync payment status from Tink API and auto-update trans/merchanttrans tables

GET /api/v1/tink/sync-status?refid=xxx 🔍 CHECK STATUS

Check sync status for a specific reference ID

POST /api/v1/tink/bulk-sync 📦 BULK SYNC

Process multiple unsynced transactions from transhistory table

POST /api/v1/public/invoice/create 🌍 NO AUTH REQUIRED

Create invoice publicly without JWT token - for dashboard usage!

📋 cURL Commands

Single Customer Invoice:

curl -X POST "https://api3.facepos.ie/api/v1/public/invoice/create" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "customer",
    "pid": 9947,
    "year": 2025,
    "month": 11
  }'

All Customers (Bulk):

curl -X POST "https://api3.facepos.ie/api/v1/public/invoice/create" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "customer",
    "year": 2025
  }'

Single Merchant Invoice:

curl -X POST "https://api3.facepos.ie/api/v1/public/invoice/create" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "merchant",
    "mid": 123,
    "year": 2025
  }'

All Merchants (Bulk):

curl -X POST "https://api3.facepos.ie/api/v1/public/invoice/create" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "merchant",
    "year": 2025
  }'

PowerShell Example:

$body = @{
    action = "customer"
    year = 2025
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/public/invoice/create" `
  -Method POST `
  -ContentType "application/json" `
  -Body $body

Response Example (with existing invoices):

{
  "success": true,
  "data": {
    "message": "2 customer invoice(s) created, 1 already existed",
    "action": "customer",
    "year": 2025,
    "month": "All months",
    "pid": "All profiles",
    "profiles_processed": 5,
    "invoices_created": 2,
    "invoices_skipped": 1,
    "total_transactions": 45,
    "commission_percent": 5,
    "invoices": [
      {
        "pid": 9947,
        "merchant_id": 0,
        "month": "2025-10",
        "transaction_count": 20,
        "amount": 1500.00,
        "commission": 75.00,
        "total_amount": 1575.00
      },
      {
        "pid": 9947,
        "merchant_id": 0,
        "month": "2025-11",
        "transaction_count": 25,
        "amount": 2000.00,
        "commission": 100.00,
        "total_amount": 2100.00
      }
    ]
  },
  "timestamp": "2025-11-21T12:00:00.000Z"
}
GET /api/v1/invoice 📄 INVOICES

Retrieve invoices with optional filters

POST /api/v1/receipt-check 🌍 NO AUTH REQUIRED

Validate receipt by checking if merchant ID and receipt ID are in the same transaction

📋 cURL Commands

Receipt Validation:

curl -X POST "https://api3.facepos.ie/api/v1/receipt-check" \
  -H "Content-Type: application/json" \
  -d '{
    "mid": 123,
    "receiptid": "PAY-2025-001234"
  }'

PowerShell Example:

$headers = @{
    "Content-Type" = "application/json"
}

$body = @{
    mid = 123
    receiptid = "PAY-2025-001234"
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/receipt-check" `
  -Method POST `
  -Headers $headers `
  -Body $body

Response Examples:

✅ Valid Receipt:

{
  "success": true,
  "data": {
    "uid": 12345,
    "mid": 123,
    "pid": 9947,
    "to_pid": 8201,
    "amount": "150.00",
    "receiptid": "PAY-2025-001234",
    "refnum": "REF-001234",
    "status": "SUCCESS",
    "currentDate": "2025-12-10T10:30:00.000Z",
    "description": "Payment for services",
    "currency": "EUR",
    "paymenttype": "CARD",
    "senderAcc": "****1234",
    "receiverAcc": "****5678"
  }
}

❌ Invalid Receipt:

{
  "success": false,
  "error": "No transaction found matching the provided mid and receiptid"
}

🏪 Merchant Onboarding (Tink Open Banking)

GET /api/v1/merchant-onboarding?action=generate-tink-link 🌍 NO AUTH REQUIRED

Step 1: Generate Tink authorization link for merchant to connect their bank account

The merchant ID from your database
GET /api/v1/merchant-onboarding?action=handle-tink-redirect 🌍 NO AUTH REQUIRED

Step 2: Exchange authorization code for access token (after merchant connects bank)

The code returned by Tink after merchant authorizes
GET /api/v1/merchant-onboarding?action=verify-bank-account 🌍 NO AUTH REQUIRED

Step 3: Fetch and verify bank account details with merchant name

The access token from Step 2
Same merchant ID used in Step 1
GET /api/v1/merchant-onboarding?action=initiate-payment 🌍 NO AUTH REQUIRED

Step 4: (Optional) Initiate a test payment

Amount in euros (e.g., 100.00)
The IBAN to send payment to

ℹ️ Merchant Onboarding Flow

  1. Generate Link: Create Tink authorization URL for merchant
  2. Merchant Action: Merchant clicks link → selects bank → logs in → authorizes
  3. Exchange Code: Convert authorization code to access token
  4. Verify Account: Fetch bank account details (IBAN, balance, etc.)
  5. Optional: Test payment initiation

Note: This uses Tink Open Banking API to securely connect merchant bank accounts.

👤 Customer Onboarding (Personal Bank Accounts)

GET /api/v1/customer-onboarding?action=generate-tink-link 🌍 NO AUTH REQUIRED

Step 1: Generate Tink authorization link for customer to connect personal bank

Optional - Person/User ID (pid) from users table
GET /api/v1/customer-onboarding?action=handle-tink-redirect

Step 2: Exchange authorization code for access token

The code returned by Tink after customer authorizes
GET /api/v1/customer-onboarding?action=verify-bank-account

Step 3: Fetch customer's personal bank account details

The access token from Step 2
POST /api/v1/customer-onboarding?action=initiate-payment

Step 4: Initiate payment from customer's bank account

ℹ️ Customer Onboarding Flow

  1. Generate Link: Create Tink authorization URL for customer
  2. Customer Action: Customer clicks link → selects bank → logs in → authorizes
  3. Exchange Code: Convert authorization code to access token
  4. Verify Account: Fetch personal bank account details
  5. Optional: Test payment from customer account

Note: For personal banking - customers connecting their individual accounts.

💰 Check Refund Status (Public)

Check if a transaction can be refunded

GET /api/v1/refund/check-status

Check if a transaction can be refunded and view current refund status

GET /api/v1/payment/check-status

Check the status of a payment request from Tink and update the refund status in database.

GET /api/v1/system/health
GET /api/v1/getacc 🏦 ADMIN ONLY

Advanced bank account management with filtering, sorting & pagination (Admin API)

Maximum records to return (default: 100)
Number of records to skip for pagination

🔍 Advanced Filters

Filter by exact bank name match
Filter by partial bank name match
Filter by exact account type
Filter by specific profile ID
Filter by currency code

🚀 Quick Test Scenarios

Click buttons above to load different test scenarios with various filters and sorting

📋 cURL Commands

Basic pagination:

curl -X GET "https://api3.facepos.ie/api/v1/getacc?limit=10&offset=0" \
  -H "x-api-key: v6Dxkb09qk6XCfdHGwlJbUJ8Frn30dPyl4M6"

Advanced filtering:

curl -X GET "https://api3.facepos.ie/api/v1/getacc?bankname_contains=chase&primary_eq=1&limit=5&sortfield=bankname&sorttype=asc" \
  -H "x-api-key: v6Dxkb09qk6XCfdHGwlJbUJ8Frn30dPyl4M6"

PowerShell Example:

$headers = @{ "x-api-key" = "v6Dxkb09qk6XCfdHGwlJbUJ8Frn30dPyl4M6" }
Invoke-RestMethod -Uri "https://api3.facepos.ie/api/v1/getacc?limit=10&bankname_contains=bank" -Headers $headers

Response Example:

{
  "table": "bankaccount",
  "total_count": 156,
  "filtered_count": 12,
  "limit": 10,
  "offset": 0,
  "filters": {
    "limit": "10",
    "bankname_contains": "chase",
    "primary_eq": "1"
  },
  "data": [
    {
      "uid": 1234,
      "pid": 9947,
      "bankname": "Chase Bank",
      "accounttype": "checking",
      "accountno": "****1234",
      "currency": "USD",
      "primary": true,
      "accholdername": "John Doe",
      "customername": "John Doe",
      "logo": "https://logo.clearbit.com/chase.com"
    }
  ]
}
GET /api/v1/app_versions 📱 PUBLIC

Get app version information with optional filters for platform, app name, and version

🔍 Filters

Partial match search
Exact version match

📄 Pagination (Optional)

Max: 100, Default: 20
POST /api/v1/app_versions 📱 PUBLIC

Create a new app version entry

POST /api/v1/receipt-generator 🧾 RECEIPT

Generate unique receipt IDs for transactions (Format: Facepos-001, Facepos-002, etc.)

Default: "Facepos" - Results in format like "Facepos-001"
ℹ️ How it works:
  • Generates sequential receipt IDs: Facepos-001, Facepos-002, etc.
  • Uses transaction locking to prevent duplicates
  • Same receipt ID is used for both merchanttrans and refund tables
  • Auto-increments from the last used number