Create an Account for a Consumer

Prev Next

Let's continue our flow with creating an account for the consumers we just created.

Same request we used for opening the account for the business will be used. Only the data filled in will be slightly different

Example request:

{
"program": "account_GBP",
   "merchant": "",
   "user": "22f55588-1234-4997-8a23-29c59223e6gbp",// we want to open an account for the consumer Jane Doe, so we are placing the unique token ID from the user creation request
   "main": "", // as we are not linking the account to another, field must be left blank
   "skip_iban_generation": false,// we want an IBAN to be generated if the program account_GBP allows it
   "alias": "Jane Does bonus account"
}

Example response:

{
   "code": 0,
   "data": {
      "program": "account_GBP",
      "token": "202f828a-c594-436d-b753-123456789123", // unique account token generated after creation
      "merchant": "",
      "user": "22f55588-1234-4997-8a23-29c59223e6gbp", // user token should be maching the one from the request
      "type": "default",
      "number": "0123456789",
      "is_main": true,
      "status": "active",
      "multicurrency": false,
      "balances": [
         {
            "available": 1.23,
            "blocked": 1.23,
            "currency": "GBP",
            "token": "338e7368-4800-40ad-a4db-2e3dgbp12349876", // unique balance token
            "iban": "GB31PATC4002115468108680", // the generated IBAN for the account
            "sort_code": "123456",
            "account_number": "12345678",
            "number": "0123456789",
            "is_main": true
         }
      ]
   }
}

Same as when we created an account for the business, we will receive information if the account was opened successfully and the requisites it has.