> ## 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.

# Create Direct Payment

> Creates a new direct payment that is immediately sent to the specified receiver if they have a valid registered wallet. Direct payments bypass the disbursement workflow and are processed instantly.



## OpenAPI

````yaml openapi/stellar-disbursement-platform/bundled.yaml POST /payments
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:
  /payments:
    post:
      tags:
        - Payments
      summary: Create Direct Payment
      description: >-
        Creates a new direct payment that is immediately sent to the specified
        receiver if they have a valid registered wallet. Direct payments bypass
        the disbursement workflow and are processed instantly.
      operationId: CreateDirectPayment
      parameters:
        - $ref: '#/components/parameters/XWalletIdWriteSource'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDirectPaymentRequest'
        required: true
      responses:
        '201':
          description: Direct payment created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payment'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
          description: Bad Request
        '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:
  parameters:
    XWalletIdWriteSource:
      name: X-Wallet-Id
      in: header
      required: false
      description: >
        Names the distribution account this request acts on. Required when the
        tenant has more than one active account. With a single active account,
        or an API key scoped to exactly one account, it may be omitted.
      schema:
        type: string
  schemas:
    CreateDirectPaymentRequest:
      type: object
      required:
        - amount
        - asset
        - receiver
        - wallet
      properties:
        amount:
          type: string
          description: The payment amount
        asset:
          type: object
          properties:
            id:
              type: string
              description: Asset ID (use either id or type)
            type:
              type: string
              enum:
                - native
                - classic
                - contract
                - fiat
              description: Asset type (use either id or type)
            code:
              type: string
              description: Asset code (required for classic and fiat assets)
            issuer:
              type: string
              description: Asset issuer address (required for classic assets)
            contract_id:
              type: string
              description: Contract ID (required for contract assets)
          description: Asset reference - specify either id or type with required fields
        receiver:
          type: object
          properties:
            id:
              type: string
              description: Receiver ID
            email:
              type: string
              description: Receiver email address
            phone_number:
              type: string
              description: Receiver phone number
            wallet_address:
              type: string
              description: Receiver wallet address (Stellar account or contract)
          description: Receiver reference - specify exactly one identifier
        wallet:
          type: object
          properties:
            id:
              type: string
              description: Wallet ID
            address:
              type: string
              description: Wallet address (Stellar account or contract)
          description: Wallet reference - specify either id or address
        external_payment_id:
          type: string
          description: Optional external payment identifier
    Payment:
      type: object
      properties:
        id:
          type: string
          example: ddf22f55-3259-4822-a4e2-ce01334997f4
        amount:
          type: string
          description: The amount of the payment
          example: '100.00'
        stellar_transaction_id:
          type: string
          description: >-
            The ID of the transaction in the Stellar network. It can be used to
            track the payment in the Stellar network using [Stellar
            Laboratory](https://laboratory.stellar.org), or
            [StellarExpert](https://stellar.expert).
          example: 0b339d1c89d314186b8147c2af4c9a9ed5bbdbcd7ada8d138633907649b
        circle_transaction_id:
          type: string
          description: >-
            The Circle transaction ID. It is only present when the payment was
            made using Circle.
          example: 74a68b6a-3f67-424b-b8b0-e593a19d7463
        circle_transaction_type:
          type: string
          enum:
            - PAYOUT
            - TRANSFER
          description: >-
            Which Circle API the payment went through. It is only present when
            the payment was made using Circle.
          example: TRANSFER
        stellar_operation_id:
          type: string
        source_wallet_id:
          type: string
          description: ID of the distribution account the payment was sent from.
          example: 4c379f5e-09b5-4472-a286-b84e249a1512
        status:
          $ref: '#/components/schemas/PaymentStatus'
        status_history:
          $ref: '#/components/schemas/PaymentStatusHistory'
        type:
          type: string
          description: The type of the payment.
          enum:
            - DISBURSEMENT
            - DIRECT
        disbursement:
          $ref: '#/components/schemas/DisbursementLite'
        asset:
          $ref: '#/components/schemas/Asset'
        receiver_wallet:
          $ref: '#/components/schemas/ReceiverWalletLite'
        external_payment_id:
          type: string
          description: Optional external payment identifier provided by the client.
          example: payment-001
        created_at:
          type: string
          format: date-time
          example: '2023-02-03T10:45:51Z'
        updated_at:
          type: string
          format: date-time
          example: '2023-02-03T10:45:51Z'
    PaymentStatus:
      type: string
      description: The status of the payment
      enum:
        - DRAFT
        - READY
        - PENDING
        - PAUSED
        - SUCCESS
        - FAILED
        - CANCELED
    PaymentStatusHistory:
      type: array
      description: >-
        An aggregated list of metadata objects containing the statuses and the
        timestamp of when these status changes occurred.
      items:
        $ref: '#/components/schemas/PaymentStatusHistoryEntry'
    DisbursementLite:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the disbursement
          format: uuid
          example: c51ba1d5-52d3-412f-a59c-6ef32d59ab43
        name:
          type: string
          description: The name of the disbursement
          example: disbursement-june-29
        receiver_registration_message_template:
          type: string
          description: >-
            The custom template used to send invitations to receivers. The
            `default` message isn't returned. In the message's content it's
            possible to add the following template variables:
            `{{.OrganizationName}}` which is the Organization Name configured
            and `{{.RegistrationLink}}` which is the link generated by SDP to
            send to the receiver (in case this is not present in the message,
            it's automatically appended at the end).
          example: >-
            You have a payment waiting for you from {{.OrganizationName}}. Click
            {{.RegistrationLink}} to register.
        registration_contact_type:
          $ref: '#/components/schemas/RegistrationContactType'
        status:
          $ref: '#/components/schemas/DisbursementStatus'
        verification_field:
          $ref: '#/components/schemas/VerificationField'
        status_history:
          $ref: '#/components/schemas/DisbursementStatusHistory'
        file_name:
          type: string
          example: disbursement-feb-03-2023.csv
        created_at:
          type: string
          description: The creation timestamp of the disbursement
          format: date-time
          example: '2023-06-30T01:22:57.831975Z'
        updated_at:
          type: string
          description: The last update timestamp of the disbursement
          format: date-time
          example: '2023-06-30T01:22:58.316511Z'
    Asset:
      type: object
      properties:
        id:
          type: string
          example: ffaec4b3-46b0-4db4-a4c4-6c3508057705
        code:
          type: string
          description: Asset code
          example: USDC
        issuer:
          type: string
          description: Asset issuer address
          example: GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5
        created_at:
          type: string
          format: date-time
          example: '2023-02-03T10:45:51Z'
        updated_at:
          type: string
          format: date-time
          example: '2023-02-03T10:45:51Z'
        deleted_at:
          type: string
          format: date-time
          example: '2023-06-03T10:55:51Z'
      description: The Stellar asset object
    ReceiverWalletLite:
      type: object
      properties:
        id:
          type: string
          example: 803031d4-1d04-4879-b6d9-dc5641f9988e
        receiver:
          $ref: '#/components/schemas/ReceiverLite'
        wallet:
          $ref: '#/components/schemas/WalletLite'
        stellar_address:
          type: string
          example: GCXAJ3XJ3VK3JFH3QMDFOSKM2NMMZBSO3VIT6EUPQWSDW2J74M23RRSL
        stellar_memo:
          type: string
        stellar_memo_type:
          type: string
        sep24_transaction_id:
          type: string
        created_at:
          type: string
          example: '2023-02-03T10:45:51.000Z'
        updated_at:
          type: string
          example: '2023-02-03T10:45:51.000Z'
        invitation_sent_at:
          type: string
          example: '2023-02-09T10:45:51.000Z'
        status:
          $ref: '#/components/schemas/ReceiversWalletStatus'
        status_history:
          type: array
          items:
            $ref: '#/components/schemas/ReceiversWalletStatusHistoryEntry'
        otp_confirmed_at:
          type: string
          format: date-time
          example: '2023-02-10T10:45:51Z'
        otp_confirmed_with:
          type: string
    PaymentStatusHistoryEntry:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/PaymentStatus'
        status_message:
          type: string
        timestamp:
          type: string
          format: date-time
          example: '2023-02-03T10:45:51Z'
    RegistrationContactType:
      type: string
      enum:
        - EMAIL
        - PHONE_NUMBER
        - EMAIL_AND_WALLET_ADDRESS
        - PHONE_NUMBER_AND_WALLET_ADDRESS
    DisbursementStatus:
      type: string
      enum:
        - DRAFT
        - READY
        - STARTED
        - PAUSED
        - COMPLETED
        - CANCELED
    VerificationField:
      type: string
      enum:
        - DATE_OF_BIRTH
        - YEAR_MONTH
        - PIN
        - NATIONAL_ID_NUMBER
    DisbursementStatusHistory:
      type: array
      items:
        $ref: '#/components/schemas/DisbursementStatusHistoryEntry'
    ReceiverLite:
      type: object
      properties:
        id:
          type: string
          example: 029e2ed0-feb6-4c40-8b47-0836a85741a2
    WalletLite:
      type: object
      properties:
        id:
          type: string
          example: 5ada9ed5-455a-4782-a0ee-160767e0deb1
        name:
          type: string
          example: Vibrant Assist
        homepage:
          type: string
          example: https://vibrantapp.com
        sep_10_client_domain:
          type: string
          example: api-dev.vibrantapp.com
        deep_link_schema:
          type: string
          example: https://vibrantapp.com/sdp-dev
        enabled:
          type: boolean
          example: true
        user_managed:
          type: boolean
          example: false
    ReceiversWalletStatus:
      type: string
      enum:
        - DRAFT
        - READY
        - REGISTERED
        - FLAGGED
    ReceiversWalletStatusHistoryEntry:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ReceiversWalletStatus'
        timestamp:
          type: string
          format: date-time
          example: '2023-02-10T10:45:51Z'
    DisbursementStatusHistoryEntry:
      type: object
      properties:
        user_id:
          type: string
          example: 3f351b9e-ed0f-40fa-a314-14757b42dab1
        status:
          $ref: '#/components/schemas/DisbursementStatus'
        timestamp:
          type: string
          format: date-time
          example: '2023-02-03T10:45:51Z'
  responses:
    BadRequestResponse:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                description: Details about the error
              extras:
                type: object
                properties: {}
    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

````