> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dolfinai.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create payment account onboarding link

> Returns a short-lived Stripe-hosted onboarding URL. The Client redirects the SMB to this URL; Stripe collects KYC and redirects back to the supplied ReturnUrl. Use this as an alternative to the embedded-components session when the Client does not want to embed Stripe.js. The returned link is single-use and expires; call this endpoint each time onboarding resumes.



## OpenAPI

````yaml /api-reference/openapi.json post /organisations/{id}/payment-account/link
openapi: 3.1.1
info:
  title: Dolfin API
  description: >-
    Dolfin API for AR & AP. Authenticate using the `x-dolfin-api-key` header
    with the API key distributed to your organisation.
  version: v1
servers:
  - url: https://api.dolfinai.co
    description: Production
security:
  - {}
tags:
  - name: Webhooks
  - name: Users
  - name: TaxRates
  - name: Suppliers
  - name: Supplier Credit Notes
  - name: Bills
  - name: SpendCategories
  - name: Payables
  - name: RecurringInvoices
  - name: Receivables
  - name: Purchase Orders
  - name: Products
  - name: Payments
  - name: Invoices
  - name: Organisations
  - name: Members
  - name: MCP
  - name: Matching
  - name: Invoice Reminders
  - name: Industries
  - name: Gmail
  - name: Delivery Notes
  - name: Customers
  - name: Currencies
  - name: Credit Notes
  - name: Clients
  - name: ClientInvites
  - name: BankPayments
  - name: Bank details
  - name: Auth
  - name: ApprovalPolicies
  - name: ApiKeys
  - name: Agent
paths:
  /organisations/{id}/payment-account/link:
    post:
      tags:
        - Payments
      summary: Create payment account onboarding link
      description: >-
        Returns a short-lived Stripe-hosted onboarding URL. The Client redirects
        the SMB to this URL; Stripe collects KYC and redirects back to the
        supplied ReturnUrl. Use this as an alternative to the
        embedded-components session when the Client does not want to embed
        Stripe.js. The returned link is single-use and expires; call this
        endpoint each time onboarding resumes.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentAccountLinkRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentAccountLinkResponse'
        '400':
          description: >-
            PaymentAccountLink.MissingReturnUrl — ReturnUrl is required


            PaymentAccountLink.InvalidReturnUrl — ReturnUrl must be a valid
            absolute http(s) URL


            PaymentAccountLink.MissingRefreshUrl — RefreshUrl is required


            PaymentAccountLink.InvalidRefreshUrl — RefreshUrl must be a valid
            absolute http(s) URL
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: >-
            Payment.Forbidden — caller does not have permission to configure
            payments for this organisation
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: >-
            Organisation.NotFound — the organisation does not exist or could not
            be resolved
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '409':
          description: >-
            PaymentAccount.NotEnabled — organisation does not have a payment
            account; enable it first


            PaymentAccount.Disconnected — payment account is disconnected; reset
            the integration and re-run onboarding
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '502':
          description: >-
            PaymentAccount.ProviderError — Stripe returned an error while
            creating the account link
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    CreatePaymentAccountLinkRequest:
      required:
        - returnUrl
        - refreshUrl
      type: object
      properties:
        returnUrl:
          type: string
        refreshUrl:
          type: string
    PaymentAccountLinkResponse:
      required:
        - url
      type: object
      properties:
        url:
          type: string
        expiresAt:
          type: string
          format: date-time
    ProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string

````