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

# Create Payment Intent



## OpenAPI

````yaml POST /smart-accounts/{smart_account_address}/payment-intents
openapi: 3.1.0
info:
  title: Grid API
  description: Grid API Documentation
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://grid.squads.xyz/api/v0/grid
    description: Production Server
security:
  - bearerAuth: []
tags:
  - name: smart-accounts
    description: Smart Accounts
paths:
  /smart-accounts/{smart_account_address}/payment-intents:
    post:
      tags:
        - Smart Accounts
      operationId: handler
      parameters:
        - name: smart_account_address
          in: path
          description: The address of the smart account to create payment intent for
          required: true
          schema:
            type: string
        - name: use-mpc-provider
          in: query
          description: Whether to use MPC provider for signing
          required: false
          schema:
            type: boolean
        - name: X-Grid-Environment
          in: header
          description: The environment you’re using. Can be `sandbox` or `production`.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentIntentRequestPayload'
        required: true
      responses:
        '200':
          description: Successfully created payment intent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePaymentIntentResponsePayload'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GridError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GridError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GridError'
        '404':
          description: Smart account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GridError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GridError'
      security:
        - bearerAuth: []
components:
  schemas:
    CreatePaymentIntentRequestPayload:
      type: object
      required:
        - amount
        - grid_user_id
        - source
        - destination
      properties:
        amount:
          type: string
          description: Amount in the smallest currency unit (e.g., cents for USD)
        destination:
          $ref: '#/components/schemas/Details'
          description: Destination account details for the payment
        grid_user_id:
          type: string
          format: uuid
          description: Grid user ID associated with the payment intent
        source:
          $ref: '#/components/schemas/Details'
          description: Source account details for the payment
        webhook_url:
          type:
            - string
            - 'null'
          description: Optional webhook URL for payment status updates
    CreatePaymentIntentResponsePayload:
      type: object
      required:
        - id
        - payment_rail
        - amount
        - currency
        - source
        - destination
        - status
        - created_at
        - updated_at
      properties:
        amount:
          type: string
          description: Amount in the smallest currency unit
        authorities:
          type:
            - array
            - 'null'
          items:
            type: string
          description: Optional list of authorities that can sign the transaction
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: UTC timestamp when the payment intent was completed
        created_at:
          type: string
          format: date-time
          description: UTC timestamp when the payment intent was created
        currency:
          $ref: '#/components/schemas/Currency'
          description: Currency for the transfer
        destination:
          $ref: '#/components/schemas/TransferDestination'
          description: Destination account details
        error_message:
          type:
            - string
            - 'null'
          description: Optional error message if the payment intent failed
        fee:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Fee'
              description: Optional fee information
        id:
          type: string
          description: Unique identifier for the payment intent
        intent_payload:
          type:
            - string
            - 'null'
          description: Optional transaction payload for on-chain transfers
        memo:
          type:
            - string
            - 'null'
          description: Optional memo for the transfer
        mpc_payload:
          type:
            - string
            - 'null'
          description: Optional MPC provider payload for signing
        payment_rail:
          $ref: '#/components/schemas/PaymentRail'
          description: Payment rail used for the transfer
        source:
          $ref: '#/components/schemas/TransferSource'
          description: Source account details
        source_deposit_instructions:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TransferSourceDepositInstructions'
              description: Optional deposit instructions for the source account
        status:
          $ref: '#/components/schemas/TransferState'
          description: Current status of the payment intent
        threshold:
          type:
            - integer
            - 'null'
          format: int32
          description: Optional threshold of required signatures
        updated_at:
          type: string
          format: date-time
          description: UTC timestamp when the payment intent was last updated
        valid_until:
          type:
            - string
            - 'null'
          format: date-time
          description: Optional expiration timestamp for the payment intent
    GridError:
      type: object
      required:
        - message
        - details
        - timestamp
      properties:
        details:
          type: array
          items:
            $ref: '#/components/schemas/Detail'
        message:
          type: string
        timestamp:
          type: string
    Details:
      oneOf:
        - $ref: '#/components/schemas/NewExternalAccountDetails'
          description: New external account details
        - $ref: '#/components/schemas/ExistingExternalAccountDetails'
          description: Existing external account details
        - $ref: '#/components/schemas/SmartAccountDetails'
          description: Smart account details
        - $ref: '#/components/schemas/SolanaDetails'
          description: Solana account details
    Currency:
      type: string
      enum:
        - usd
        - eur
        - mxn
        - usdc
        - usdt
        - usdb
        - dai
        - pyusd
        - eurc
    TransferDestination:
      type: object
      required:
        - currency
        - payment_rail
      properties:
        ach_reference:
          type:
            - string
            - 'null'
        blockchain_memo:
          type:
            - string
            - 'null'
        bridge_wallet_id:
          type:
            - string
            - 'null'
        currency:
          $ref: '#/components/schemas/Currency'
        external_account_id:
          type:
            - string
            - 'null'
        from_address:
          type:
            - string
            - 'null'
        imad:
          type:
            - string
            - 'null'
        omad:
          type:
            - string
            - 'null'
        payment_rail:
          $ref: '#/components/schemas/PaymentRail'
        sepa_reference:
          type:
            - string
            - 'null'
        swift_charges:
          type:
            - string
            - 'null'
        swift_reference:
          type:
            - string
            - 'null'
        to_address:
          type:
            - string
            - 'null'
        trace_number:
          type:
            - string
            - 'null'
        uetr:
          type:
            - string
            - 'null'
        wire_message:
          type:
            - string
            - 'null'
    Fee:
      type: object
      required:
        - amount
        - currency
      properties:
        amount:
          type: string
          description: Fee amount in the smallest currency unit
        currency:
          $ref: '#/components/schemas/Currency'
          description: Currency for the fee
    PaymentRail:
      type: string
      enum:
        - ach
        - ach_push
        - ach_same_day
        - sepa
        - swift
        - wire
        - arbitrum
        - avalanche_c_chain
        - base
        - bridge_wallet
        - ethereum
        - optimism
        - polygon
        - solana
        - stellar
        - tron
    TransferSource:
      type: object
      required:
        - payment_rail
        - currency
      properties:
        bank_beneficiary_address:
          type:
            - string
            - 'null'
        bank_beneficiary_name:
          type:
            - string
            - 'null'
        bank_name:
          type:
            - string
            - 'null'
        bank_routing_number:
          type:
            - string
            - 'null'
        bridge_wallet_id:
          type:
            - string
            - 'null'
        currency:
          $ref: '#/components/schemas/Currency'
        description:
          type:
            - string
            - 'null'
        external_account_id:
          type:
            - string
            - 'null'
        from_address:
          type:
            - string
            - 'null'
        imad:
          type:
            - string
            - 'null'
        omad:
          type:
            - string
            - 'null'
        payment_rail:
          $ref: '#/components/schemas/PaymentRail'
    TransferSourceDepositInstructions:
      type: object
      required:
        - currency
        - payment_rail
      properties:
        account_holder_name:
          type:
            - string
            - 'null'
        amount:
          type: string
          example: '100.00'
        bank_account_number:
          type:
            - string
            - 'null'
        bank_address:
          type:
            - string
            - 'null'
        bank_beneficiary_address:
          type:
            - string
            - 'null'
        bank_beneficiary_name:
          type:
            - string
            - 'null'
        bank_name:
          type:
            - string
            - 'null'
        bank_routing_number:
          type:
            - string
            - 'null'
        bic:
          type:
            - string
            - 'null'
        blockchain_memo:
          type:
            - string
            - 'null'
        currency:
          $ref: '#/components/schemas/Currency'
        deposit_message:
          type:
            - string
            - 'null'
        external_account_id:
          type:
            - string
            - 'null'
        from_address:
          type:
            - string
            - 'null'
        iban:
          type:
            - string
            - 'null'
        payment_rail:
          $ref: '#/components/schemas/PaymentRail'
        to_address:
          type:
            - string
            - 'null'
    TransferState:
      type: string
      enum:
        - awaiting_funds
        - in_review
        - funds_received
        - payment_submitted
        - payment_processed
        - canceled
        - error
        - undeliverable
        - returned
        - refunded
    Detail:
      type: object
      required:
        - field
        - code
        - message
      properties:
        code:
          type: string
        field:
          type: string
        message:
          type: string
    NewExternalAccountDetails:
      type: object
      required:
        - payment_rail
        - currency
        - details
      properties:
        currency:
          $ref: '#/components/schemas/Currency'
          description: Currency for the transfer
        details:
          $ref: '#/components/schemas/CreateExternalAccountRequest'
          description: Details for creating a new external account
        payment_rail:
          $ref: '#/components/schemas/PaymentRail'
          description: Payment rail to use for the transfer
    ExistingExternalAccountDetails:
      type: object
      required:
        - payment_rail
        - currency
        - external_account_id
      properties:
        currency:
          $ref: '#/components/schemas/Currency'
          description: Currency for the transfer
        external_account_id:
          type: string
          description: ID of the existing external account
        payment_rail:
          $ref: '#/components/schemas/PaymentRail'
          description: Payment rail to use for the transfer
    SmartAccountDetails:
      type: object
      required:
        - smart_account_address
        - currency
        - authorities
      properties:
        authorities:
          type: array
          items:
            type: string
          description: List of authorities that can sign the transaction
        currency:
          $ref: '#/components/schemas/Currency'
          description: Currency for the transfer
        smart_account_address:
          type: string
          description: Address of the smart account
    SolanaDetails:
      type: object
      required:
        - address
        - currency
      properties:
        address:
          type: string
          description: Solana address for the transfer
        currency:
          $ref: '#/components/schemas/Currency'
          description: Currency for the transfer
    CreateExternalAccountRequest:
      type: object
      required:
        - account_owner_name
        - address
        - idempotency_key
      properties:
        account:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/UsAccount'
        account_number:
          type:
            - string
            - 'null'
        account_owner_name:
          type: string
        account_owner_type:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CustomerType'
        account_type:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/AccountType'
        address:
          $ref: '#/components/schemas/Address'
        bank_name:
          type:
            - string
            - 'null'
        business_name:
          type:
            - string
            - 'null'
        currency:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Currency'
        first_name:
          type:
            - string
            - 'null'
        iban:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/IbanAccount'
        idempotency_key:
          type: string
        last_name:
          type:
            - string
            - 'null'
        routing_number:
          type:
            - string
            - 'null'
        swift:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SwiftAccount'
    UsAccount:
      type: object
      required:
        - checking_or_savings
        - last_4
        - routing_number
      properties:
        checking_or_savings:
          $ref: '#/components/schemas/UsAccountType'
        last_4:
          type: string
        routing_number:
          type: string
    CustomerType:
      type: string
      enum:
        - individual
        - business
    AccountType:
      type: string
      enum:
        - us
        - iban
        - unknown
    Address:
      type: object
      required:
        - street_line_1
        - city
        - state
        - country
      properties:
        city:
          type: string
        country:
          type: string
        postal_code:
          type:
            - string
            - 'null'
        state:
          type: string
        street_line_1:
          type: string
        street_line_2:
          type:
            - string
            - 'null'
    IbanAccount:
      type: object
      required:
        - country
        - bic
        - account_number
      properties:
        account_number:
          type: string
        bic:
          type: string
        country:
          type: string
    SwiftAccount:
      allOf:
        - {}
    UsAccountType:
      type: string
      enum:
        - checking
        - savings
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API Key for authentication

````