Normally, a transfer is carried out from a source account to a destination point account, so there is normally no concept of "Quasi".
To understand why we invented this concept, let's stay within the context of a transfer. This object is used to express the following idea: I've sent you some money, here's the link where you can put your phone number, regardless of the operator, to receive this money.Normally, a transfer is carried out from a source account to a destination point account, so there is normally no concept of "Quasi".
To understand hy we invented this concept, if we stay within the context of a transfer, we can say that it allows us to express the following idea: I've sent you some money, here's the link where you can put your phone number, regardless of the operator, to receive this money. Once this QuasiTransfert has been initiated, the funds are locked and await the recipient, who must specify the account to which they wish to receive them. Here are a few examples of possible uses for a Quasi Transfer:
securePay.link field, and you can access the url pointing to the QRCode image via the securePay.qrCode.src field.h1 field when creating the QuasiTransfer object. If you add 2 languages this field, the user will be able to change language and see the message inviting him to receive his money in his native language.
cancel Cancel and then Returns an object QuasiTransfer 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 QuasiTransfer objects.
Here are all the fields whose values can be used as identifiers for this operation:
idforeignIdQuasiTransfer object that has already been cancelled, either successfully or unsuccessfully.const quasiTransferPromise = fPay.quasiTransfer.cancel("identifier");get Returns an object QuasiTransfer 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 QuasiTransfer objects. Here are all the fields whose values can be used as identifiers for this operation:
idforeignIdconst quasiTransferPromise = fPay.quasiTransfer.get("identifier");initiate Initiate a new QuasiTransfer operation and return the newly created instance.
This operation takes the following parameters as input:
InitiateQuasiTransferFormamountAmountFormcurrencystringvaluestringdescriptionstring | undefinedexpirestring | undefined<after><space><$number><$timeUnit><on><space><$iso8601Datetime>neverFundRequest object, the value never is the default value if none specified.QuasiTransfer object, the value 24h is the default value if none specified."after 15m""after 90s""after 1h""after 2d""after 1w""on 2028-05-19T01:13Z""on 2028-05-19""on 15:30"feesFeesForm | undefinedpayerstringforeignDatastring | undefinedforeignIdstring | undefinedh1H1DescriptorForm | undefinedenstring | undefinedfrstring | undefinedonFailureOnQuasiTransferCompletedForm | undefinedredirectUserTostring | undefinedonSuccessOnQuasiTransferCompletedForm | undefinedredirectUserTostring | undefinedsourceSourceForm | undefinedSourceForm.MultipleSourceFormMultipleSourceFormSourceForm.SingleSourceFormSingleSourceFormaccountMoneyAccountFormcountrystringidentifierstringid identifierproviderKeystringHere's an example of code for initiate a QuasiTransfer object:
const quasiTransferPromise =
fPay.quasiTransfer.initiate({
amount: {
currency: "XOF",
value: "10_000"
},
description: "My description",
expire: "after 12h",
fees: {
payer: "CounterPart"
},
foreignData: "{\"myKey\": 19, \"myOtherKey\": \"myOtherValue\"}",
foreignId: "123456789",
h1: {
en: "Payment description",
fr: "Description du paiement"
},
onFailure: {
redirectUserTo: "https://you-server.com/ui/failure"
},
onSuccess: {
redirectUserTo: "https://you-server.com/ui/success"
},
source: {
_type: "Single",
account: {
country: "CI",
identifier: "123456789",
providerKey: "FPay"
}
}
});list Returns a collection of QuasiTransfer objects, possibly filtered and/or sorted. Here are the parameters supported by this operation.
| NAME | TYPE | DESCRIPTION | DEFAULT VALUE |
|---|---|---|---|
filter | string | undefined | Condition to be met by any object returned in this collection | |
sortBy | string | undefined | Specify the field and the order (ascending or descending) by which returned objects will be sorted | |
limit | number | undefined | Total number of results to return in this collection | |
Here are a few examples of code to execute a listing to return a collection of QuasiTransfer objects:
const quasiTransfersCollectionPromise = fPay.quasiTransfer.listAll();const quasiTransfersCollectionPromise =
fPay.quasiTransfer.list({
sortBy: "id:ASC"
});const quasiTransfersCollectionPromise =
fPay.quasiTransfer.list({
limit: 5
});const quasiTransfersCollectionPromise =
fPay.quasiTransfer.list({
filter: "id in {'31234', '5678', '9990'}"
});const quasiTransfersCollectionPromise =
fPay.quasiTransfer.list({
filter: "createdTime isBefore Yesterday",
sortBy: "foreignId:DESC"
});const quasiTransfersCollectionPromise =
fPay.quasiTransfer.list({
filter: "id startsWith abcd",
sortBy: "createdTime:ASC",
limit: 25
});fetchPage When you fetch a list of QuasiTransfer, 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 QuasiTransfer.
Let's say you've retrieved a collection of QuasiTransfer with the following code:
const quasiTransfersCollectionPromise = fPay.quasiTransfer.listAll();If the result is spread over several pages, to go to the next page, you should do:
quasiTransfersCollectionPromise.then(quasiTransferCollection => {
if(quasiTransferCollection.hasNextPage()) {
const nextQuasiTransferPromise = fPay.quasiTransfer.fetchPage(quasiTransferCollection.pagination.nextPage);
}
});receive Receive funds from an quasi transfer identified by an identifier and returns an Attempt symbolizing an attempt to send money to recipient.
Here are all the fields whose values can be used as identifiers for this operation:
idforeignIdQuasiTransfer, identified by its id, to the specified user's money account.ReceiveQuasiTransferFormdestinationDestinationFormDestinationForm.MultipleDestinationFormMultipleDestinationFormDestinationForm.SingleDestinationFormSingleDestinationFormaccountMoneyAccountFormcountrystringidentifierstringproviderKeystringidstringHere's an example of code for receive money after a QuasiTransfer object:
const attemptPromise =
fPay.quasiTransfer.receive({
destination: {
_type: "Single",
account: {
country: "CI",
identifier: "123456789",
providerKey: "FPay"
}
},
id: "123456789"
});update Modify a QuasiTransfer object and return the modified version.
Here are all the fields whose values can be used as identifiers for this operation:
idforeignIdQuasiTransfer objects:| NAME | TYPE | DESCRIPTION |
|---|---|---|
description | string | undefined | Can be updated Can be Deleted |
foreignData | string | undefined | Can be updated Can be Deleted |
Here are a few examples of code to execute an update:
quasiTransferPromise =
fPay.quasiTransfer.update({
id: "<id | foreignId>",
change: {
description: "<new value>",
foreignData: "<new value>"
}
});quasiTransferPromise =
fPay.quasiTransfer.update({
id: "<id | foreignId>",
change: {
description: "<new value>"
},
'remove': ['foreignData']
});quasiTransferPromise =
fPay.quasiTransfer.update({
id: "<id | foreignId>",
'remove': ['description', 'foreignData']
});When you retrieve a list, here are the fields you can use for filtering and sorting. as well as sorting.
| NAME | TYPE | DESCRIPTION |
|---|---|---|
amount.currency.code | string | |
amount.value | number | |
completedTime | string | |
completedTime.iso8601 | string | |
completedTime.timestamp.milliseconds | number | |
completedTime.timestamp.seconds | number | |
createdTime | string | |
createdTime.iso8601 | string | |
createdTime.timestamp.milliseconds | number | |
createdTime.timestamp.seconds | number | |
creator | string | |
creator._type | string | |
creator.accountId | string | |
creator.authAccessId | string | |
creator.personId | string | |
description | string | |
destination | string | |
destination._type | string | |
destination.account.balanceType | string | |
destination.account.identifier._type | string | |
destination.account.identifier.value | string | |
destination.account.provider.country.iso3166.alpha2 | string | |
destination.account.provider.country.iso3166.alpha3 | string | |
destination.account.provider.country.name | string | |
destination.account.provider.key | string | |
destination.account.provider.name | string | |
destination.amount.currency.code | string | |
destination.amount.value | number | |
expire.delay | string | |
expire.time | string | |
expire.time.iso8601 | string | |
expire.time.timestamp.milliseconds | number | |
expire.time.timestamp.seconds | number | |
fees.amount.currency.code | string | |
fees.amount.value | number | |
fees.payer | string | |
fees.value.fixe | number | |
fees.value.percent | number | |
foreignId | string | |
h1Descriptor.en | string | |
h1Descriptor.fr | string | |
id | string | |
onFailure.redirectUserTo | string | |
onSuccess.redirectUserTo | string | |
securePay.link | string | |
securePay.purpose.label | string | |
securePay.qrCode.src | string | |
sending | string | |
source | string | |
source._type | string | |
source.account.balanceType | string | |
source.account.identifier._type | string | |
source.account.identifier.value | string | |
source.account.provider.country.iso3166.alpha2 | string | |
source.account.provider.country.iso3166.alpha3 | string | |
source.account.provider.country.name | string | |
source.account.provider.key | string | |
source.account.provider.name | string | |
source.amount.currency.code | string | |
source.amount.value | number | |
status | string | |
status._type | string | |
status.cancelled.afterTimeout | boolean | |
status.reason.en | string | |
status.reason.fr | string |
Code examples are available on the Audit & Dashboard page
QuasiTransferamountAmount | undefinedcurrencyAmountCurrencycodestringunitstringvaluenumbercompletedTimeUTCDateTime | undefinediso8601stringtimestampTimestampmillisecondsnumbersecondsDoublecreatedTimeUTCDateTimeiso8601stringtimestampTimestampmillisecondsnumbersecondsDoublecreatorCreatorCreator.ApiApi_typestringaccountIdstringauthAccessIdstringCreator.UiUi_typestringaccountIdstringpersonIdstringdescriptionstring | undefineddestinationDestination | undefinedDestination.MultipleMultiple_typestringDestination.SingleSingle_typestringaccountMoneyAccountbalanceTypestringidentifierMoneyAccountIdentifier_typestringvaluestringproviderMoneyAccountProvidercountryCountryiso3166Iso3166Countryalpha2stringalpha3stringnamestringkeystringnamestringamountAmountcurrencyAmountCurrencycodestringunitstringvaluenumberexpireExpire | undefineddelayDurationiso8601stringmillisecondsDoublesecondsDoubletimeUTCDateTimeiso8601stringtimestampTimestampmillisecondsnumbersecondsDoublefeesFeesamountAmountcurrencyAmountCurrencycodestringunitstringvaluenumberpayerstring | undefinedvalueFeesValuefixenumberpercentnumberforeignDatastring | undefinedforeignIdstring | undefinedh1DescriptorH1Descriptor | undefinedenstring | undefinedfrstring | undefinedidstringonFailureOnQuasiTransferCompleted | undefinedredirectUserTostring | undefinedonSuccessOnQuasiTransferCompleted | undefinedredirectUserTostring | undefinedsecurePaySecurePaylinkstringpurposeSecurePayPurposeSecurePayPurpose.PurchasePurchase_typestringlabelstringSecurePayPurpose.ReceiveReceive_typestringSecurePayPurpose.SendSend_typestringqrCodeQrCodesrcstringsendingstringsourceSourceSource.MultipleMultiple_typestringSource.SingleSingle_typestringaccountMoneyAccountbalanceTypestringidentifierMoneyAccountIdentifier_typestringvaluestringproviderMoneyAccountProvidercountryCountryiso3166Iso3166Countryalpha2stringalpha3stringnamestringkeystringnamestringamountAmountcurrencyAmountCurrencycodestringunitstringvaluenumberstatusQuasiTransferStatusQuasiTransferStatus.FailureFailure_typestringcancelledCancelled | undefinedafterTimeoutbooleanreasonLocalizedTextenstringfrstringQuasiTransferStatus.ProcessingProcessing_typestringreasonLocalizedTextenstringfrstringQuasiTransferStatus.StartedStarted_typestringQuasiTransferStatus.StartingStarting_typestringQuasiTransferStatus.SuccessfulSuccessful_typestringQuasiTransferStatus.WaitingToStartWaitingToStart_typestringurlstring