{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml","oas-openapi/api.yaml":"oas-openapi/api.yaml"},"props":{"metadata":{"markdoc":{"tagList":["openapi-code-sample","json-schema"]},"type":"markdown"},"seo":{"title":"3. Onboard a Customer","description":"Fondo is the ground breaking open finance platform that lets you focus on what matters","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":["openapi"],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"3-onboard-a-customer","__idx":0},"children":["3. Onboard a Customer"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["End-customer onboarding (identity verification, KYC, account signing) is handled through ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["journeys"]}," — secure, hosted web flows. You create a journey via the API and redirect the customer to the returned URL. Read more about journeys in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/api-guide/journeys"},"children":["Web Flows for End-Customer Actions"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"natural-person-private-individual","__idx":1},"children":["Natural person (private individual)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createAccount"]}," journey. Redirect the customer to the returned ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url"]}," — Fondo handles BankID verification, PEP/sanctions screening, and account agreement signing."]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"oas-openapi/api.yaml","operationId":"postJourney","parameters":{},"environments":{}},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"legal-entity-company","__idx":2},"children":["Legal entity (company)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A similar journey, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createLegalEntityAccount"]}," journey type is used for companies. Fondo automatically retrieves verified company data and authorized signatory combinations based on the organisation number provided during the journey."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The resulting account will have an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["owner"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ownerType: \"legal_entity\""]}," including ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["crn"]},", and additional entity details."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"tracking-journey-progress","__idx":3},"children":["Tracking journey progress"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Poll the journey or listen for callbacks. Journey status progresses: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["new"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pending"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["complete"]}," (or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["canceled"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expired"]},")."]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"oas-openapi/api.yaml","operationId":"getJourney","parameters":{},"environments":{}},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["On completion, the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result"]}," object contains the created account ID, account type, and service type."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"journey-schema","__idx":4},"children":["Journey schema"]},{"$$mdtype":"Tag","name":"JsonSchema","attributes":{"schema":{"$ref":"../../../openapi/models/journey/journey_base.yaml"},"options":{},"schemaResolved":{"openapi":"3.1.0","components":{"schemas":{"__root":{"$ref":"#/components/schemas/journey_base"},"uuid":{"$id":"/models/uuid.yaml","title":"UUID","type":"string","example":"49ad7378-121c-4a53-9894-dfd14a7b4877","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"journey_sign_withdrawal":{"$id":"/models/journey/journey_sign_withdrawal.yaml","title":"signWithdrawal","required":["payment"],"additionalProperties":false,"description":"Let end user sign an insurance withdrawal request.\n","properties":{"payment":{"$ref":"#/components/schemas/uuid","description":"Fondo paymentId. (usually located on cashTransaction.ref for withdrawals)\n"},"journeyType":{"type":"string","title":"signWithdrawal","enum":["signWithdrawal"]}}},"legal_entity_account_types":{"$id":"/models/shared/legal_entity_account_types.yaml","title":"Legal Entity Account Types","type":"array","description":"insurance - Endowment Insurance\ndepot - Depot\n","minItems":1,"items":{"type":"string","enum":["insurance","depot"]}},"required_account_categories":{"$id":"/models/shared/required_account_categories.yaml","title":"Required Account Categories","type":"array","description":"MiFID II investor classification.\n\n- `pro` — Professional investor (MiFID II)\n- `retail` — Retail investor, protected by consumer protection regulations (MiFID II)\n","minItems":1,"items":{"type":"string","description":"- `pro` — Professional investor (MiFID II)\n- `retail` — Retail investor, protected by consumer protection regulations (MiFID II)\n","enum":["pro","retail"]}},"legal_entity_account_options":{"$id":"/models/shared/legal_entity_account_options.yaml","title":"Legal Entity Account Options","type":"object","description":"Application payload data for legal entity accounts","additionalProperties":false,"required":["accountTypes","serviceTypes","accountCategories","ownerType"],"properties":{"serviceTypes":{"type":"array","minItems":1,"items":{"type":"string","enum":["portfolioManagement","investmentAdvise","executionOnly"]}},"accountTypes":{"$ref":"#/components/schemas/legal_entity_account_types"},"accountCategories":{"$ref":"#/components/schemas/required_account_categories"},"ownerType":{"type":"string","enum":["legal_entity"]}}},"journey_create_legal_entity_account":{"$id":"/models/journey/journey_create_legal_entity_account.yaml","title":"createLegalEntityAccount","required":["accountOptions","journeyType"],"additionalProperties":false,"description":"Let end user complete an application process\n","properties":{"journeyType":{"type":"string","title":"createLegalEntityAccount","enum":["createLegalEntityAccount"]},"accountOptions":{"$ref":"#/components/schemas/legal_entity_account_options"}}},"ssn":{"$id":"/models/ssn.yaml","title":"SSN (Social Security Number)","type":"string","pattern":"^(19|20)[0-9]{2}(0[1-9]|1[0-2])(0[1-9]|[12][0-9]|3[01])[0-9]{4}$","example":"197001010003"},"journey_sign_submission":{"$id":"/models/journey/journey_sign_submission.yaml","title":"signSubmission","required":["submission","ssn"],"additionalProperties":false,"description":"Let end user sign a submission\n","properties":{"submission":{"allOf":[{"$ref":"#/components/schemas/uuid"},{"description":"Fondo application. E.g. a legal-entity signing a new account\n"}]},"ssn":{"allOf":[{"$ref":"#/components/schemas/ssn"},{"description":"Social security number of signer"}]},"journeyType":{"type":"string","title":"signSubmission","enum":["signSubmission"]}}},"journey_add_bank_account":{"$id":"/models/journey/journey_add_bank_account.yaml","title":"addBankAccount","required":["account","journeyType"],"additionalProperties":false,"description":"Let end-user connect bank account that will be\nvalidated (usable for withdrawals).\nOptionally: ask for autogiro-mandate.\nMandates have a lead time for at least one bank day\n","properties":{"account":{"allOf":[{"$ref":"#/components/schemas/uuid"},{"description":"Fondo account"}]},"autogiro":{"type":"object","required":["enforce"],"properties":{"enforce":{"description":"Autogiro mandate signing requirement:\n- `required` — End customer must sign an autogiro mandate\n- `optional` — End customer may choose to sign an autogiro mandate\n- `none` — No autogiro mandate option is presented\n","oneOf":[{"type":"string","enum":["required"],"title":"required","description":"User MUST sign autogiro mandate"},{"type":"string","enum":["optional"],"title":"optional","description":"User may choose to sign autogiro mandate"},{"type":"string","enum":["none"],"title":"none","description":"User have no option to sign autogiro mandate."}]},"forceNewBankAccount":{"type":"boolean","description":"Defaults to false.\nIf *set to false* and autogiro enforce is set to required or optional,\nthe end-user may select an existing account to connect to autogiro\ninstead of connecting a new account.\n\nIf *set to true* and autogiro enforce is set to required or\noptional, force the end-user to connect a new bankAccount\nirrespective of if old accounts exists.\n"}}},"journeyType":{"type":"string","title":"addBankAccount","enum":["addBankAccount"]}}},"journey_kyc_renewal":{"$id":"/models/journey/journey_kyc_renewal.yaml","title":"kycRenewal","required":["account","journeyType"],"additionalProperties":false,"properties":{"account":{"$ref":"#/components/schemas/uuid","description":"Fondo account"},"journeyType":{"type":"string","title":"kycRenewal","enum":["kycRenewal"]}}},"instrument_allocation_item":{"$id":"/models/allocationplan/shared/instrument_allocation_item.yaml","title":"InstrumentAllocationItem","type":"object","required":["instrument","allocation"],"properties":{"instrument":{"description":"Instrument ID","type":"string","example":"SE0000810798SEK"},"allocation":{"type":"number","example":100,"description":"Allocation in percent for this instrument"}}},"journey_update_allocation_plan":{"$id":"/models/journey/journey_update_allocation_plan.yaml","title":"updateAllocationPlan","required":["account","journeyType"],"additionalProperties":false,"properties":{"journeyType":{"type":"string","title":"updateAllocationPlan","enum":["updateAllocationPlan"]},"account":{"$ref":"#/components/schemas/uuid","description":"Fondo account"},"paymentAccount":{"type":"object","description":"The details of the bank account to charge from (autogiro)","required":["iban"],"properties":{"iban":{"type":"string","description":"IBAN (ISO 13616, International Bank Account Number)","example":"SE7280000810340009783242"}}},"allocationPlan":{"type":"object","description":"The new allocation plan. If provided, replaces the existing instruments and allocations.","required":["instruments"],"properties":{"instruments":{"description":"Instrument allocations. The sum of all allocations must be exactly 100.","type":"array","example":[{"instrument":"SE0000810798SEK","allocation":100}],"items":{"$ref":"#/components/schemas/instrument_allocation_item"}}}}}},"journey_update_savings_plan":{"$id":"/models/journey/journey_update_savings_plan.yaml","title":"updateSavingsPlan","required":["account","journeyType"],"additionalProperties":false,"description":"Let end user create, update, or cancel a savings plan for an account.\n","properties":{"journeyType":{"type":"string","title":"updateSavingsPlan","enum":["updateSavingsPlan"]},"account":{"$ref":"#/components/schemas/uuid","description":"Fondo account"},"instruments":{"description":"Instruments available for the savings plan.\nIf omitted, the end user may choose from all instruments in the client universe.\n","type":"array","items":{"type":"object","required":["instrument"],"additionalProperties":false,"properties":{"instrument":{"type":"string","description":"Instrument ID"}}}}}},"optional_account_categories":{"$id":"/models/shared/optional_account_categories.yaml","title":"Optional Account Categories","description":"MiFID II investor classification. If the client permissions allows both pro and retail customers, this must be set.\nIt must never exceed the permissions on the client.\n\n- `pro` — Professional investor (MiFID II)\n- `retail` — Retail investor, protected by consumer protection regulations (MiFID II)\n","type":"array","items":{"type":"string","description":"- `pro` — Professional investor (MiFID II)\n- `retail` — Retail investor, protected by consumer protection regulations (MiFID II)\n","enum":["pro","retail"]}},"deposit_type":{"$id":"/models/allocationplan/shared/deposit_type.yaml","title":"DepositType","description":"How to deposit cash to account","oneOf":[{"description":"Autogiro","type":"string","enum":["autogiro"],"title":"autogiro"},{"description":"Direct transfer via bank","type":"string","enum":["bank_transfer"],"title":"bank_transfer"},{"description":"Swish payment","type":"string","enum":["swish"],"title":"swish"}]},"periodicity":{"$id":"/models/allocationplan/shared/periodicity.yaml","title":"Periodicity","description":"When to allocate","oneOf":[{"description":"Once per month allocation","type":"string","enum":["monthly"],"title":"monthly"},{"description":"Once per week allocation","type":"string","enum":["weekly"],"title":"weekly"},{"description":"allocate every bank day","type":"string","enum":["daily"],"title":"daily"},{"description":"direct","type":"string","enum":["direct"],"title":"direct"}]},"transfer":{"title":"Transfer","description":"Transfer configuration from 3rd party institution into newly created Fondo Account.\nIf defined, the transfer screen is shown.\nIf `null` the transfer view will not be shown.\n","type":["object","null"],"required":["enforce","transfers"],"properties":{"enforce":{"type":"string","enum":["required","optional"],"description":"Controls whether the end user can skip the transfer step.\n`required` means the end user must complete the transfer step.\n`optional` means the end user may skip the transfer step.\n"},"transfers":{"description":"List of custodians and their accounts to transfer from.\nThe custodian is always readonly. Account numbers, when provided, are readonly.\n","type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["custodian","accounts"],"properties":{"custodian":{"$ref":"#/components/schemas/uuid","description":"ID matching a custodian."},"accounts":{"type":"array","description":"Accounts at this custodian. Each account is either known (accountNumber set)\nor unknown (accountNumber null, end user enters it).\n","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["accountNumber","required","defaultUnitsOutput","balanceOutput","closeAccountAndSavingsplans","sourceAccountType","untransferableUnitsOutput","allowInstrumentSelection"],"if":{"properties":{"accountNumber":{"type":"string"}}},"then":{"properties":{"sourceAccountType":{"maxItems":1}}},"properties":{"accountNumber":{"type":["string","null"],"description":"Account number at the custodian. Readonly when provided.\nIf `null`, the end user enters the account number.\nAt most one `null` account number is allowed per custodian across all transfer entries.\n","example":"1223456789"},"sourceAccountType":{"type":"array","minItems":1,"items":{"type":"string","enum":["isk","depot","insurance"]},"description":"Allowed source account types at the custodian.\nA single entry locks the type; multiple entries let the end user pick.\nEach entry must be one of the journey's `accountTypes`.\nLocked to one entry when `accountNumber` is provided.\n"},"closeAccountAndSavingsplans":{"type":["boolean","null"],"description":"Should the custodian close the account and corresponding savingsplans\nafter the transfer is complete?\nIf \"null\", the user must decide.\n"},"required":{"type":"boolean","description":"If true, the end user must complete this transfer.\nIf false, the end user may deselect this transfer.\n"},"untransferableUnitsOutput":{"description":"If units are selected as output of unit transfer - what to transfer as if the transfer fails.\nI.e. the instrument does not exist in universe or trading is stopped.\nIf a single entry, the behavior is locked.\nIf multiple entries, the end user picks.\n`cash` — sell and transfer as cash.\n`ignore` — leave them.\n","type":"array","minItems":1,"items":{"type":"string","enum":["cash","ignore"]}},"defaultUnitsOutput":{"type":"array","description":"What to do with instruments not listed in `instruments`.\nIf a single entry, the behavior is locked.\nIf multiple entries, the end user picks.\n`cash` — sell and transfer as cash.\n`units` — transfer as units.\n`ignore` — leave them.\n","minItems":1,"items":{"type":"string","enum":["cash","units","ignore"]}},"balanceOutput":{"type":"array","description":"What to do with the account's cash balance.\nIf a single entry, the behavior is locked.\nIf multiple entries, the end user picks.\n`cash` — transfer the cash balance.\n`ignore` — leave it.\n","minItems":1,"items":{"type":"string","enum":["cash","ignore"]}},"allowInstrumentSelection":{"type":"boolean","description":"Should the end user be able to add specific instruments to transfer?\n"},"instruments":{"type":"array","description":"Specific instruments to transfer from this account.\nIf omitted, all instruments are handled by `defaultUnitsOutput`.\n","items":{"type":"object","additionalProperties":false,"required":["id","unitType","outputType"],"if":{"properties":{"unitType":{"not":{"contains":{"const":"partial"}}}}},"then":{"properties":{"units":{"type":"null"}}},"properties":{"id":{"type":"string","description":"Instrument ID (ISIN + currency).","example":"SE0000810798SEK"},"unitType":{"type":"array","description":"If a single entry, the behavior is locked.\nIf multiple entries, the end user picks.\n`full` — all units of this instrument.\n`partial` — a specific number of units.\n","minItems":1,"items":{"type":"string","enum":["full","partial"]}},"outputType":{"type":"array","description":"If a single entry, the behavior is locked.\nIf multiple entries, the end user picks.\n`cash` — sell and transfer as cash.\n`units` — transfer as units.\n","minItems":1,"items":{"type":"string","enum":["cash","units"]}},"units":{"type":["number","null"],"description":"Number of units to transfer.\nOnly applicable when `unitType` includes `partial`.\nIf omitted, the end user enters the amount.\n"}}}}}}}}}}}},"create_account":{"$id":"/models/journey/createAccount/create_account.yaml","title":"createAccount","required":["accountTypes","accountServiceType","journeyType"],"additionalProperties":false,"not":{"allOf":[{"required":["allocationPlan"],"properties":{"allocationPlan":{"type":"object"}}},{"required":["savingsPlan"],"properties":{"savingsPlan":{"type":"object"}}}]},"properties":{"journeyType":{"type":"string","title":"createAccount","enum":["createAccount"]},"welcomeScreen":{"description":"Optional custom welcome screen.\nCurrently only available when transfer is set.\n\n- `transfer` — only allowed in combination with populated transfer field\n","type":"string","enum":["transfer"]},"email":{"type":["string","null"],"format":"email","description":"end user email address","example":"enduser@endUserDomain.com"},"accountName":{"type":"string","maxLength":500,"description":"If not provided, the end-user will be asked to select accountName. If provided, the accountName will not be visible to the customer in this journey."},"accountTypes":{"type":"array","description":"Allowed account types","items":{"enum":["isk","depot","insurance"]}},"accountServiceType":{"description":"Account service type","type":"string","title":"accountServiceType","enum":["portfolioManagement","investmentAdvise","executionOnly"]},"accountCategories":{"$ref":"#/components/schemas/optional_account_categories"},"allocationPlan":{"description":"Setup an allocation plan for the account. Deposits will allocate based on this plan.\nIf `null` the view will not be shown\n","type":["object","null"],"required":["instruments"],"properties":{"depositType":{"$ref":"#/components/schemas/deposit_type"},"periodicity":{"$ref":"#/components/schemas/periodicity"},"paymentAccount":{"type":"object","description":"The details of the bank account to charge from (autogiro)","properties":{"iban":{"type":"string","description":"IBAN (ISO 13616, International Bank Account Number)","example":"SE7280000810340009783242"}}},"instruments":{"description":"Instrument allocations. The sum of all allocations must be exactly 100.","type":"array","example":[{"instrument":"SE0000810798SEK","allocation":100}],"items":{"$ref":"#/components/schemas/instrument_allocation_item"}}}},"savingsPlan":{"description":"Enable savings plan setup during account creation.\nUser will configure instruments and amounts in the UI.\nIf `null` the view will not be shown.\n","type":["object","null"],"required":["periodicity"],"properties":{"periodicity":{"type":"string","enum":["monthly"]},"instruments":{"description":"Instruments available for the savings plan.\nIf omitted, the end user may choose from all instruments in the client universe.\n","type":"array","items":{"type":"object","required":["instrument"],"additionalProperties":false,"properties":{"instrument":{"type":"string","description":"Instrument ID"}}}}}},"kycs":{"description":"Valid Know Your Customer answers used to prefill the options in the journey.","type":["array","null"],"items":{"type":"object","required":["qid","answer"],"properties":{"qid":{"description":"Fondo ID of the question","example":"money_origin","type":"string"},"answer":{"description":"Answer","example":"lön/pension","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array"},{"type":"object"}]}}}},"transfer":{"$ref":"#/components/schemas/transfer"}}},"ulid":{"$id":"/models/ulid.yaml","title":"ULID","type":"string","description":"ULID (Universally Unique Lexicographically Sortable Identifier)","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-9a-zA-Z]{26}$","readOnly":true},"status":{"title":"Account status","type":"string","description":"- `pending` — Account created, waiting for approval\n- `active` — Account is open and operational\n- `rejected` — Account application was rejected\n- `confirm` — Account is awaiting confirmation from the end customer\n- `closing` — Account is being closed; new orders, payments and withdrawals are not accepted\n","enum":["pending","active","rejected","confirm","closing"]},"accountType":{"title":"Account type","type":"string","description":"- `isk` — ISK, investeringssparkonto\n- `depot` — Depot, fonddepå\n- `insurance` — Endowment insurance, kapitalförsäkring. Requires the user to sign separately with the insurance provider.\n","enum":["isk","depot","insurance"]},"serviceType":{"title":"Account service type","type":"string","description":"- `portfolioManagement` — Portfolio management\n- `investmentAdvise` — Investment advice\n- `executionOnly` — Execution only\n","enum":["portfolioManagement","investmentAdvise","executionOnly"]},"journey_base":{"$id":"/models/journey/journey_base.yaml","title":"journey","type":"object","additionalProperties":false,"description":"A `Journey` is a web journey for interacting with Fondo functionality, such as setting up an account.\nThe callback at the partner will be called with status of the journey, such as when it is completed or aborted due to end-user decision or error.\nThe callback information will also be sent over websocket if active.\n\nThe scope parameter can be any value and used to keep state on partners end.\n\nThe callback will be retried for any other status code than `200`.\n\nTo ensure it is Fondo calling the callback URL, use the `scope` parameter to match.\nFondo will also provide the IP address used from Fondos side.\n","required":["journey","callbackUrl","scope"],"properties":{"type":{"x-internal":true,"description":"Type of journey.\nMirrors the journey.journeyType\n","type":"string"},"status":{"readOnly":true,"description":"- `new` — Journey created but not yet opened by the end customer\n- `pending` — End customer has opened the journey and is in progress\n- `canceled` — End customer aborted the journey\n- `error` — An error occurred during the journey\n- `complete` — Journey completed successfully\n- `expired` — Journey URL expired before completion\n","oneOf":[{"description":"New, journey not yet activated","type":"string","readOnly":true,"enum":["new"],"title":"new"},{"description":"Pending, journey in progress","type":"string","readOnly":true,"enum":["pending"],"title":"pending"},{"description":"Canceled, end-user aborted","type":"string","readOnly":true,"enum":["canceled"],"title":"canceled"},{"description":"Expired, TTL exceeded","type":"string","readOnly":true,"enum":["expired"],"title":"expired"},{"description":"Error, an error occured during the journey","type":"string","readOnly":true,"enum":["error"],"title":"error"},{"description":"Complete, journey is completed","type":"string","readOnly":true,"enum":["complete"],"title":"complete"}]},"id":{"description":"The ID of web journey.","allOf":[{"$ref":"#/components/schemas/uuid"},{"readOnly":true}]},"clientId":{"description":"The ID of requested client.","allOf":[{"$ref":"#/components/schemas/uuid"},{"readOnly":true}]},"url":{"readOnly":true,"type":"string","description":"journey url","example":"https://webbo.fondo.se/dT7KlfoMrjOspMBvyAq2bvD8cSSAVZg50bAh8G8U6z4nNPRHAy"},"expiryDate":{"readOnly":true,"type":"string","format":"date-time","description":"Date when journey token is considered stale","example":"2018-12-13T23:59:00.001Z"},"journey":{"type":"object","required":["journeyType"],"oneOf":[{"$ref":"#/components/schemas/journey_sign_withdrawal"},{"$ref":"#/components/schemas/journey_create_legal_entity_account"},{"$ref":"#/components/schemas/journey_sign_submission"},{"$ref":"#/components/schemas/journey_add_bank_account"},{"$ref":"#/components/schemas/journey_kyc_renewal"},{"$ref":"#/components/schemas/journey_update_allocation_plan"},{"$ref":"#/components/schemas/journey_update_savings_plan"},{"$ref":"#/components/schemas/create_account"}]},"sortedId":{"$ref":"#/components/schemas/ulid","readOnly":true},"createdDate":{"type":"string","format":"date-time","description":"Date when acocunt was created","example":"2018-12-13T23:59:00.001Z","readOnly":true},"modifiedDate":{"type":"string","format":"date-time","description":"Date when last modified","example":"2018-12-13T23:59:00.001Z","readOnly":true},"deleted":{"description":"True if the journey is deleted","type":"boolean","readOnly":true},"deletedDate":{"readOnly":true,"type":["string","null"],"format":"date-time","description":"Date when last modified","example":"2018-12-13T23:59:00.001Z"},"submission":{"description":"optional submission id.\nMay be created in legal entity journeys.\nMay be fetched on separate GET /submission/:id route\n","oneOf":[{"$ref":"#/components/schemas/uuid"},{"type":"null"}]},"callbackUrl":{"type":"string","description":"URL that receives a POST request when the journey status changes to canceled, error, or complete.\nThe payload includes the journey id, status, and scope.\nMust use https in production.\n","example":"https://api.habibisfonder.se/v1/fondo/callback"},"redirectUrl":{"type":["string","null"],"description":"Passed to BankID as the redirect target after mobile signing completes.\nSet this to a deep link (e.g. customerApp:///) so BankID returns the user to your app instead of the webview.\nNot needed for web-only integrations.\n","example":"customerApp:///"},"completionRedirectUrl":{"type":["string","null"],"description":"URL the browser is redirected to once the journey completes successfully.\nCan be an http(s) URL or a custom-scheme deep link (e.g. `myapp://done`) for native-app handoff.\n","example":"https://partner.example/onboarding-done"},"errorCode":{"readOnly":true,"type":["string","null"],"description":"Any errors occurring during journey"},"context":{"type":["string","null"],"description":"Where end-user exited the journey. On error on cancel, if applicable.","example":"createaccountsign"},"scope":{"maxLength":768,"type":["string","null"],"description":"BASE64 encoded partner specific data attached to the journey, such as encrypted data containing session information. It will be passed back to callback."},"result":{"type":["object","null"],"description":"Result of journey","oneOf":[{"title":"createAccount result","properties":{"journeyType":{"type":"string","enum":["createAccount"]},"account":{"description":"account created in journey","type":"object","additionalProperties":false,"properties":{"id":{"$ref":"#/components/schemas/uuid","description":"id of account"},"status":{"$ref":"#/components/schemas/status"},"accountType":{"$ref":"#/components/schemas/accountType"},"serviceType":{"$ref":"#/components/schemas/serviceType"}}},"bankAccounts":{"description":"Payment accounts registered with allocation plan or savings plan","type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"$ref":"#/components/schemas/uuid","description":"id of payment account"},"status":{"description":"Mandate status of the payment account\n- `pending` — Pending verification\n- `rejected` — Rejected\n- `active` — Active, ready for withdrawals\n","type":"string","enum":["pending","rejected","active"]},"iban":{"type":"string","description":"IBAN (ISO 13616, International Bank Account Number)","example":"SE7280000810340009783242"}}}},"transfers":{"description":"If transfers from other custodian was created, the results are provided here. One item per account.","type":"array","items":{"type":"object","properties":{"custodian":{"$ref":"#/components/schemas/uuid","description":"ID matching an institution."},"account":{"type":"string","description":"Account number at institution","example":"1223456789"}}}},"allocationPlan":{"description":"If an allocationPlan was created. The results are provided here\n","type":"object","properties":{"id":{"$ref":"#/components/schemas/uuid","description":"id of allocation plan"},"paymentAccount":{"type":"object","description":"The details of the bank account to charge from (autogiro)","properties":{"id":{"$ref":"#/components/schemas/uuid","description":"id of payment account"},"iban":{"type":"string","description":"IBAN (ISO 13616, International Bank Account Number)","example":"SE7280000810340009783242"}}},"instruments":{"description":"Instrument allocations. The sum of all allocations must be exactly 100.","type":"array","example":[{"instrument":"SE0000810798SEK","allocation":100}],"items":{"$ref":"#/components/schemas/instrument_allocation_item"}}}},"savingsplan":{"description":"If a savings plan was created. The results are provided here\n","type":"object","properties":{"id":{"$ref":"#/components/schemas/uuid","description":"id of savings plan"},"paymentAccountId":{"$ref":"#/components/schemas/uuid","description":"id of payment account used for autogiro"},"periodicity":{"type":"string","enum":["monthly"]},"day":{"type":"number","description":"Day of the month to allocate","minimum":1,"maximum":31},"instruments":{"description":"Instrument allocations with fixed amounts","type":"array","items":{"type":"object","properties":{"instrument":{"type":"string","description":"Instrument ID"},"amount":{"type":"number","description":"Amount in SEK","minimum":1}}}}}}}},{"title":"updateAllocationPlan result","properties":{"journeyType":{"type":"string","enum":["updateAllocationPlan"]},"allocationPlan":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/uuid","description":"Fondo account id"},"instruments":{"description":"Updated instrument allocations. The sum of all allocations must be exactly 100.","type":"array","items":{"$ref":"#/components/schemas/instrument_allocation_item"}},"paymentAccount":{"type":"object","description":"The details of the bank account to charge from (autogiro)","properties":{"id":{"$ref":"#/components/schemas/uuid","description":"id of payment account"}}}}}}},{"title":"updateSavingsPlan result","properties":{"journeyType":{"type":"string","enum":["updateSavingsPlan"]},"savingsplan":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/uuid","description":"id of savings plan"},"paymentAccountId":{"$ref":"#/components/schemas/uuid","description":"id of payment account used for autogiro"},"startDate":{"type":"string","format":"date-time","description":"Date when the savings plan starts"},"instruments":{"description":"Instrument allocations with fixed amounts","type":"array","items":{"type":"object","properties":{"instrument":{"type":"string","description":"Instrument ID"},"amount":{"type":"number","description":"Amount in SEK","minimum":1}}}}}}}},{"title":"signSubmission result","properties":{"journeyType":{"type":"string","enum":["signSubmission"]},"submission":{"type":"object","properties":{"submission":{"$ref":"#/components/schemas/uuid","description":"id of the signed submission"}}}}},{"title":"createLegalEntityAccount result","properties":{"journeyType":{"type":"string","enum":["createLegalEntityAccount"]},"submission":{"type":"object","properties":{"submission":{"$ref":"#/components/schemas/uuid","description":"id of the signed submission"}}}}},{"title":"kycRenewal result","additionalProperties":false,"properties":{"journeyType":{"type":"string","enum":["kycRenewal"]}}},{"title":"addBankAccount result","additionalProperties":false,"properties":{"journeyType":{"type":"string","enum":["addBankAccount"]}}}]}}}}}},"schemaResolvedErrors":[]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next:"]}," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/api-guide/getting-started/deposits"},"children":["Deposits"]}]}]},"headings":[{"value":"3. Onboard a Customer","id":"3-onboard-a-customer","depth":1},{"value":"Natural person (private individual)","id":"natural-person-private-individual","depth":2},{"value":"Legal entity (company)","id":"legal-entity-company","depth":2},{"value":"Tracking journey progress","id":"tracking-journey-progress","depth":2},{"value":"Journey schema","id":"journey-schema","depth":3}],"frontmatter":{"seo":{"title":"3. Onboard a Customer"}},"lastModified":"2026-04-14T12:45:03.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/api-guide/getting-started/onboard-customer","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}