> ## 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.2024-07-30.product.live GET /credits/{id}
openapi: 3.0.0
info:
  title: Billing
  description: Manage Billing
  version: 0.0.1
servers:
  - url: https://dev.seqhq.io
    description: E2E
  - url: https://dev.seqhq.io
    description: DEV
  - url: https://sandbox.sequencehq.com
    description: SANDBOX
  - url: https://eu.sequencehq.com
    description: PRODUCTION
security: []
tags:
  - name: Prices
  - name: Discounts
  - name: Credits
  - name: Billing Schedules
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/CreditGrant2'
                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:
                CreditGrant2:
                  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:
    CreditGrant2:
      required:
        - amount
        - costOfCredit
        - createdAt
        - creditUnitType
        - currency
        - customerId
        - id
        - integrationIds
        - name
        - sequenceAccountId
      type: object
      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
      properties:
        id:
          type: string
          description: Credit Grant ID
          example: 746fc7f2-8098-4fe7-953c-7d51c580a126
        sequenceAccountId:
          type: string
          description: Sequence Account ID
          example: dce9ae85-d8d0-42b4-bcad-f221a64363c6
        customerId:
          type: string
          description: The ID of the Customer Credit is granted to
          example: 61b083e0-1faa-47ca-9aeb-6205da8f6c47
        name:
          type: string
          description: Name of the Credit Grant
          example: On-boarding Credits
        creditUnitType:
          $ref: '#/components/schemas/CreditUnitType'
          description: Type of the Unit of Credit
        currency:
          $ref: '#/components/schemas/Currency'
          description: Currency of Cash Credit (if CreditUnitType is CURRENCY)
        metricId:
          type: string
          description: Metric ID (if CreditUnitType is METRIC)
          example: f092246c-6b90-4106-bcca-304ccf06bf45
        amount:
          type: number
          description: Amount of Units Granted
          example: 10
        costOfCredit:
          type: number
          description: Cost of Credit Grant, to be Invoiced to the Customer
          example: 10
        taxRateId:
          type: string
          description: Tax Rate ID for Credit Purchase
          example: 179d1ab3-cc96-48e2-9310-067b0b42d47c
        effectiveDate:
          type: string
          description: First Day Credit Grant can be consumed
          example: '2023-01-01'
        expiryDate:
          type: string
          description: Last Day Credit Grant can be consumed
          example: '2023-01-31'
        createdAt:
          type: string
          description: The created at
          example: '2022-10-07T14:12:08.826121Z'
        creditNoteId:
          type: string
          description: ID of the credit note that created this grant (if applicable)
          example: 73086198-8752-4ec9-a99b-16209a32dc6c
        integrationIds:
          type: array
          description: IDs in external integrations
          example:
            - service: Xero
              id: 74ed2615-4730-49ab-9445-74f31723a206
              isPending: false
          items:
            $ref: '#/components/schemas/IntegrationId'
    CreditUnitType:
      type: string
      example: CURRENCY
      enum:
        - CURRENCY
        - METRIC
    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
    IntegrationId:
      required:
        - id
        - isPending
        - service
      type: object
      example:
        service: Xero
        id: '123'
        isPending: false
      properties:
        service:
          $ref: '#/components/schemas/IntegrationService'
        id:
          type: string
          example: '123'
        isPending:
          type: boolean
          example: false
    IntegrationService:
      type: string
      example: Xero
      enum:
        - Amazon_Redshift
        - GoCardless
        - Google_BigQuery
        - Google_Sheets
        - HubSpot
        - NetSuite
        - QuickBooks_Online
        - Salesforce
        - Slack
        - Snowflake
        - Stripe
        - Xero
        - Avalara
        - Anrok
        - Attio
        - Numeral
        - Rillet
        - Sphere

````