Submitting Transactions
Submitting a Transaction
To submit a transaction for screening, use the following endpoint:
Endpoint
POST {BASEURL}/client/fibonacci/check-transaction
Authentication
Each request must include a Bearer token in the Authorization header. The API key will always start with sk_. Below is an example of how to format the header:
Request Examples
- cURL
- Node.js
- Python
- PHP
- Ruby
- Go
curl -X POST {BASEURL}/client/fibonacci/check-transaction \
-H "Authorization: Bearer sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{
"transactionData": { /* ... */ },
"device": { /* ... */ },
"anonymizedUserData": { /* ... */ },
"location": { /* ... */ },
"thirdPartyUserData": { /* ... */ }
}'
const axios = require("axios");
const data = {
/* ... */
};
axios
.post("{BASEURL}/client/fibonacci/check-transaction", data, {
headers: {
Authorization: "Bearer sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXX",
"Content-Type": "application/json",
},
})
.then((response) => {
console.log(response.data);
})
.catch((error) => {
console.error(error);
});
import requests
url = "{BASEURL}/client/fibonacci/check-transaction"
headers = {
"Authorization": "Bearer sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXX",
"Content-Type": "application/json"
}
data = { /* ... */ }
response = requests.post(url, json=data, headers=headers)
print(response.json())
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "{BASEURL}/client/fibonacci/check-transaction");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Authorization: Bearer sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXX",
"Content-Type: application/json"
));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("{BASEURL}/client/fibonacci/check-transaction")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXX"
request["Content-Type"] = "application/json"
request.body = JSON.dump({ /* ... */ })
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.body
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
url := "{BASEURL}/client/fibonacci/check-transaction"
data := map[string]interface{}{ /* ... */ }
jsonData, _ := json.Marshal(data)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXX")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
fmt.Println(resp.Status)
}
Data Tables
To create a robust anomaly detection model tailored to your needs, we require the following data fields. These fields help us capture the full scope of transactional, customer, and other relevant activities.
Required variables are marked with an asterisk (*). Variables without an asterisk are optional, subject to different use cases.
Transaction Data
| Variable Name | Description | Type |
|---|---|---|
| transactionId* | The unique identifier of the transacation | String (e.g. 'a1b2c34de5') |
| timestamp* | The date and time of the transaction | ISO 8601 (e.g. '2024-10-21T10:30:45Z') |
| amount* | The amount of the transaction | Number (e.g. '100000') |
| currency* | The currency the transaction was done in | String (e.g. 'USD') |
| status* | The status of the transaction | String enum (e.g. 'completed', 'declined', 'pending') |
| paymentMethod* | The payment channel used in this transaction | String (e.g 'bank transfer', 'credit card') |
| isInternationalTransaction | Are payee and payer in different countries? | Boolean (e.g. true / false) |
| narration | The transaction narration or description | String (e.g. 'Payment for electronics') |
| transactionType* | The type of transaction: credit or debit | String (e.g. 'credit') |
| balanceBeforeTransaction | The balance of the account before the transaction | String (e.g. '5000.00') |
| vasReceiver | The value-added service receiver | String (e.g. 'Service123') |
| isExternalPayment* | If the payment is going to or coming from an account not managed by the same payment institution | Boolean (e.g. true / false) |
| organization | Which financial institution the data is from | String (e.g. 'Access Bank') |
| transactionCategory | Transaction/Product Category | String (e.g. 'Airtime', 'Data') |
| isCardPresent | Indicates if the transaction was card-present or card-not-present | Boolean (e.g. true / false) |
| hasCrossBorderActivity | Indicates if the merchant’s country and the card issuing country differ | Boolean (e.g. true / false) |
Customer Data
| Variable Name | Description | Type |
|---|---|---|
| customerId* | The unique identifier of the customer | String (e.g. '67b12d7') |
| location | Customer's location/country, including city, latitude, longitude, and state. | JSON Object |
| isPhoneNumberVerified | Indicates if the customer's phone number is verified. | Boolean (e.g. true / false) |
| isEmailVerified | Indicates if the customer's email is verified. | Boolean (e.g. true / false) |
| accountAge | The day and time the customer was created | Datetime (e.g. 2024-10-21T10:15:32) |
| accountType* | Individual or business account | String (e.g. 'Individual') |
| isBanned* | Whether the customer is banned | Boolean (e.g. true / false) |
| age | The age of the customer | Number (e.g. 35) |
| updatedLast | The last time the customer updated their data | ISO 8601 (e.g. '2024-10-21T10:30:45Z') |
| lastLogin | Date and time customer last logged in | ISO 8601 (e.g. '2024-10-21T10:30:45Z') |
| isCustomerIdVerified | Indicates if the customer's ID is verified | Boolean (e.g. true / false) |
| idType | The type of user ID that was verified | String enum (e.g. Passport, NIN, Driver’s license) |
| transactionHistoryLength | Total number of transactions processed by customer | Number (e.g. 240) |
| averageTransactionFrequencyPerMonth | Number of transactions processed by customer per month | Number (e.g. 5) |
| averageTransactionAmount | The average transaction amount of the customer | Number (e.g. 2000) |
| numberOfLinkedAccounts | Number of accounts linked to the customer’s ID | |
| firstName | first name of the customer | String (e.g John) |
| lastName | last name of the customer | String (e.g doe) |
| dob | date of birth of the customer | String (e.g 1908-01-01) |
| gender | customer's gender | String(male or female) |
Merchant Data
| Variable Name | Description | Type |
|---|---|---|
| merchantId | The unique identifier of the merchant | String (e.g. '67b12d7') |
| location | Merchant's location/country, including city, latitude, longitude, and state. | JSON Object |
Payment Information
| Variable Name | Description | Type |
|---|---|---|
| paymentMethod | The payment channel used in this transaction | String (e.g 'bank transfer', 'credit card') |
| cardIssuerBank | The bank that issued the card | String (e.g. 'Access Bank') |
| receiverAccount | The account that received the payment | String (e.g. '1234567890') |
| senderAccount | The account that sent the payment | String (e.g. '0987654321') |
| cardScheme | The card type used in the transaction | String (e.g. Visa, Mastercard, Amex) |
| cardExpiryDate | The expiry date of the card | String (e.g. '12/25') |
| maskedCardPan | Masked PAN of the card | String (e.g. 'abc124') |
| PAN | PAN of the card | String (e.g. 'abc124') |
| senderBankCode | Bank code of the sender’s bank | String (e.g. '066') |
| receiverBankCode | Bank code of the receiver's bank | String (e.g. '566') |
Device Information
| Variable Name | Description | Type |
|---|---|---|
| ipAddress | The IP address of the device accessed the platform | String (e.g. '192.168.1.1') |
| deviceId | The anonymized ID of the device | String (e.g. 'a88b11796-64d6-4524-a2f6-35f84d5cd652') |
| manufacturer | The manufacturer of the device | String (e.g. 'Google') |
| model | The model of the device | String (e.g. 'Pixel 8 Pro') |
| osName | The operating system of the device | String (e.g. 'Android 14') |
| osVersion | The version of the operating system | String (e.g. '11.07.13') |
| deviceType | The type of device used | String (e.g. 'mobile', 'desktop', 'tablet') |
Labels
| Variable Name | Description | Type |
|---|---|---|
| isAnomaly | If a customer or a transaction is anomalous | Boolean (e.g. true / false) |
Providing these data fields will ensure that our models are built to provide the highest level of accuracy in detecting anomalies and minimizing false positives.
Sample Request Data
{
"transactionData": {
"reference": "2303pee2fc",
"amount": 100.5,
"receiverAccount": "93829392233",
"isExternalPayment": false,
"status": "new",
"senderAccount": "01929393923",
"balanceBefore": 1000,
"type": "debit",
"channel": "pos",
"transactionDate": "2022-04-28 10:30:00",
"vasReceiver": "08124668857",
"currency": "ngn",
"narration": "some payment",
"issuer": "city bank"
},
"device": {
"deviceId": "J020D23020D03300303203D3232DDD",
"manufacturer": "Apple",
"model": "iPhone 14 Pro",
"name": "iPhone 14 Pro",
"osName": "iOS",
"osVersion": "17.1.0"
},
"anonymizedUserData": {
"uniqueId": "e8baeb9c-e563-11ed-b5ea-0242ac120002",
"accountType": "individual",
"businessCategory": "retail",
"isPhoneNumberVerified": true,
"isBanned": false,
"dateJoined": "2022-01-01 23:58:00",
"age": 29,
"isIdentityVerified": true,
"state": "lagos",
"city": "ikeja",
"country": "Nigeria"
},
"location": {
"latitude": 1.039303034,
"longitude": -1.423243444
},
"thirdPartyUserData": {
"uniqueId": "e2300-e563-11ed-b5ea-0242ac120002",
"cardPan": "33899******3329"
}
}