Skip to content

Emulation

Emulation features are only available in Sandbox environment.

Bulb icon

Tip – You can also rely on webhooks

For operations that cannot be emulated in the Sandbox, webhook examples are provided.

Credit funds

To credit funds, check out the transfer emulations page.

Operations

To emulate Account Statements in Sandbox, you need to generate fake operations for the desired month.

This can be done using the following request.

bash
curl -X POST {baseUrl}/simulation/operations \
	--header 'Authorization: Bearer {accessToken}' \
	--header 'Content-Type: application/json' \
	-d '{payload}'

Here is an example of {payload}:

json
{
	"walletId": {walletId},
	"date": "2023-10",
	"operations": {
		"payin": 5,
		"payinrefund": 2,
		"payout": 6,
		"payoutrefund": 1,
		"transfer": 3,
		"cardtransaction": 7,
		"transferfees":2,
		"transfercreditnote":1
	}
}

Status

Wallets are created in a pending status that is usually very shortly after validated.

To emulate a different status, prefix the Wallet eventName attribute with the following characters.

PrefixwalletStatuscodeStatusDescription
p.1PENDING120001Information control
p.2PENDING120002Late information control
c.3CANCELED120003Wallet was closed internally
c.4CANCELED120004Wallet was closed by the User
v.5VALIDATED120005Wallet is valid

Wait a few minutes and make a GET /v1/wallets request for the Wallet you've just created. The API returns the Wallet with the emulated status.

Example

Let's take an example in which we'd like to simulate a Wallet closed by the User.

bash
curl -X POST {baseUrl}/v1/wallets \
	--header 'Authorization: Bearer {accessToken}' \
	--header 'Content-Type: application/json' \
	-d '{payload}'

With a {payload} containing the prefixed eventName:

json
{
    "walletTypeId": "10",
    "tariffId": 136,
    "userId": 100113410,
    "currency": "EUR",
    "eventName": "c.4Test Wallet"
}

The request returns the validated Wallet for now.

You need to retrieve the Wallet a few moments after the creation with the following request:

bash
curl -X GET {baseUrl}/v1/wallets/{WalletId} \
	--header 'Authorization: Bearer {accessToken}' \

The Wallet object returned is CANCELED, with the mocked codeStatus:

json
{
    "wallets": [
        {
            "walletId": 2643119,
            "walletTypeId": 9,
            "walletStatus": "CANCELED",
            "codeStatus": 120003,
            "informationStatus": "",
            "walletTag": "",
            "userId": 100113410,
            "userLastname": "Alex",
            "userFirstname": "Oak",
            "tariffId": 136,
            "eventName": "c.3test",
            "eventMessage": "",
            "contractSigned": 0,
            "bic": "TRZOFR21XXX",
            "iban": "FR7616798000010000264311929",
            "currency": "EUR",
            "createdDate": "2024-02-06 06:57:56",
            "modifiedDate": "2024-02-06 06:58:16",
            "payinCount": 0,
            "payoutCount": 0,
            "transferCount": 0,
            "solde": 0.0,
            "authorizedBalance": 0.0,
            "totalRows": 1,
            "country": "FR"
        }
    ]
}