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

AuthAccess

Introducing  

This object manages authentication and authorizations during interaction between your system and ours. For the moment, it is possible to define the following authorizations on this object:

  •   money-in-only : Only API requests to bring money into your account can be made with this AuthAccess object.
  •   read-only : Only read API requests can be made with this AuthAccess object. It will be possible for example to retrieve the transaction list programmatically and impossible to transfer money or to create another new AuthAccess object.
  •   read/money-in : Only read API requests AND requests to bring money into your account can be made with this AuthAccess object.
  •   read-write/no-money-out : Read or write API requests can be made but it won't be possible to transfer money out of your account. Note that it is also impossible to create an AuthAccess with this object that will allow transfer money out of your account.
  •   full-access : All possibles API requests on your account can be done with this object
Information
Regarding access control, our engineers are currently working on a more advanced system of permissions and authorizations management. You will have more choices than the previous permissions in a near future update that will be retro-compatible with any written now.
More powerful than ACL (Acces Control List) and RBAC (Role Based Access Control), the ABAC (Attribute-based access control)  paradigm will be used for this radically innovative permission system.

Operations  

create  

Create a new AuthAccess object and return the newly created object.
This operation takes the following parameters as input:

CreateAuthAccessForm
name
Required
string
API Authentication name
permission
Required
string
Permissions can be expressed either simply or in a complex way with a high degree of control over API key rights.
For the moment, you can only use the simple format, other options will be added in a future update.
The only possible values are"FullAccess"  "MoneyInOnly"  "ReadMoneyIn"  "ReadOnly"  "ReadWriteNoMoneyOut"  
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.

Here's an example of code for creating a AuthAccess object:

const authAccessPromise = 
    fPay.authAccess.create({
        name: "API Keys for CRM developers",
        permission: "ReadWriteNoMoneyOut",
        description: "My description",
        foreignData: "{\"myKey\": 19, \"myOtherKey\": \"myOtherValue\"}",
        foreignId: "123456789"
    });


get  

Returns an object AuthAccess found by an identifier.
You can use a unique ID specific to your system. To use your own ID instead of the one generated by FPay, you need to specify the foreignId field when creating the object. This will enable you to retrieve the object via the foreignId field, which must be unique for all AuthAccess objects.  Here are all the fields whose values can be used as identifiers for this operation:

  • id
  • token
  • foreignId

const authAccessPromise = fPay.authAccess.get("identifier");


list  

Returns a collection of AuthAccess 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 AuthAccess objects:

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


fetchPage  

When you fetch a list of AuthAccess, 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 AuthAccess.

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

const authAccessCollectionPromise = fPay.authAccess.listAll();

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

authAccessCollectionPromise.then(authAccessCollection => {
    if(authAccessCollection.hasNextPage()) {
        const nextAuthAccessPromise = fPay.authAccess.fetchPage(authAccessCollection.pagination.nextPage);
    }
});


update  

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

  • id
  • token
  • foreignId
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 AuthAccess 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:

authAccessPromise = 
    fPay.authAccess.update({
         id: "<id | foreignId>",
         change: {
            description: "<new value>",
            foreignData: "<new value>"
         }
    });
authAccessPromise = 
    fPay.authAccess.update({
         id: "<id | foreignId>",
         change: {
            description: "<new value>"
         },
         'remove': ['foreignData']
    });
authAccessPromise = 
    fPay.authAccess.update({
         id: "<id | foreignId>",
         '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
createdTimestring
createdTime.iso8601string
createdTime.timestamp.millisecondsnumber
createdTime.timestamp.secondsnumber
creatorstring
creator._typestring
creator.accountIdstring
creator.authAccessIdstring
creator.personIdstring
descriptionstring
foreignIdstring
idstring
isEnabledboolean
namestring
secretKeystring
tokenstring

Code examples  

Code examples are available on the Audit & Dashboard page

Fields  

AuthAccess
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.
isEnabled
boolean
Indicates whether this API key is active and can therefore make requests to FPay servers.
Enabling and disabling can only be done from your console  and are therefore not available via APIs.
name
string
permission
AuthAccessPermission
Permissions can be expressed either simply or in a complex way with a high degree of control over API key rights.
For the moment, you can only use the simple format, other options will be added in a future update.
AuthAccessPermission.Complex
Complex
_type
string
The only possible value is"Complex"  

AuthAccessPermission.Simple
Simple
_type
string
The only possible value is"Simple"  
name
string
The only possible values are"FullAccess"  "MoneyInOnly"  "ReadMoneyIn"  "ReadOnly"  "ReadWriteNoMoneyOut"  

secretKey
string
Secret key to authenticate and authorize your requests with FPay servers.
The value of this field is hidden for all calls to APIs.
Important
In AuthAccess object, the value of the field named secretKey must be kept absolutely secret and used only on your servers. This implies that you should never use the value of this field as a variable or constant in the source code of a mobile application, a web application or in the source code of any application whose binary may be public and visible to all. There are many tools to access strings in the source code from a binary around here.
token
string
Identifier to authenticate and authorize your requests with FPay servers.
url
string
URL on which a properly authorized GET method will return the instance of the object on which this field is defined.

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