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

# Update Bridge Integration Status

> Updates the Bridge integration status. Supports two main operations:
1. Opt-in to Bridge (status: "OPTED_IN") - Creates KYC link for organization onboarding
2. Create Virtual Account (status: "READY_FOR_DEPOSIT") - Creates virtual account after KYC approval




## OpenAPI

````yaml openapi/stellar-disbursement-platform/bundled.yaml PATCH /bridge-integration
openapi: 3.1.0
info:
  title: Stellar Disbursement Platform API
  version: 7.0.0
  summary: >-
    The Stellar Disbursement Platform (SDP) is a tool built for organizations to
    make bulk payments to a group of recipients over the Stellar network.
  description: >
    The Stellar Disbursement Platform (SDP) is a tool built for organizations to
    make bulk payments to a group of recipients over the Stellar network.


    This is an open-source project that is built on top of the Stellar network,
    and the code can be found on the following repositories:


    -
    [stellar/stellar-disbursement-platform-backend](https://github.com/stellar/stellar-disbursement-platform-backend):
    This repository contains the backend and infrastructure code for the Stellar
    Disbursement Platform.

    -
    [stellar/stellar-disbursement-platform-frontend](https://github.com/stellar/stellar-disbursement-platform-frontend):
    This repository contains the web frontend code for the Stellar Disbursement
    Platform.

    -
    [stellar/helm-charts](https://github.com/stellar/helm-charts/tree/main/charts/stellar-disbursement-platform):
    This repository contains the Helm chart for deploying the Stellar
    Disbursement Platform using Kubernetes.
  termsOfService: https://stellar.org/terms-of-service
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: ''
security: []
tags:
  - name: Admin
    x-displayName: Admin (Tenant Management)
    description: >-
      The Admin API oversees the management of tenants within the system,
      facilitating tasks such as provisioning new tenants, updating their
      information, and retrieving tenant data.
  - name: Authentication
    description: >-
      Authentication controls the log in/log out process for all SDP users, as
      well as the token refresh process. Authentication uses a JWT approach
      signed with an ES256 private key.
  - name: API Keys
    description: >-
      API Keys functionality allows to create access key with granular
      permissions and resource management.
  - name: Balances
    description: >-
      Endpoints related to balances. A balance is an amount of a particular
      asset held by an organization, tenant, or account.
  - name: Bridge Integration
    description: >
      Bridge integration endpoints for connecting organizations with Bridge
      services.


      **Integration Flow:**

      1. Organization opts into Bridge (OPTED_IN status)

      2. Complete KYC verification process via Bridge

      3. Create virtual account for USD deposits (READY_FOR_DEPOSIT status)

      4. Receive USD deposits that are automatically converted to USDC on
      Stellar


      **Status Description:**

      - NOT_ENABLED → Bridge service not configured

      - NOT_OPTED_IN → Organization hasn't opted in

      - OPTED_IN → Organization opted in, KYC link created

      - READY_FOR_DEPOSIT → Virtual account created, ready for deposits

      - ERROR → Integration error occurred
  - name: Disbursements
    description: >-
      Endpoints related to disbursements. A disbursement is a group of payments
      sent to multiple individuals at once. An SDP user with the appropriate
      role triggers a new disbursement through the SDP dashboard by uploading a
      list of receivers and amounts. When the receiver has linked their wallet
      to the SDP, the payment automatically begins. SDP users can track their
      disbursements in real-time through the SDP dashboard. Each disbursement
      must have a unique name defined by the organization.
  - name: Distribution Wallets
    description: >
      Endpoints related to distribution accounts (the Stellar accounts a tenant
      sends funds from). A tenant starts with a single account, created when the
      tenant is provisioned, which is marked as the default. Tenants using the
      `DISTRIBUTION_ACCOUNT.STELLAR.DB_VAULT` account type can hold up to 20,
      and Owners can add more at any time.


      Access to an account is granted per user and is separate from the user's
      role: both are required to act on an account. API keys need the
      `read:distribution_wallets` or `write:distribution_wallets` permission,
      and the Owner-only operations additionally require that the key was
      created by an Owner, so permissions alone are not sufficient. Accounts are
      archived rather than deleted, so past disbursements and payments keep
      pointing at the account that sent them.
  - name: Organization
    description: >-
      Organization endpoints manage the process of getting and updating
      organizational profile information. The organization's profile has basic
      information set at the time of SDP deployment. It can be modified by the
      Owner. Organizations can also manage their preferences, like which assets
      to use, through these endpoints.
  - name: Payments
    description: >-
      Endpoints related to payments. An SDP payment is an individual payment
      from an organization to a receiver. Each payment is part of a disbursement
      and occurs on the Stellar network. Granular payment status is stored in
      the SDP database and can be viewed in real-time on the SDP dashboard.
  - name: Profile
    description: >-
      Profiles endpoints manage the process of getting and updating individual
      profile information. Profile information is set when the account is
      created and can be updated by the user on the SDP dashboard Profile page.
      Note: profiles never refer to receivers of funds.
  - name: Receivers
    description: >
      Endpoints related to receivers. A receiver is an individual receiving a
      payment in a disbursement. The receiver is tracked by phone number to
      reduce the need for personally identifiable information. Each receiver
      must be unique within the disbursement.


      Each receiver will have at least one wallet associated with them. The
      wallet public key will remain null until the receiver registers with a
      wallet provider and links the wallet to the SDP through SEP-24. Receivers
      must verify their identity through that process, which requires the SDP to
      store verification information on receivers like date of birth, national
      ID number, or personal PIN. This information can be updated by the
      organization through the receiver endpoints.
  - name: Registration
    description: >
      The registration endpoints guide the process for a receiver to verify
      their identity and link their wallet address to an SDP. The registration
      process only needs to happen once per receiver to link their wallet. Only
      SDP-compatible wallet providers can facilitate the registration process.
      These endpoints must be supported and hit by the wallet providers after
      the receiver gets the initial invite. After the wallet address is
      successfully linked, the payment automatically begins.


      There are two parts to the registration flow. First, the wallet must
      authenticate and initiate a registration flow using the Anchor Platform
      Endpoints defined below. Note that these endpoints are hosted on a
      different host than the Stellar Disursement Platform.


      The second part of the registration flow is handled by the webview that is
      opened within the wallet application. This webview uses the endpoints
      defined in the Stellar Disbursement Platfrom Endpoints section to complete
      the registration process. The wallet application can chose not to use the
      webview and intstead integrate directly with the API.
  - name: Statistics
    description: >-
      Statistics endpoints return general aggregated data per organization, as
      well as disbursement-specific metrics. SDP users can use this data to
      monitor their disbursements over time.
  - name: Users
    description: >-
      The users endpoints facilitate the creation of new SDP users - including
      setting the appropriate role, sending an email invitation, and activating
      a user - and managing roles.
paths:
  /bridge-integration:
    patch:
      tags:
        - Bridge Integration
      summary: Update Bridge Integration Status
      description: >
        Updates the Bridge integration status. Supports two main operations:

        1. Opt-in to Bridge (status: "OPTED_IN") - Creates KYC link for
        organization onboarding

        2. Create Virtual Account (status: "READY_FOR_DEPOSIT") - Creates
        virtual account after KYC approval
      operationId: updateBridgeIntegration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BridgeIntegrationPatchRequest'
            examples:
              opt_in:
                summary: Opt into Bridge integration
                value:
                  status: OPTED_IN
                  email: john@example.com
                  full_name: John Doe
                  kyc_type: business
              create_virtual_account:
                summary: Create virtual account
                value:
                  status: READY_FOR_DEPOSIT
      responses:
        '200':
          description: Bridge integration updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BridgeIntegrationInfo'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
          description: Unauthorized
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
          description: Forbidden
        '404':
          $ref: '#/components/responses/NotFoundResponse'
          description: Not Found
      security:
        - BearerAuth: []
components:
  schemas:
    BridgeIntegrationPatchRequest:
      type: object
      description: Request to update Bridge integration status
      properties:
        status:
          type: string
          description: Target status for the integration
          enum:
            - OPTED_IN
            - READY_FOR_DEPOSIT
          example: OPTED_IN
        email:
          type: string
          format: email
          description: >-
            Email address for KYC verification (optional, defaults to user
            email)
          example: john@example.com
        full_name:
          type: string
          description: Full name for KYC verification (optional, defaults to user name)
          example: John Doe
        kyc_type:
          $ref: '#/components/schemas/KYCType'
      required:
        - status
    BridgeIntegrationInfo:
      type: object
      description: >-
        Complete Bridge integration information including status and related
        data
      properties:
        status:
          $ref: '#/components/schemas/BridgeIntegrationStatus'
        customer_id:
          type: string
          description: Bridge customer ID
          example: cust_123abc
        kyc_status:
          $ref: '#/components/schemas/KYCLinkInfo'
        virtual_account:
          $ref: '#/components/schemas/VirtualAccountInfo'
        opted_in_by:
          type: string
          description: User ID who opted the organization into Bridge
          example: user_789
        opted_in_at:
          type: string
          format: date-time
          description: Timestamp when organization opted into Bridge
          example: '2025-01-01T00:00:00Z'
        virtual_account_created_by:
          type: string
          description: User ID who created the virtual account
          example: user_789
        virtual_account_created_at:
          type: string
          format: date-time
          description: Timestamp when virtual account was created
          example: '2025-01-01T00:00:00Z'
      required:
        - status
    KYCType:
      type: string
      description: Type of KYC verification
      enum:
        - individual
        - business
      example: business
    BridgeIntegrationStatus:
      type: string
      description: Current status of the Bridge integration
      enum:
        - NOT_ENABLED
        - NOT_OPTED_IN
        - OPTED_IN
        - READY_FOR_DEPOSIT
        - ERROR
      example: OPTED_IN
    KYCLinkInfo:
      type: object
      description: KYC verification link information
      properties:
        id:
          type: string
          description: Unique identifier for the KYC link
          example: kyc_456def
        full_name:
          type: string
          description: Full name of the person undergoing KYC
          example: John Doe
        email:
          type: string
          format: email
          description: Email address for KYC verification
          example: john@example.com
        type:
          $ref: '#/components/schemas/KYCType'
        kyc_link:
          type: string
          format: uri
          description: URL for completing KYC verification
          example: https://bridge.stellar.org/kyc/456def
        tos_link:
          type: string
          format: uri
          description: URL for accepting terms of service
          example: https://bridge.stellar.org/tos/456def
        kyc_status:
          $ref: '#/components/schemas/KYCStatus'
        tos_status:
          $ref: '#/components/schemas/TOSStatus'
        rejection_reasons:
          type: array
          items:
            type: string
          description: Reasons for KYC rejection (if applicable)
          example:
            - Incomplete documentation
            - Address verification failed
        created_at:
          type: string
          format: date-time
          description: When the KYC link was created
          example: '2025-01-01T00:00:00Z'
        customer_id:
          type: string
          description: Bridge customer ID
          example: cust_123abc
      required:
        - id
        - full_name
        - email
        - type
        - kyc_link
        - tos_link
        - kyc_status
        - tos_status
        - customer_id
    VirtualAccountInfo:
      type: object
      description: Virtual account information for USD deposits
      properties:
        id:
          type: string
          description: Unique identifier for the virtual account
          example: va_789xyz
        status:
          $ref: '#/components/schemas/VirtualAccountStatus'
        developer_fee_percent:
          type: string
          description: Developer fee percentage as a string
          example: '0.5'
        customer_id:
          type: string
          description: Bridge customer ID
          example: cust_123abc
        source_deposit_instructions:
          $ref: '#/components/schemas/VirtualAccountDepositInstructions'
        destination:
          $ref: '#/components/schemas/VirtualAccountDestination'
      required:
        - id
        - status
        - developer_fee_percent
        - customer_id
        - source_deposit_instructions
        - destination
    KYCStatus:
      type: string
      description: |
        KYC verification status:
        - not_started: KYC process not yet started
        - incomplete: KYC process started but not complete
        - awaiting_ubo: Awaiting Ultimate Beneficial Owner verification
        - under_review: KYC submission under review
        - approved: KYC verification approved
        - rejected: KYC verification rejected
        - paused: KYC process paused
        - offboarded: Customer offboarded
      enum:
        - not_started
        - incomplete
        - awaiting_ubo
        - under_review
        - approved
        - rejected
        - paused
        - offboarded
      example: under_review
    TOSStatus:
      type: string
      description: |
        Terms of Service acceptance status:
        - pending: Terms of service not yet accepted
        - approved: Terms of service accepted
      enum:
        - pending
        - approved
      example: approved
    VirtualAccountStatus:
      type: string
      description: |
        Virtual account status:
        - activated: Account is active and ready for deposits
        - deactivated: Account is deactivated
      enum:
        - activated
        - deactivated
      example: activated
    VirtualAccountDepositInstructions:
      type: object
      description: Bank deposit instructions for sending USD to the virtual account
      properties:
        bank_beneficiary_name:
          type: string
          description: Name of the bank account beneficiary
          example: Stellar Bridge
        currency:
          type: string
          description: Currency for deposits
          example: usd
        bank_name:
          type: string
          description: Name of the receiving bank
          example: Wells Fargo
        bank_address:
          type: string
          description: Address of the receiving bank
          example: 123 Main St, San Francisco, CA
        bank_account_number:
          type: string
          description: Bank account number for deposits
          example: '1234567890'
        bank_routing_number:
          type: string
          description: Bank routing number
          example: '121000248'
        payment_rails:
          type: array
          items:
            type: string
          description: Supported payment rails for deposits
          example:
            - ach
            - wire
      required:
        - bank_beneficiary_name
        - currency
        - bank_name
        - bank_address
        - bank_account_number
        - bank_routing_number
        - payment_rails
    VirtualAccountDestination:
      type: object
      description: Destination configuration for converted funds
      properties:
        payment_rail:
          type: string
          description: Payment rail for destination
          example: stellar
        currency:
          type: string
          description: Destination currency
          example: usdc
        address:
          type: string
          description: Stellar address for receiving USDC
          example: GDQP2KPQGKIHYJGXNUIYOMHARUARCA7DJT5FO2FFOOKY3B2WSQHG4W37
        blockchain_memo:
          type: string
          description: Blockchain memo for the destination transaction
          example: '12345'
      required:
        - payment_rail
        - currency
        - address
  responses:
    UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              extras:
                type: object
                properties:
                  status:
                    type: number
                  message:
                    type: string
          example:
            error: Not authorized
            extras:
              status: 401
              message: Not authorized
    ForbiddenResponse:
      description: Forbidden
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
          example:
            error: Forbidden
    NotFoundResponse:
      description: Not Found
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              extras:
                type: object
                properties:
                  status:
                    type: number
                  message:
                    type: string
          example:
            error: Not found
            extras:
              status: 404
              message: Resource not found
  securitySchemes:
    BearerAuth:
      type: apiKey
      description: Authorization header containing an SDP JWT (ES256) or an SDP_ API key.
      name: Authorization
      in: header

````