Marqeta Program Reserve API

// Conditional snippet for beta or internal content include::../../maturity-admonition-banner.adoc[] Use the Program Reserve API to retrieve program reserve account balances and transactions.

OpenAPI Specification

marqeta-program-reserve-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  contact:
    email: support@marqeta.com
    name: Marqeta
  description: Marqeta's Core API endpoints, conveniently annotated to enable code generation (including SDKs), test cases, and documentation. Currently in beta.
  termsOfService: https://www.marqeta.com/api-terms
  title: Core accepted countries Program Reserve API
  version: 3.0.39
servers:
- url: /v3
security:
- mqAppAndAccessToken: []
tags:
- description: '// Conditional snippet for beta or internal content

    include::../../maturity-admonition-banner.adoc[]


    Use the Program Reserve API to retrieve program reserve account balances and transactions.'
  name: Program Reserve
paths:
  /programreserve/balances:
    get:
      description: Use this endpoint to return balances for your program reserve account (sometimes referred to as a _program funding account_).
      operationId: getProgramreserveBalances
      responses:
        '200':
          content:
            application/json:
              example:
                available_balance: 10100.0
                balances:
                  USD:
                    available_balance: 10100.0
                    currency_code: USD
                    ledger_balance: 10100.0
                    pending_credits: 0.0
                currency_code: USD
                ledger_balance: 10100.0
                pending_credits: 0.0
              schema:
                $ref: '#/components/schemas/program_reserve_account_balance'
          description: Success
        '400':
          content: {}
          description: User input error/Bad request
        '500':
          content: {}
          description: Server error
      summary: Retrieve reserve account balances
      tags:
      - Program Reserve
  /programreserve/transactions:
    get:
      description: 'Use this endpoint to return a list of credits and debits made to your program reserve account.


        This endpoint supports <</core-api/sorting-and-pagination, sorting and pagination>>.'
      operationId: getProgramreserveTransactions
      parameters:
      - description: Number of resources to retrieve.
        explode: true
        in: query
        name: count
        required: false
        schema:
          default: 5
          format: int32
          type: integer
        style: form
      - description: Sort order index of the first resource in the returned array.
        explode: true
        in: query
        name: start_index
        required: false
        schema:
          default: 0
          format: int32
          type: integer
        style: form
      - description: 'Field on which to sort.

          Use any field in the resource model, or one of the system fields `lastModifiedTime` or `createdTime`.

          Prefix the field name with a hyphen (`-`) to sort in descending order.

          Omit the hyphen to sort in ascending order.'
        explode: true
        in: query
        name: sort_by
        required: false
        schema:
          default: -createdTime
          type: string
        style: form
      responses:
        '200':
          content:
            application/json:
              example:
                count: 2
                data:
                - amount: 120.0
                  created_time: 2024-02-10 21:52:18+00:00
                  currency_code: USD
                  last_modified_time: 2024-02-10 21:52:18+00:00
                  memo: my_memo
                  tags: my, tags
                  token: my_deposit_02
                  transaction_token: '154'
                  type: CREDIT
                - amount: 100.0
                  created_time: 2024-02-10 21:51:28+00:00
                  currency_code: USD
                  last_modified_time: 2024-02-10 21:51:28+00:00
                  memo: my_memo
                  tags: my, tags
                  token: my_deposit_01
                  transaction_token: '153'
                  type: CREDIT
                end_index: 1
                is_more: false
                start_index: 0
              schema:
                $ref: '#/components/schemas/ProgramReserveTransactionListResponse'
          description: Success
        '400':
          content: {}
          description: User input error/Bad request
        '500':
          content: {}
          description: Server error
      summary: List program reserve transactions
      tags:
      - Program Reserve
  /programreserve/deposits:
    get:
      deprecated: true
      operationId: getProgramReserveDeposits
      parameters:
      - description: Number of items to retrieve
        explode: true
        in: query
        name: count
        required: false
        schema:
          default: 5
          format: int32
          type: integer
        style: form
      - description: Start index
        explode: true
        in: query
        name: start_index
        required: false
        schema:
          default: 0
          format: int32
          type: integer
        style: form
      - description: Sort order
        explode: true
        in: query
        name: sort_by
        required: false
        schema:
          default: -createdTime
          type: string
        style: form
      responses:
        default:
          content: {}
          description: successful operation
      tags:
      - Program Reserve
    post:
      deprecated: true
      operationId: deposit
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/program_reserve_deposit_request'
        required: false
      responses:
        default:
          content: {}
          description: successful operation
      tags:
      - Program Reserve
components:
  schemas:
    program_reserve_account_balance:
      properties:
        available_balance:
          description: 'Ledger balance, minus any authorized transactions that have not yet cleared.

            When using JIT Funding, this balance is usually equal to $0.00.'
          readOnly: true
          type: number
        balances:
          additionalProperties:
            $ref: '#/components/schemas/program_reserve_account_balance'
          description: 'Contains program reserve account balance information, organized by currency code.

            Sometimes referred to as a _program funding account_.'
          type: object
        credit_balance:
          description: Not currently in use.
          readOnly: true
          type: number
        currency_code:
          description: Three-digit ISO 4217 currency code.
          type: string
        ledger_balance:
          description: 'When using standard funding: The funds that are available to spend immediately, including funds from any authorized transactions that have not yet cleared.

            When using Just-in-Time (JIT) Funding: Authorized funds that are currently on hold, but not yet cleared.'
          readOnly: true
          type: number
        pending_credits:
          description: ACH loads that have been accepted, but for which the funding time has not yet elapsed.
          readOnly: true
          type: number
      type: object
    program_reserve_deposit_request:
      properties:
        amount:
          description: Amount of the deposit.
          type: number
        currency_code:
          description: Three-digit ISO 4217 currency code.
          type: string
        idempotentHash:
          description: Idempotent hash value associated with the deposit request.
          type: string
        is_collateral:
          type: boolean
        memo:
          description: Memo or note describing the deposit request.
          type: string
        tags:
          description: Comma-delimited list of tags describing the deposit request.
          type: string
        token:
          description: Unique identifier of the deposit request.
          type: string
      required:
      - amount
      - currency_code
      - token
      type: object
    program_reserve_transaction_response:
      properties:
        amount:
          description: 'Amount of the program reserve account credit or debit.

            Sometimes referred to as a _program funding account_.'
          type: number
        created_time:
          description: Date and time when the resource was created, in UTC.
          format: date-time
          type: string
        currency_code:
          description: Three-digit ISO 4217 currency code.
          type: string
        is_collateral:
          type: boolean
        last_modified_time:
          description: The date and time when the resource was last modified, in UTC.
          format: date-time
          type: string
        memo:
          description: Memo or note describing the transaction.
          type: string
        state:
          description: Transaction state.
          enum:
          - PENDING
          - COMPLETE
          type: string
        tags:
          description: Comma-delimited list of tags describing the transaction.
          type: string
        token:
          description: The unique identifier of the transaction response.
          type: string
        transaction_token:
          description: Unique identifier of the transaction.
          type: string
        type:
          description: Transaction type.
          enum:
          - CREDIT
          - DEBIT
          - PENDING_CREDIT
          - PENDING_DEBIT
          type: string
      required:
      - created_time
      - last_modified_time
      type: object
    ProgramReserveTransactionListResponse:
      properties:
        count:
          description: 'Number of resources to retrieve.


            This field is returned if there are resources in your returned array.'
          format: int32
          type: integer
        data:
          description: 'List of program reserve transactions.


            Objects are returned as appropriate to your query.'
          items:
            $ref: '#/components/schemas/program_reserve_transaction_response'
          type: array
        end_index:
          description: 'Sort order index of the last resource in the returned array.


            This field is returned if there are resources in your returned array.'
          format: int32
          type: integer
        is_more:
          default: false
          description: 'A value of `true` indicates that more unreturned resources exist.

            A value of `false` indicates that no more unreturned resources exist.


            This field is returned if there are resources in your returned array.'
          type: boolean
        start_index:
          description: 'Sort order index of the first resource in the returned array.


            This field is returned if there are resources in your returned array.'
          format: int32
          type: integer
      type: object
  securitySchemes:
    mqAppAndAccessToken:
      scheme: basic
      type: http