Stripe Treasury API

Stripe Treasury is a banking-as-a-service API that lets you embed financial services in your product. With Stripe's API, you can enable businesses to hold funds, pay bills, earn yield, and manage their cash flow. Many users build Stripe Issuing in conjunction with Stripe Treasury to attach cards to spend funds in the account.

OpenAPI Specification

stripe-treasury-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Stripe Accounts Account Treasury API
  description: This is an object representing a Stripe account. You can retrieve it to see properties on the account like its current requirements or if the account is enabled to make live charges or receive payouts.
  contact:
    email: dev-platform@stripe.com
    name: Stripe Dev Platform Team
    url: https://stripe.com
  termsOfService: https://stripe.com/us/terms/
  version: '2023-10-16'
  x-stripeSpecFilename: spec3
servers:
- url: https://api.stripe.com/
security:
- basicAuth: []
- bearerAuth: []
tags:
- name: Treasury
paths:
  /v1/treasury/financial_accounts:
    get:
      summary: Stripe List Financial Accounts
      description: <p>Returns a list of FinancialAccounts.</p>
      operationId: GetTreasuryFinancialAccounts
      parameters:
      - name: ending_before
        in: query
        required: false
        schema:
          type: string
          maxLength: 5000
      - name: limit
        in: query
        required: false
        schema:
          type: integer
      - name: starting_after
        in: query
        required: false
        schema:
          type: string
          maxLength: 5000
      - name: expand
        in: query
        required: false
        explode: true
        schema:
          type: array
          items:
            type: string
            maxLength: 5000
        style: deepObject
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                    - list
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/treasury.financial_account'
                  has_more:
                    type: boolean
                  url:
                    type: string
        default:
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      tags:
      - Treasury
    post:
      summary: Stripe Create Financial Account
      description: <p>Creates a new FinancialAccount.</p>
      operationId: PostTreasuryFinancialAccounts
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - supported_currencies
              properties:
                supported_currencies:
                  type: array
                  items:
                    type: string
                features:
                  type: object
                metadata:
                  type: object
                  additionalProperties:
                    type: string
                platform_restrictions:
                  type: object
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/treasury.financial_account'
        default:
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      tags:
      - Treasury
  /v1/treasury/financial_accounts/{financial_account}:
    get:
      summary: Stripe Retrieve Financial Account
      description: <p>Retrieves the details of a FinancialAccount.</p>
      operationId: GetTreasuryFinancialAccountsFinancialAccount
      parameters:
      - name: financial_account
        in: path
        required: true
        schema:
          type: string
          maxLength: 5000
      - name: expand
        in: query
        required: false
        explode: true
        schema:
          type: array
          items:
            type: string
            maxLength: 5000
        style: deepObject
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/treasury.financial_account'
        default:
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      tags:
      - Treasury
    post:
      summary: Stripe Update Financial Account
      description: <p>Updates the details of a FinancialAccount.</p>
      operationId: PostTreasuryFinancialAccountsFinancialAccount
      parameters:
      - name: financial_account
        in: path
        required: true
        schema:
          type: string
          maxLength: 5000
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                features:
                  type: object
                metadata:
                  type: object
                  additionalProperties:
                    type: string
                platform_restrictions:
                  type: object
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/treasury.financial_account'
        default:
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      tags:
      - Treasury
  /v1/treasury/transactions:
    get:
      summary: Stripe List Transactions
      description: <p>Retrieves a list of Transaction objects.</p>
      operationId: GetTreasuryTransactions
      parameters:
      - name: financial_account
        in: query
        required: true
        schema:
          type: string
          maxLength: 5000
      - name: status
        in: query
        required: false
        schema:
          type: string
          enum:
          - open
          - posted
          - void
      - name: ending_before
        in: query
        required: false
        schema:
          type: string
          maxLength: 5000
      - name: limit
        in: query
        required: false
        schema:
          type: integer
      - name: starting_after
        in: query
        required: false
        schema:
          type: string
          maxLength: 5000
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                    - list
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/treasury.transaction'
                  has_more:
                    type: boolean
                  url:
                    type: string
        default:
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      tags:
      - Treasury
  /v1/treasury/transactions/{id}:
    get:
      summary: Stripe Retrieve Transaction
      description: <p>Retrieves the details of an existing Transaction.</p>
      operationId: GetTreasuryTransactionsId
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          maxLength: 5000
      - name: expand
        in: query
        required: false
        explode: true
        schema:
          type: array
          items:
            type: string
            maxLength: 5000
        style: deepObject
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/treasury.transaction'
        default:
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      tags:
      - Treasury
  /v1/treasury/outbound_payments:
    get:
      summary: Stripe List Outbound Payments
      description: <p>Returns a list of OutboundPayments sent from the specified FinancialAccount.</p>
      operationId: GetTreasuryOutboundPayments
      parameters:
      - name: financial_account
        in: query
        required: true
        schema:
          type: string
          maxLength: 5000
      - name: status
        in: query
        required: false
        schema:
          type: string
          enum:
          - canceled
          - failed
          - posted
          - processing
          - returned
      - name: ending_before
        in: query
        required: false
        schema:
          type: string
      - name: limit
        in: query
        required: false
        schema:
          type: integer
      - name: starting_after
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                    - list
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/treasury.outbound_payment'
                  has_more:
                    type: boolean
                  url:
                    type: string
        default:
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      tags:
      - Treasury
    post:
      summary: Stripe Create Outbound Payment
      description: <p>Creates an OutboundPayment.</p>
      operationId: PostTreasuryOutboundPayments
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - amount
              - currency
              - financial_account
              properties:
                amount:
                  type: integer
                currency:
                  type: string
                financial_account:
                  type: string
                  maxLength: 5000
                customer:
                  type: string
                  maxLength: 5000
                description:
                  type: string
                  maxLength: 5000
                destination_payment_method:
                  type: string
                  maxLength: 5000
                metadata:
                  type: object
                  additionalProperties:
                    type: string
                statement_descriptor:
                  type: string
                  maxLength: 5000
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/treasury.outbound_payment'
        default:
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      tags:
      - Treasury
  /v1/treasury/outbound_transfers:
    get:
      summary: Stripe List Outbound Transfers
      description: <p>Returns a list of OutboundTransfers sent from the specified FinancialAccount.</p>
      operationId: GetTreasuryOutboundTransfers
      parameters:
      - name: financial_account
        in: query
        required: true
        schema:
          type: string
          maxLength: 5000
      - name: status
        in: query
        required: false
        schema:
          type: string
          enum:
          - canceled
          - failed
          - posted
          - processing
          - returned
      - name: ending_before
        in: query
        required: false
        schema:
          type: string
      - name: limit
        in: query
        required: false
        schema:
          type: integer
      - name: starting_after
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                    - list
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/treasury.outbound_transfer'
                  has_more:
                    type: boolean
                  url:
                    type: string
        default:
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      tags:
      - Treasury
    post:
      summary: Stripe Create Outbound Transfer
      description: <p>Creates an OutboundTransfer.</p>
      operationId: PostTreasuryOutboundTransfers
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - amount
              - currency
              - destination_payment_method
              - financial_account
              properties:
                amount:
                  type: integer
                currency:
                  type: string
                destination_payment_method:
                  type: string
                  maxLength: 5000
                financial_account:
                  type: string
                  maxLength: 5000
                description:
                  type: string
                  maxLength: 5000
                metadata:
                  type: object
                  additionalProperties:
                    type: string
                statement_descriptor:
                  type: string
                  maxLength: 5000
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/treasury.outbound_transfer'
        default:
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      tags:
      - Treasury
  /v1/treasury/inbound_transfers:
    get:
      summary: Stripe List Inbound Transfers
      description: <p>Returns a list of InboundTransfers sent from the specified FinancialAccount.</p>
      operationId: GetTreasuryInboundTransfers
      parameters:
      - name: financial_account
        in: query
        required: true
        schema:
          type: string
          maxLength: 5000
      - name: status
        in: query
        required: false
        schema:
          type: string
          enum:
          - canceled
          - failed
          - processing
          - succeeded
      - name: ending_before
        in: query
        required: false
        schema:
          type: string
      - name: limit
        in: query
        required: false
        schema:
          type: integer
      - name: starting_after
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                    - list
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/treasury.inbound_transfer'
                  has_more:
                    type: boolean
                  url:
                    type: string
        default:
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      tags:
      - Treasury
    post:
      summary: Stripe Create Inbound Transfer
      description: <p>Creates an InboundTransfer.</p>
      operationId: PostTreasuryInboundTransfers
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - amount
              - currency
              - financial_account
              - origin_payment_method
              properties:
                amount:
                  type: integer
                currency:
                  type: string
                financial_account:
                  type: string
                  maxLength: 5000
                origin_payment_method:
                  type: string
                  maxLength: 5000
                description:
                  type: string
                  maxLength: 5000
                metadata:
                  type: object
                  additionalProperties:
                    type: string
                statement_descriptor:
                  type: string
                  maxLength: 5000
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/treasury.inbound_transfer'
        default:
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      tags:
      - Treasury
  /v1/treasury/credit_reversals:
    get:
      description: <p>Returns a list of CreditReversals.</p>
      operationId: GetTreasuryCreditReversals
      parameters:
      - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
        in: query
        name: ending_before
        required: false
        schema:
          maxLength: 5000
          type: string
        style: form
      - description: Specifies which fields in the response should be expanded.
        explode: true
        in: query
        name: expand
        required: false
        schema:
          items:
            maxLength: 5000
            type: string
          type: array
        style: deepObject
      - description: Returns objects associated with this FinancialAccount.
        in: query
        name: financial_account
        required: true
        schema:
          type: string
        style: form
      - description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
        in: query
        name: limit
        required: false
        schema:
          type: integer
        style: form
      - description: Only return CreditReversals for the ReceivedCredit ID.
        in: query
        name: received_credit
        required: false
        schema:
          maxLength: 5000
          type: string
        style: form
      - description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
        in: query
        name: starting_after
        required: false
        schema:
          maxLength: 5000
          type: string
        style: form
      - description: Only return CreditReversals for a given status.
        in: query
        name: status
        required: false
        schema:
          enum:
          - canceled
          - posted
          - processing
          type: string
        style: form
      requestBody:
        content:
          application/x-www-form-urlencoded:
            encoding: {}
            schema:
              additionalProperties: false
              $ref: '#/components/schemas/GetTreasuryCreditReversalsRequest'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                description: ''
                x-expandableFields:
                - data
                $ref: '#/components/schemas/TreasuryReceivedCreditsResourceCreditReversalList'
          description: Successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_2'
          description: Error response.
      tags:
      - Treasury
    post:
      description: <p>Reverses a ReceivedCredit and creates a CreditReversal object.</p>
      operationId: PostTreasuryCreditReversals
      requestBody:
        content:
          application/x-www-form-urlencoded:
            encoding:
              expand:
                explode: true
                style: deepObject
              metadata:
                explode: true
                style: deepObject
            schema:
              additionalProperties: false
              $ref: '#/components/schemas/PostTreasuryCreditReversalsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/treasury.credit_reversal'
          description: Successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_2'
          description: Error response.
      tags:
      - Treasury
  /v1/treasury/credit_reversals/{credit_reversal}:
    get:
      description: <p>Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list</p>
      operationId: GetTreasuryCreditReversalsCreditReversal
      parameters:
      - in: path
        name: credit_reversal
        required: true
        schema:
          maxLength: 5000
          type: string
        style: simple
      - description: Specifies which fields in the response should be expanded.
        explode: true
        in: query
        name: expand
        required: false
        schema:
          items:
            maxLength: 5000
            type: string
          type: array
        style: deepObject
      requestBody:
        content:
          application/x-www-form-urlencoded:
            encoding: {}
            schema:
              additionalProperties: false
              $ref: '#/components/schemas/GetTreasuryCreditReversalsCreditReversalRequest'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/treasury.credit_reversal'
          description: Successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_2'
          description: Error response.
      tags:
      - Treasury
  /v1/treasury/debit_reversals:
    get:
      description: <p>Returns a list of DebitReversals.</p>
      operationId: GetTreasuryDebitReversals
      parameters:
      - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
        in: query
        name: ending_before
        required: false
        schema:
          maxLength: 5000
          type: string
        style: form
      - description: Specifies which fields in the response should be expanded.
        explode: true
        in: query
        name: expand
        required: false
        schema:
          items:
            maxLength: 5000
            type: string
          type: array
        style: deepObject
      - description: Returns objects associated with this FinancialAccount.
        in: query
        name: financial_account
        required: true
        schema:
          type: string
        style: form
      - description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
        in: query
        name: limit
        required: false
        schema:
          type: integer
        style: form
      - description: Only return DebitReversals for the ReceivedDebit ID.
        in: query
        name: received_debit
        required: false
        schema:
          maxLength: 5000
          type: string
        style: form
      - description: Only return DebitReversals for a given resolution.
        in: query
        name: resolution
        required: false
        schema:
          enum:
          - lost
          - won
          type: string
        style: form
      - description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
        in: query
        name: starting_after
        required: false
        schema:
          maxLength: 5000
          type: string
        style: form
      - description: Only return DebitReversals for a given status.
        in: query
        name: status
        required: false
        schema:
          enum:
          - canceled
          - completed
          - processing
          type: string
        style: form
      requestBody:
        content:
          application/x-www-form-urlencoded:
            encoding: {}
            schema:
              additionalProperties: false
              $ref: '#/components/schemas/GetTreasuryDebitReversalsRequest'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                description: ''
                x-expandableFields:
                - data
                $ref: '#/components/schemas/TreasuryReceivedDebitsResourceDebitReversalList'
          description: Successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_2'
          description: Error response.
      tags:
      - Treasury
    post:
      description: <p>Reverses a ReceivedDebit and creates a DebitReversal object.</p>
      operationId: PostTreasuryDebitReversals
      requestBody:
        content:
          application/x-www-form-urlencoded:
            encoding:
              expand:
                explode: true
                style: deepObject
              metadata:
                explode: true
                style: deepObject
            schema:
              additionalProperties: false
              $ref: '#/components/schemas/PostTreasuryDebitReversalsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/treasury.debit_reversal'
          description: Successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_2'
          description: Error response.
      tags:
      - Treasury
  /v1/treasury/debit_reversals/{debit_reversal}:
    get:
      description: <p>Retrieves a DebitReversal object.</p>
      operationId: GetTreasuryDebitReversalsDebitReversal
      parameters:
      - in: path
        name: debit_reversal
        required: true
        schema:
          maxLength: 5000
          type: string
        style: simple
      - description: Specifies which fields in the response should be expanded.
        explode: true
        in: query
        name: expand
        required: false
        schema:
          items:
            maxLength: 5000
            type: string
          type: array
        style: deepObject
      requestBody:
        content:
          application/x-www-form-urlencoded:
            encoding: {}
            schema:
              additionalProperties: false
              $ref: '#/components/schemas/GetTreasuryDebitReversalsDebitReversalRequest'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/treasury.debit_reversal'
          description: Successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_2'
          description: Error response.
      tags:
      - Treasury
  /v1/treasury/financial_accounts/{financial_account}/features:
    get:
      description: <p>Retrieves Features information associated with the FinancialAccount.</p>
      operationId: GetTreasuryFinancialAccountsFinancialAccountFeatures
      parameters:
      - description: Specifies which fields in the response should be expanded.
        explode: true
        in: query
        name: expand
        required: false
        schema:
          items:
            maxLength: 5000
            type: string
          type: array
        style: deepObject
      - in: path
        name: financial_account
        required: true
        schema:
          maxLength: 5000
          type: string
        style: simple
      requestBody:
        content:
          application/x-www-form-urlencoded:
            encoding: {}
            schema:
              additionalProperties: false
              $ref: '#/components/schemas/GetTreasuryFinancialAccountsFinancialAccountFeaturesRequest'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/treasury.financial_account_features'
          description: Successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_2'
          description: Error response.
      tags:
      - Treasury
    post:
      description: <p>Updates the Features associated with a FinancialAccount.</p>
      operationId: PostTreasuryFinancialAccountsFinancialAccountFeatures
      parameters:
      - in: path
        name: financial_account
        required: true
        schema:
          maxLength: 5000
          type: string
        style: simple
      requestBody:
        content:
          application/x-www-form-urlencoded:
            encoding:
              card_issuing:
                explode: true
                style: deepObject
              deposit_insurance:
                explode: true
                style: deepObject
              expand:
                explode: true
                style: deepObject
              financial_addresses:
                explode: true
                style: deepObject
              inbound_transfers:
                explode: true
                style: deepObject
              intra_stripe_flows:
                explode: true
                style: deepObject
              outbound_payments:
                explode: true
                style: deepObject
              outbound_transfers:
                explode: true
                style: deepObject
            schema:
              additionalProperties: false
              $ref: '#/components/schemas/PostTreasuryFinancialAccountsFinancialAccountFeaturesRequest'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/treasury.financial_account_features'
          descript

# --- truncated at 32 KB (113 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/stripe/refs/heads/main/openapi/stripe-treasury-api-openapi.yml