Logo Blue Finalse
Console 
  Français   English


C#


  • GETTING STARTED
  • Authentication
  • Hello World
  • Pricing
  • Rate Limit
  • USE CASES
  • FPay UI Integration
  • Custom UI Integration
  • Interoperability  New
  • Payment links and QRCodes
  • Third Parties Money  New
  • Audit & Dashboard  New
  • REFERENCES
  • Attempt
  • AuthAccess
  • Deposit
  • FundRequest
  • QuasiTransfer
  • Transaction
  • Transfer
  • Wallet
Logo Blue FinalseLogo Blue Finalse
Javascript
Console 
  Français   English
  • GETTING STARTED
  • Authentication
  • Hello World
  • Pricing
  • Rate Limit
  • USE CASES
  • FPay UI Integration
  • Custom UI Integration
  • Interoperability  New
  • Payment links and QRCodes
  • Third Parties Money  New
  • Audit & Dashboard  New
  • REFERENCES
  • Attempt
  • AuthAccess
  • Deposit
  • FundRequest
  • QuasiTransfer
  • Transaction
  • Transfer
  • Wallet

Transaction

Introducing  

Every time there is a change in the balance of a Wallet, a Transaction object is created to materialize this movement of money. Whether this change in balance is due to a Transfer, a Deposit or any other object, a Transaction object will be created.
Here are the most importants fields of this object :

  •   amount
    With an always positive value, this field represents the amount that has been added to or withdrawn from the Wallet in question.
  •   dc
    Abbreviation for debit or credit, this field indicates whether the previous amount has been added to or withdrawn from the Wallet in question.
    The 2 possible values for this field are "Debit" or "Credit".
    If the value is "Debit", then the amount that is always positive has been removed from the Wallet.
    If the value is "Credit", then the amount that is always positive has been added to the Wallet.
  •   wallet
    This field is an indicator of the status of the target Wallet on which the Transaction took place. In particular, this field will give us access to the balance before and after the Transaction.
  •   status
    This field indicates whether the transaction was successful or failed. The 2 possible values for this field are Successful or Failure.
    Please note that these are not String, but objects. For example, the Failure object has isCancelled field, which indicates that the transaction failed because it has was cancelled.
  •   parent
    This field indicates the parent object whose execution led to the creation of this Transaction. This parent object can therefore be a Transfer, Deposit, QuasiTransfer etc.
  •   details
    This field, if available, will access the transaction id generated by the operator if this transaction concerns an operation between FPay and the outside world (Mtn Money, Orange Money or Moov Money).

Operations  

get  

Returns an object Transaction found by an identifier.
 Here are all the fields whose values can be used as identifiers for this operation:

  • id
  • details.providerTransactionId

const transactionPromise = fPay.transaction.get("identifier");


list  

Returns a collection of Transaction objects, possibly filtered and/or sorted. Here are the parameters supported by this operation.

NAMETYPEDESCRIPTIONDEFAULT VALUE
filterstring | undefinedCondition to be met by any object returned in this collection
undefined
sortBystring | undefinedSpecify the field and the order (ascending or descending) by which returned objects will be sorted
createdTime:DESC
limitnumber | undefinedTotal number of results to return in this collection
50

Here are a few examples of code to execute a listing to return a collection of Transaction objects:

const transactionsCollectionPromise = fPay.transaction.listAll();
const transactionsCollectionPromise = 
    fPay.transaction.list({
        sortBy: "id:ASC"
    });
const transactionsCollectionPromise = 
    fPay.transaction.list({
        limit: 5
    });
const transactionsCollectionPromise = 
    fPay.transaction.list({
        filter: "id in {'31234', '5678', '9990'}"
    });
const transactionsCollectionPromise = 
    fPay.transaction.list({
        filter: "createdTime isBefore Yesterday",
        sortBy: "foreignId:DESC"
    });
const transactionsCollectionPromise = 
    fPay.transaction.list({
        filter: "id startsWith abcd",
        sortBy: "createdTime:ASC",
        limit: 25
    });


fetchPage  

When you fetch a list of Transaction, the results returned by the server can be paginated, i.e. they will be arranged on several pages. This fetchPage function allows you to navigate from page to page, iterating over all the elements. Consequently, this function returns a collection of Transaction.

Let's say you've retrieved a collection of Transaction with the following code:

const transactionsCollectionPromise = fPay.transaction.listAll();

If the result is spread over several pages, to go to the next page, you should do:

transactionsCollectionPromise.then(transactionCollection => {
    if(transactionCollection.hasNextPage()) {
        const nextTransactionPromise = fPay.transaction.fetchPage(transactionCollection.pagination.nextPage);
    }
});


update  

Modify a Transaction object and return the modified version.
 Here are all the fields whose values can be used as identifiers for this operation:

  • id
  • details.providerTransactionId
Modifying an object means modifying its modifiable fields. Modifiable fields can be either updated or deleted. Here's the list of modifiable fields for all Transaction objects:

NAMETYPEDESCRIPTION
descriptionstring | undefinedCan be updated   Can be Deleted
foreignDatastring | undefinedCan be updated   Can be Deleted

Here are a few examples of code to execute an update:

transactionPromise = 
    fPay.transaction.update({
         id: "<id>",
         change: {
            description: "<new value>",
            foreignData: "<new value>"
         }
    });
transactionPromise = 
    fPay.transaction.update({
         id: "<id>",
         change: {
            description: "<new value>"
         },
         'remove': ['foreignData']
    });
transactionPromise = 
    fPay.transaction.update({
         id: "<id>",
         'remove': ['description', 'foreignData']
    });

List Filter & Sort  

Fields  

When you retrieve a list, here are the fields you can use for filtering and sorting. as well as sorting.

NAMETYPEDESCRIPTION
amount.currency.codestring
amount.valuenumber
createdTimestring
createdTime.iso8601string
createdTime.timestamp.millisecondsnumber
createdTime.timestamp.secondsnumber
dcstring
descriptionstring
destination.balanceTypestring
destination.identifier._typestring
destination.identifier.valuestring
destination.provider.country.iso3166.alpha2string
destination.provider.country.iso3166.alpha3string
destination.provider.country.namestring
destination.provider.keystring
destination.provider.namestring
detailsstring
details._typestring
details.providerTransactionIdstring
h1string
idstring
parent._typestring
parent.foreignIdstring
parent.idstring
source.balanceTypestring
source.identifier._typestring
source.identifier.valuestring
source.provider.country.iso3166.alpha2string
source.provider.country.iso3166.alpha3string
source.provider.country.namestring
source.provider.keystring
source.provider.namestring
statusstring
status._typestring
status.isCancelledboolean
wallet.after.balancenumber
wallet.after.balance.availablenumber
wallet.after.balance.lockedInnumber
wallet.after.balance.lockedOutnumber
wallet.after.volume.inputnumber
wallet.after.volume.outputnumber
wallet.after.volume.totalnumber
wallet.before.balancenumber
wallet.before.balance.availablenumber
wallet.before.balance.lockedInnumber
wallet.before.balance.lockedOutnumber
wallet.before.volume.inputnumber
wallet.before.volume.outputnumber
wallet.before.volume.totalnumber
wallet.foreignIdstring
wallet.idstring
wallet.isMainboolean
wallet.man.alphastring

Code examples  

Code examples are available on the Audit & Dashboard page

Fields  

Transaction
amount
Amount
currency
AmountCurrency
code
string
The only possible value is"XOF"  
unit
string
Symbol used to represent this currency. For now, the only value is "₣".
value
number
Numeric value of amount always positive or zero.
createdTime
UTCDateTime
Date and time at which this object was created. Value always stored in UTC (Universal Time), this field contains a representation of this instant in ISO 8601 format, as well as a representation of this same instant in timestamp seconds and milliseconds.
iso8601
string
Date and time in ISO 8601 format
timestamp
Timestamp
milliseconds
number
Date and time in timestamp milli seconds
seconds
Double
Date and time in timestamp seconds
dc
string
Abbreviation for debit or credit, this field indicates whether the transaction amount has been added to or withdrawn from the Wallet in question.
The 2 possible values for this field are "Debit" or "Credit".
If the value is "Debit", then the amount that is always positive has been removed from the Wallet.
If the value is "Credit", then the amount that is always positive has been added to the Wallet.
The only possible values are"Credit"  "Debit"  
description
string | undefined
Details, explanations and notes about this item to help you get organized and find your way around later.
destination
MoneyAccount
balanceType
string
Indicates the type of balance used.
"AvailableBalance" literally means “Available Balance”. So, if the value of this field is “AvailableBalance”, then the funds are on the "AvailableBalance" and can be used. In some cases, funds are “Locked” (either on the "LockedInBalance" or   "LockedOutBalance" ) and cannot be used until they are made available on the "AvailableBalance".
The only possible values are"AvailableBalance"  "LockedInBalance"  "LockedOutBalance"  
identifier
MoneyAccountIdentifier
_type
string
Indicates the type of account on which “MoneyAccount” money is held. If it's a bank account, this field will have the value "Iban".
If it's a mobile money account, this field will have the value "MobileMoney".
If it's an FPay wallet, the value can be either "Id" or "Man", the latter meaning "Money Account Number".
The only possible values are"Iban"  "Id"  "Man"  "MobileNumber"  
value
string
Indicates the type of account on which “MoneyAccount” money is held. If it's a bank account, this field will have the value "Iban".
If it's a mobile money account, this field will have the value "MobileMoney".
If it's an FPay account, the value can be either "Id" or "Man", the latter meaning "Money Account Number".
provider
MoneyAccountProvider
country
Country
iso3166
Iso3166Country
alpha2
string
ISO 3166 code with 2 characters representing the country.
Example: “CI” for Côte d'Ivoire, “BF” for Burkina Faso and “SN” for Senegal.
alpha3
string
ISO 3166 code with 3 characters representing the country.
Example: “CIV” for Côte d'Ivoire, “BFA” for Burkina Faso and “SEN” for Senegal.
name
string
Country name in either English or French, depending on the language of your FPay account. If, when you registered, you chose French as the language of your account, then the country name will be in French. in French and if you have chosen English, then this name will be in English.
key
string
Key uniquely identifying the money account provider.
The only possible values are"FPay"  "MoovMoney"  "MtnMoney"  "OrangeMoney"  
name
string
Money account provider name
details
TransactionDetails
TransactionDetails.BankTransfer
BankTransfer
_type
string
The only possible value is"BankTransfer"  

TransactionDetails.FPayTransfer
FPayTransfer
_type
string
The only possible value is"FPayTransfer"  

TransactionDetails.MobileMoneyTransfer
MobileMoneyTransfer
_type
string
The only possible value is"MobileMoneyTransfer"  
providerTransactionId
string | undefined

foreignData
string | undefined
Your own data that you can attach to the object you've created. This can be JSON XML other data formats or simply Strings.
The maximum allowed length is 128 characters.
h1
H1
Title, wording of this Transaction
en
string
fr
string
id
string
Unique, unchangeable identifier made up of numbers and letters.
parent
TransactionParent
This field indicates the parent object whose execution led to the creation of this Transaction. This parent object can therefore be a Transfer, Deposit, QuasiTransfer etc.
source
MoneyAccount
balanceType
string
Indicates the type of balance used.
"AvailableBalance" literally means “Available Balance”. So, if the value of this field is “AvailableBalance”, then the funds are on the "AvailableBalance" and can be used. In some cases, funds are “Locked” (either on the "LockedInBalance" or   "LockedOutBalance" ) and cannot be used until they are made available on the "AvailableBalance".
The only possible values are"AvailableBalance"  "LockedInBalance"  "LockedOutBalance"  
identifier
MoneyAccountIdentifier
_type
string
Indicates the type of account on which “MoneyAccount” money is held. If it's a bank account, this field will have the value "Iban".
If it's a mobile money account, this field will have the value "MobileMoney".
If it's an FPay wallet, the value can be either "Id" or "Man", the latter meaning "Money Account Number".
The only possible values are"Iban"  "Id"  "Man"  "MobileNumber"  
value
string
Indicates the type of account on which “MoneyAccount” money is held. If it's a bank account, this field will have the value "Iban".
If it's a mobile money account, this field will have the value "MobileMoney".
If it's an FPay account, the value can be either "Id" or "Man", the latter meaning "Money Account Number".
provider
MoneyAccountProvider
country
Country
iso3166
Iso3166Country
alpha2
string
ISO 3166 code with 2 characters representing the country.
Example: “CI” for Côte d'Ivoire, “BF” for Burkina Faso and “SN” for Senegal.
alpha3
string
ISO 3166 code with 3 characters representing the country.
Example: “CIV” for Côte d'Ivoire, “BFA” for Burkina Faso and “SEN” for Senegal.
name
string
Country name in either English or French, depending on the language of your FPay account. If, when you registered, you chose French as the language of your account, then the country name will be in French. in French and if you have chosen English, then this name will be in English.
key
string
Key uniquely identifying the money account provider.
The only possible values are"FPay"  "MoovMoney"  "MtnMoney"  "OrangeMoney"  
name
string
Money account provider name
status
TransactionStatus
TransactionStatus.Failure
Failure
_type
string
The only possible value is"Failure"  
isCancelled
boolean

TransactionStatus.Successful
Successful
_type
string
The only possible value is"Successful"  

url
string
URL on which a properly authorized GET method will return the instance of the object on which this field is defined.
wallet
TransactionWalletView
A transaction always impacts a wallet. Whether it adds money to a wallet or removes money from a wallet. This field represents a “view”, a photograph of the wallet impacted by the transaction when it occurred.
after
TransactionBeforeAfter
All the following values were captured after the transaction had taken place
balance
Balance
available
number
Balance available for use
lockedIn
number
Locked balance, which represents the sum of all future cash inflows to this wallet.
lockedOut
number
Locked balance representing the sum of all future cash outflows from this wallet.
volume
Volume
input
number
This inflow volume represents the sum of all money received on this wallet.
output
number
This output volume represents the sum of all outflows from this wallet.
total
number
This total volume represents the sum of all incoming and outgoing to and from this wallet.
before
TransactionBeforeAfter
All the following values were captured before the transaction took place
balance
Balance
available
number
Balance available for use
lockedIn
number
Locked balance, which represents the sum of all future cash inflows to this wallet.
lockedOut
number
Locked balance representing the sum of all future cash outflows from this wallet.
volume
Volume
input
number
This inflow volume represents the sum of all money received on this wallet.
output
number
This output volume represents the sum of all outflows from this wallet.
total
number
This total volume represents the sum of all incoming and outgoing to and from this wallet.
createdTime
UTCDateTime
Date and time at which this object was created. Value always stored in UTC (Universal Time), this field contains a representation of this instant in ISO 8601 format, as well as a representation of this same instant in timestamp seconds and milliseconds.
iso8601
string
Date and time in ISO 8601 format
timestamp
Timestamp
milliseconds
number
Date and time in timestamp milli seconds
seconds
Double
Date and time in timestamp seconds
creator
Creator
Creator.Api
Api
_type
string
The only possible value is"Api"  
accountId
string
authAccessId
string

Creator.Ui
Ui
_type
string
The only possible value is"Ui"  
accountId
string
personId
string

description
string | undefined
Details, explanations and notes about this item to help you get organized and find your way around later.
foreignData
string | undefined
Your own data that you can attach to the object you've created. This can be JSON XML other data formats or simply Strings.
The maximum allowed length is 128 characters.
foreignId
string | undefined
ID Personalisé ou bien ID de votre système interne que vous souhaitez attacher à cet objet pour vous permettre de le récupérer plus tard.
Once created, this value cannot be modified.
This value must be unique for each type.
The maximum allowed length is 128 characters.
id
string
Unique, unchangeable identifier made up of numbers and letters.
isMain
boolean
Indicates whether this is the main wallet.
When you register with FPay, we create a wallet for you, which is the main wallet, the first to be created.
mainPocket
Pocket
balance
Balance
available
number
Balance available for use
lockedIn
number
Locked balance, which represents the sum of all future cash inflows to this wallet.
lockedOut
number
Locked balance representing the sum of all future cash outflows from this wallet.
volume
Volume
input
number
This inflow volume represents the sum of all money received on this wallet.
output
number
This output volume represents the sum of all outflows from this wallet.
total
number
This total volume represents the sum of all incoming and outgoing to and from this wallet.
man
Man
alpha
string
Man value (Money Account Number), unique value for each wallet created on FPay.
mars
Mars
alpha
string
name
string
wallet name
url
string
URL on which a properly authorized GET method will return the instance of the object on which this field is defined.

TRANSACTION
  • Introducing
  • Oprations
    • Get
    • List
    • FetchPage
    • Update
  • List Filter & Sort
    • Fields
    • Code example
  • Object Fields