Sub-account

Resources

A sub-account is an account associated to a user, it allows to isolate transactions on an account. Sub-accounts have their own balance.

Access to sub-accounts:
-  Access to sub-accounts of the connected user
/api/subaccounts/

or
-  Access to sub-account of the user belonging to the connected third-party application
/api/[domaine_partenaire]/users/userid/subaccounts/

Property Type Example Description
id Long 225 Account identifier
AppAccountId String “123” Account identifier of the third-party application
DisplayName String “Sous compte” Display name
Amount Int 100 Account name (in cents)
isDefault Bool False Indicate if it is the main account of the user
CreationDate DateTime 2013-09-29T00:00:00 Account creation date

Create a sub-account

To create a sub-account, please have a look at the example in the right margin.

Retrieve the list of sub-accounts

In order to retrieve the list of sub-accounts, please have a look at the example in the right margin.

Retrieve a sub-account

If the AppAccountId was provided at the creation of the sub-account, the AppAccountId alone can be used to refer to a particular sub-account.

Otherwise, the ID can be used as well. To do it, please have a look at the example in the right margin of this page.

Edit a sub-account

To edit a sub-account’s name, please have a look at the example in the right margin of this page.

Error case

HTTP code Error code Explication
404 513 Sub-account cannot be found

Delete a sub-account

To delete a sub-account, please have a look at the example in the right margin of this page.

Error case

HTTP code Error code Explication
404 513 Sub-account cannot be found