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

# Get a credit grant

> Get a credit grant by ID



## OpenAPI

````yaml billing.latest.product.live GET /credits/{id}
openapi: 3.0.0
info:
  title: Billing
  description: Manage Billing
  version: '0.1'
servers:
  - url: https://dev.seqhq.io/api
    description: DEV
  - url: https://sandbox.sequencehq.com/api
    description: SANDBOX
  - url: https://eu.sequencehq.com/api
    description: PRODUCTION
security: []
tags: []
paths:
  /credits/{id}:
    servers: []
    parameters: []
    get:
      tags:
        - Credits
      summary: Get a credit grant
      description: Get a credit grant by ID
      operationId: getCreditsById
      parameters:
        - name: id
          in: path
          description: Credit grant ID
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: >-
            Your [API credentials](/reference/authentication). Eg. `Basic
            {credentials}`.
          required: true
          schema:
            type: string
        - name: Sequence-Version
          in: header
          description: Use this header to select an API version
          required: false
          schema:
            type: string
            enum:
              - '2024-07-30'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditGrant'
                example:
                  id: 746fc7f2-8098-4fe7-953c-7d51c580a126
                  sequenceAccountId: dce9ae85-d8d0-42b4-bcad-f221a64363c6
                  customerId: 61b083e0-1faa-47ca-9aeb-6205da8f6c47
                  name: On-boarding Credits
                  creditUnitType: CURRENCY
                  currency: GBP
                  metricId: f092246c-6b90-4106-bcca-304ccf06bf45
                  amount: 10
                  costOfCredit: 10
                  taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                  effectiveDate: '2023-01-01'
                  expiryDate: '2023-01-31'
                  createdAt: '2022-10-07T14:12:08.826121Z'
                  creditNoteId: 73086198-8752-4ec9-a99b-16209a32dc6c
                  integrationIds:
                    - service: Xero
                      id: 74ed2615-4730-49ab-9445-74f31723a206
                      isPending: false
              examples:
                CreditGrant:
                  summary: ''
                  value:
                    id: 746fc7f2-8098-4fe7-953c-7d51c580a126
                    sequenceAccountId: dce9ae85-d8d0-42b4-bcad-f221a64363c6
                    customerId: 61b083e0-1faa-47ca-9aeb-6205da8f6c47
                    name: On-boarding Credits
                    creditUnitType: CURRENCY
                    currency: GBP
                    metricId: f092246c-6b90-4106-bcca-304ccf06bf45
                    amount: 10
                    costOfCredit: 10
                    taxRateId: 179d1ab3-cc96-48e2-9310-067b0b42d47c
                    effectiveDate: '2023-01-01'
                    expiryDate: '2023-01-31'
                    createdAt: '2022-10-07T14:12:08.826121Z'
                    creditNoteId: 73086198-8752-4ec9-a99b-16209a32dc6c
                    integrationIds:
                      - service: Xero
                        id: 74ed2615-4730-49ab-9445-74f31723a206
                        isPending: false
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '500':
          description: Internal Server Error
          content: {}
components:
  schemas:
    CreditGrant:
      required:
        - costOfCredit
        - createdAt
        - currency
        - currentBalance
        - customerId
        - id
        - name
        - originalAmount
        - sequenceAccountId
        - type
      type: object
      example:
        id: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
        sequenceAccountId: a507e782-d26b-4d34-92b9-aacd1667e1f0
        customerId: eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb
        type: CASH
        currency: GBP
        metricId: b84f5290-fe95-4c6f-bedc-477700125265
        name: GBP
        originalAmount: '10'
        currentBalance: '1'
        expiryDate: '2024-01-02'
        costOfCredit: '10'
        taxRateId: b3c37ea3-96bb-44fb-baed-01eb38d3328e
        effectiveDate: '2024-01-01'
        createdAt: '2024-01-01T12:00:00Z'
      properties:
        id:
          type: string
          description: Credit Grant ID
          example: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
        sequenceAccountId:
          type: string
          description: Sequence account ID
          example: a507e782-d26b-4d34-92b9-aacd1667e1f0
        customerId:
          type: string
          description: Customer ID
          example: eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb
        type:
          $ref: '#/components/schemas/CreditType'
          description: Type of the Credit - will either be CASH or USAGE
        currency:
          $ref: '#/components/schemas/Currency'
          description: Currency
        metricId:
          type: string
          description: Usage metric ID (if type is USAGE)
          example: b84f5290-fe95-4c6f-bedc-477700125265
        name:
          type: string
          description: >-
            Name of the Credit - will either be the currency or name of the
            metric
          example: GBP
        originalAmount:
          type: string
          description: Amount of credits originally granted
          example: '10'
        currentBalance:
          type: string
          description: Amount remaining of Credits Granted
          example: '1'
        expiryDate:
          type: string
          description: Last Day Credit Grant can be consumed
          format: date
          example: '2024-01-02'
        costOfCredit:
          type: string
          description: Cost of credit grant
          example: '10'
        taxRateId:
          type: string
          description: Tax Rate ID for Credit Purchase
          example: b3c37ea3-96bb-44fb-baed-01eb38d3328e
        effectiveDate:
          type: string
          description: First Day Credit Grant can be consumed
          format: date
          example: '2024-01-01'
        createdAt:
          type: string
          description: The created at
          example: '2024-01-01T12:00:00Z'
    CreditType:
      type: string
      example: CASH
      enum:
        - CASH
        - USAGE
    Currency:
      type: string
      example: GBP
      enum:
        - AED
        - ARS
        - AUD
        - BRL
        - BGN
        - CAD
        - CHF
        - CLP
        - CNY
        - COP
        - CZK
        - DKK
        - EGP
        - EUR
        - GBP
        - HKD
        - ILS
        - INR
        - ISK
        - JPY
        - KRW
        - MXN
        - NOK
        - NZD
        - PLN
        - SAR
        - SEK
        - SGD
        - THB
        - USD
        - UYU
        - ZAR

````