> ## Documentation Index
> Fetch the complete documentation index at: https://www.spacebring.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve credit transactions

> Retrieve credits transactions. <h3>OAuth</h3>Required scopes: <code>transactions.readonly</code> or <code>transactions</code>



## OpenAPI

````yaml /assets/openapi.json get /transactions/credits/v1
openapi: 3.0.2
info:
  title: Spacebring
  version: 1.0.0
  termsOfService: https://www.spacebring.com/terms
servers:
  - url: https://api.spacebring.com
security: []
paths:
  /transactions/credits/v1:
    get:
      tags:
        - Transactions
      summary: Retrieve credit transactions
      description: >-
        Retrieve credits transactions. <h3>OAuth</h3>Required scopes:
        <code>transactions.readonly</code> or <code>transactions</code>
      operationId: getCreditsTransactions
      parameters:
        - in: query
          name: companyRef
          required: false
          description: >-
            Deprecated. Use customerRef instead. The id of the company to get
            transactions for.
          schema:
            deprecated: true
            type: string
            format: uuid
        - in: query
          name: createDate[gte]
          required: false
          description: >-
            Get transactions with greater or equal createDate. Example:
            createDate[gte]=2021-05-21T10:00:00Z
          schema:
            type: string
        - in: query
          name: createDate[lte]
          required: false
          description: >-
            Get transactions with less or equal createDate. Example:
            createDate[lte]=2021-05-21T10:00:00Z
          schema:
            type: string
        - in: query
          name: customerRef
          required: false
          description: >-
            UUID of the company or membership whose credits transactions to
            list.
          schema:
            type: string
            format: uuid
        - in: query
          name: limit
          required: false
          description: >-
            Maximum number of transactions per page. Defaults to 25 when omitted
            or invalid; values above 100 are capped at 100.
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - in: query
          name: locationRef
          required: false
          description: UUID of the location whose credits transactions to list.
          schema:
            type: string
            format: uuid
        - in: query
          name: membershipRef
          required: false
          description: >-
            Deprecated. Use customerRef instead. The id of the membership to get
            transactions for.
          schema:
            deprecated: true
            type: string
            format: uuid
        - in: query
          name: nextPageToken
          required: false
          description: Token to retrieve the next page of results.
          schema:
            type: string
        - in: query
          name: status
          required: false
          description: >-
            Filter by transaction status. Comma-separated status values, e.g.
            `status=succeeded,pending`.
          schema:
            type: string
        - in: query
          name: type
          required: false
          description: >-
            Filter by transaction type. Comma-separated storage type values,
            e.g. `type=refund,booking`. Matches analytics report type filters.
          schema:
            type: string
        - in: header
          name: spacebring-network-id
          schema:
            type: string
            format: uuid
          required: false
          description: >-
            The id of the network. Required when using bearer token
            authentication
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getCreditsTransactions'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
      security:
        - BasicAuth: []
        - OAuth2:
            - transactions
components:
  schemas:
    getCreditsTransactions:
      type: object
      properties:
        nextPageToken:
          description: Pagination token to fetch the next page of results.
          type: string
        searchQueryNext:
          description: >-
            Ready-to-use query string with the current filters and nextPageToken
            to fetch the next page of results.
          type: string
        transactions:
          type: array
          items:
            type: object
            properties:
              amount:
                type: number
                description: Total credits amount (absolute sum of expiring and permanent).
              amounts:
                type: array
                items:
                  type: object
                  properties:
                    amount:
                      type: number
                      description: Amount deducted from this balance bucket.
                    expirationDate:
                      description: Expiration date for expiring balances.
                      type: string
                      format: date-time
                    subscriptionRef:
                      description: Subscription associated with expiring balances.
                      type: string
                      format: uuid
                    type:
                      type: string
                      enum:
                        - expiring
                        - permanent
                      description: Balance bucket type.
                  required:
                    - amount
                    - type
                  additionalProperties: false
                description: Per-bucket amounts for charge transactions.
              booking:
                deprecated: true
                description: Deprecated. Use product instead.
                type: object
                properties:
                  endDate:
                    description: Booking end date.
                    type: string
                    format: date-time
                  id:
                    type: string
                    format: uuid
                    description: Booking id.
                  resource:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Resource id.
                      title:
                        type: string
                        description: Resource title.
                    required:
                      - id
                      - title
                    additionalProperties: false
                    description: Booked resource.
                  startDate:
                    description: Booking start date.
                    type: string
                    format: date-time
                required:
                  - id
                  - resource
                additionalProperties: false
              company:
                deprecated: true
                description: Deprecated. Use customer instead.
                type: object
                properties:
                  createDate:
                    type: string
                    format: date-time
                    description: ISO timestamp of company creation.
                  id:
                    type: string
                    format: uuid
                    description: Company id.
                  locationRef:
                    type: string
                    format: uuid
                    description: Location id.
                  logo:
                    description: Company logo.
                    type: object
                    properties:
                      key:
                        type: string
                        description: Storage key of the company logo.
                      url:
                        type: string
                        description: Public URL of the company logo.
                    required:
                      - key
                      - url
                    additionalProperties: false
                  metadata:
                    description: Company metadata.
                    type: object
                    additionalProperties: {}
                  notes:
                    description: Internal notes.
                    type: string
                  publicLogoUrl:
                    description: Public logo URL derived from the company website.
                    type: string
                  subscriptionRef:
                    nullable: true
                    description: Primary subscription id.
                    type: string
                    format: uuid
                  title:
                    description: Company name.
                    type: string
                required:
                  - createDate
                  - id
                  - locationRef
                  - subscriptionRef
                  - title
                additionalProperties: false
              companyRef:
                deprecated: true
                description: Deprecated. Use customer instead.
                type: string
                format: uuid
              createDate:
                type: string
                format: date-time
                description: ISO timestamp of when the transaction was created.
              customer:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: ID of the company or membership.
                  logo:
                    description: Company logo.
                    type: object
                    properties:
                      key:
                        type: string
                      url:
                        type: string
                    required:
                      - key
                      - url
                    additionalProperties: false
                  title:
                    description: Company name.
                    type: string
                  type:
                    type: string
                    enum:
                      - company
                      - user
                    description: Whether the customer is a company or a user.
                  user:
                    description: User details for membership customers.
                    type: object
                    properties:
                      about:
                        nullable: true
                        type: string
                      email:
                        nullable: true
                        type: string
                      id:
                        type: string
                        format: uuid
                      name:
                        nullable: true
                        type: string
                      phoneNumber:
                        nullable: true
                        type: string
                      photoUrl:
                        nullable: true
                        type: string
                      surname:
                        nullable: true
                        type: string
                    required:
                      - id
                    additionalProperties: false
                required:
                  - id
                  - type
                additionalProperties: false
                description: Customer associated with this transaction.
              description:
                description: Transaction description.
                type: string
              discounts:
                description: Discounts applied to the transaction.
                type: array
                items:
                  type: object
                  properties:
                    coupon:
                      type: object
                      properties:
                        amountOff:
                          description: Fixed amount discount.
                          type: number
                        currencyCode:
                          description: Currency of the fixed amount discount.
                          type: string
                        id:
                          type: string
                          description: Coupon id.
                        percentOff:
                          description: Percentage discount.
                          type: number
                        productTypes:
                          description: Product types the coupon applies to.
                          type: array
                          items:
                            type: string
                        type:
                          description: Coupon type.
                          type: string
                      required:
                        - id
                        - type
                      additionalProperties: false
                      description: Applied coupon.
                    promocode:
                      description: Promocode the coupon was applied with.
                      type: object
                      properties:
                        code:
                          type: string
                          description: Promocode.
                        expiration:
                          description: Promocode expiration date.
                          type: string
                        id:
                          type: string
                          format: uuid
                          description: Promocode id.
                        limitByFirstPurchase:
                          description: >-
                            Whether the promocode is limited to the first
                            purchase.
                          type: boolean
                      required:
                        - code
                        - id
                      additionalProperties: false
                    subscriptionId:
                      description: ID of the subscription this discount is associated with.
                      type: string
                      format: uuid
                  required:
                    - coupon
                  additionalProperties: false
              expiringAmount:
                deprecated: true
                description: Deprecated. Use amounts instead.
                type: number
              id:
                type: string
                format: uuid
                description: Unique identifier of the transaction.
              locationRef:
                type: string
                format: uuid
                description: ID of the organization (location).
              membershipRef:
                deprecated: true
                description: Deprecated. Use customer instead.
                type: string
                format: uuid
              membershipRefCreator:
                deprecated: true
                description: Deprecated. Use userCreatedBy instead.
                type: string
                format: uuid
              networkRef:
                type: string
                format: uuid
                description: ID of the network.
              order:
                deprecated: true
                description: Deprecated. Use product instead.
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Order id.
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: Order item id.
                        product:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: Product id.
                            option:
                              description: Product option.
                              type: object
                              properties:
                                id:
                                  type: string
                                  format: uuid
                                  description: Product option id.
                                title:
                                  type: string
                                  description: Product option title.
                              required:
                                - id
                                - title
                              additionalProperties: false
                            title:
                              type: string
                              description: Product title.
                          required:
                            - id
                            - title
                          additionalProperties: false
                          description: Ordered product.
                        quantity:
                          type: number
                          description: Quantity of units.
                      required:
                        - id
                        - product
                        - quantity
                      additionalProperties: false
                    description: Order items.
                required:
                  - id
                  - items
                additionalProperties: false
              permanentAmount:
                deprecated: true
                description: Deprecated. Use amounts instead.
                type: number
              product:
                description: Product details.
                type: object
                properties:
                  bookingRef:
                    description: ID of the associated booking.
                    type: string
                    format: uuid
                  eventTicketRef:
                    description: ID of the associated event ticket.
                    type: string
                    format: uuid
                  orderRef:
                    description: ID of the associated order.
                    type: string
                    format: uuid
                  title:
                    type: string
                    description: Display title of the product.
                  type:
                    description: Product type.
                    type: string
                    enum:
                      - booking
                      - eventTicket
                      - order
                additionalProperties: false
              refund:
                deprecated: true
                description: Deprecated.
                type: object
                properties:
                  amount:
                    type: number
                    description: Refunded amount.
                  createDate:
                    type: string
                    format: date-time
                    description: Refund creation timestamp.
                required:
                  - amount
                  - createDate
                additionalProperties: false
              status:
                type: string
                description: Transaction status.
              ticket:
                deprecated: true
                description: Deprecated. Use product instead.
                type: object
                properties:
                  createDate:
                    description: Ticket creation timestamp.
                    type: string
                    format: date-time
                  event:
                    description: Event details.
                    type: object
                    properties:
                      endDate:
                        description: Event end date.
                        type: string
                        format: date-time
                      id:
                        type: string
                        format: uuid
                        description: Event id.
                      startDate:
                        description: Event start date.
                        type: string
                        format: date-time
                      title:
                        type: string
                        description: Event title.
                    required:
                      - id
                      - title
                    additionalProperties: false
                  id:
                    type: string
                    format: uuid
                    description: Ticket id.
                  quantity:
                    type: number
                    description: Number of tickets.
                required:
                  - id
                  - quantity
                additionalProperties: false
              type:
                type: string
                enum:
                  - adminAllocation
                  - adminCharge
                  - booking
                  - eventTicket
                  - expiration
                  - order
                  - purchaseAllocation
                  - refund
                  - subscriptionAllocation
                  - subscriptionExpiration
                description: Credits transaction type.
              userCreatedBy:
                description: User who created the transaction.
                type: object
                properties:
                  about:
                    nullable: true
                    type: string
                  email:
                    nullable: true
                    type: string
                  id:
                    type: string
                    format: uuid
                  name:
                    nullable: true
                    type: string
                  phoneNumber:
                    nullable: true
                    type: string
                  photoUrl:
                    nullable: true
                    type: string
                  surname:
                    nullable: true
                    type: string
                required:
                  - id
                additionalProperties: false
              userCreator:
                deprecated: true
                description: Deprecated. Use userCreatedBy instead.
                type: object
                properties:
                  about:
                    nullable: true
                    type: string
                  email:
                    nullable: true
                    type: string
                  id:
                    type: string
                    format: uuid
                  name:
                    nullable: true
                    type: string
                  phoneNumber:
                    nullable: true
                    type: string
                  photoUrl:
                    nullable: true
                    type: string
                  surname:
                    nullable: true
                    type: string
                required:
                  - id
                additionalProperties: false
              userOwner:
                deprecated: true
                description: Deprecated. Use customer.user instead.
                type: object
                properties:
                  about:
                    nullable: true
                    type: string
                  email:
                    nullable: true
                    type: string
                  id:
                    type: string
                    format: uuid
                  name:
                    nullable: true
                    type: string
                  phoneNumber:
                    nullable: true
                    type: string
                  photoUrl:
                    nullable: true
                    type: string
                  surname:
                    nullable: true
                    type: string
                required:
                  - id
                additionalProperties: false
              userRefCreator:
                deprecated: true
                description: Deprecated. Use userCreatedBy instead.
                type: string
                format: uuid
              userRefOwner:
                deprecated: true
                description: Deprecated. Use customer.user instead.
                type: string
                format: uuid
            required:
              - amount
              - amounts
              - createDate
              - customer
              - id
              - locationRef
              - networkRef
              - status
              - type
            additionalProperties: false
          description: List of credits transactions.
      required:
        - transactions
      additionalProperties: false
    responseError:
      type: object
      properties:
        message:
          type: string
        type:
          type: string
  securitySchemes:
    BasicAuth:
      type: http
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#basic-authentication)
        for how to authorize your requests
      scheme: basic
    OAuth2:
      type: oauth2
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#oauth2)
        for how to authorize your requests
      flows:
        authorizationCode:
          authorizationUrl: https://api.spacebring.com/oauth2/authorize
          tokenUrl: https://api.spacebring.com/oauth2/token
          refreshUrl: https://api.spacebring.com/oauth2/token
          scopes:
            benefits.readonly: Read benefits and applications
            benefits: Read and write benefits and applications
            community.readonly: Read community companies and memberships
            community: Read and write community companies and memberships
            events.readonly: Read events and tickets
            events: Read and write events and tickets
            feed.readonly: Read feed posts
            feed: Read and write feed posts
            invoices.readonly: Read contracts, credit notes, discounts and invoices
            invoices: Read and write contract, credit notes, discounts and invoices
            locations.readonly: Read locations
            locations: Read and write locations
            plans.readonly: Read plans
            plans: Read and write plans
            resources.readonly: Read resources and bookings
            resources: Read and write resources and bookings
            subscriptions.readonly: Read subscriptions
            subscriptions: Read and write subscriptions
            shop.readonly: Read products and orders
            shop: Read and write products and orders
            support.readonly: Read support tickets
            support: Read and write support tickets
            transactions.readonly: Read transactions
            transactions: Read and write transactions
            visitors.readonly: Read visitors
            visitors: Read and write visitors

````