> For the complete documentation index, see [llms.txt](https://docs.finpay.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.finpay.id/api-reference/finpay-money/linkage/registration.md).

# Registration

### Registration Linkage

### E2E Flow <a href="#e2e-flow" id="e2e-flow"></a>

{% code title="Registration Linkage" %}

```mermaid
graph TD
    %% Flow 1: Left Side (Account Creation / Registration)
    A1([Partner Initiation]) --> B1{Has B2B Token?}
    B1 -- No --> C1[/Call B2B Token API/]
    C1 --> D1[/Call Creation API/]
    B1 -- Yes --> D1
    
    D1 --> E1[OTP will be sent to the user's phone number]
    E1 --> F1[/Call Verify OTP API/]
    F1 --> G1[Set New PIN WebView will be displayed to enter new PIN]
    G1 --> H1[/Enter new PIN via WebView/]

    %% Flow 2: Right Side (Account Binding / Verification)
    A2([Partner Initiation]) --> B2{Has B2B Token?}
    B2 -- No --> C2[/Call B2B Token API/]
    C2 --> D2[/Call Binding API/]
    B2 -- Yes --> D2
    
    D2 --> E2[Verify PIN WebView will be displayed to verify a PIN]
    E2 --> F2[/Enter PIN to verify an account/]

    %% Merging Flows into Shared Path
    H1 --> I[Redirection to deepLink with authCode included on the query parameter]
    F2 --> I
    
    I --> J[/Call B2B2C with authCode/]
    J --> K{If B2B2C Token Expired}
    
    K -- Yes --> L[/Call B2B2C with refreshToken/]
    K -- No --> M([Finished])
    L --> M

    %% Styling to reflect standard flowchart shapes
    style B1 fill:#fff,stroke:#fff,stroke-width:2px;
    style B2 fill:#fff,stroke:#fff,stroke-width:2px;
    style K fill:#fff,stroke:#fff,stroke-width:2px;
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.finpay.id/api-reference/finpay-money/linkage/registration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
