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

# Update credit product

> Update the configuration of a customer's credit product.



## OpenAPI

````yaml put /v1/customers/{id}/credits/{productId}
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v1/customers/{id}/credits/{productId}:
    put:
      tags:
        - Customers > Credits
      summary: Update credit product
      description: Update the configuration of a customer's credit product.
      operationId: updateCustomerCredit
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
        - schema:
            type: string
          required: true
          name: productId
          in: path
      requestBody:
        description: Update credit payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCredit'
      responses:
        '200':
          description: Updated credit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Credit'
      security:
        - bearer: []
components:
  schemas:
    UpdateCredit:
      type: object
      properties:
        name:
          type: string
          description: Credit name.
          example: Credit name
        low_count_threshold:
          type:
            - number
            - 'null'
          description: Value indicating a low threshold.
          example: 10
        auto_topup:
          anyOf:
            - type: object
              properties:
                credit_count:
                  type: number
                  description: >-
                    Value indicating a number of credits to add. If `price_id`
                    is defined, this value must correspond to a full credit pack
                    for the price.
                  example: 32
                amount_excluding_tax:
                  type: number
                  description: >-
                    Custom amount for the added credits. Either
                    `amount_excluding_tax` or `price_id` must be defined.
                    Expressed in currency's smallest unit.
                  example: 2000
                price_id:
                  type: string
                  description: >-
                    Price ID used to add credits. The price must be of type
                    `bundle`. Either `amount_excluding_tax` or `price_id` must
                    be defined.
              description: Auto top-up options.
            - type: 'null'
            - type: 'null'
          description: Auto top-up options.
    Credit:
      type: object
      properties:
        product_id:
          type: string
          description: Credit product ID.
          example: itm_3kXODDF42QXtnL
        customer_id:
          type: string
          description: Customer ID related to the credit.
          example: cus_Typ0px2W0aiEtl
        name:
          type: string
          description: Credit name.
          example: Credit name
        current_balance:
          type: number
          description: Current credit balance.
          example: 2000
        low_count_threshold:
          type:
            - number
            - 'null'
          description: Value indicating a low threshold.
          example: 10
        last_refreshed_at:
          type: string
          format: date-time
          description: >-
            Credit last refresh date. UTC date time string in the [ISO
            8601](https://en.wikipedia.org/wiki/ISO_8601) format.
          example: '2025-11-23T09:00:01.860Z'
        auto_topup:
          type:
            - object
            - 'null'
          properties:
            credit_count:
              type: number
              description: >-
                Value indicating a number of credits to add. If `price_id` is
                defined, this value must correspond to a full credit pack for
                the price.
              example: 32
            amount_excluding_tax:
              type:
                - number
                - 'null'
              description: >-
                Custom amount for the added credits. Either
                `amount_excluding_tax` or `price_id` must be defined. Expressed
                in currency's smallest unit.
              example: null
            price_id:
              type:
                - string
                - 'null'
              description: >-
                Price ID used to add credits. The price must be of type
                `bundle`. Either `amount_excluding_tax` or `price_id` must be
                defined.
              example: null
          required:
            - credit_count
            - amount_excluding_tax
            - price_id
          description: Auto top-up options.
        created_at:
          type: string
          format: date-time
          description: >-
            Credit creation date. UTC date time string in the [ISO
            8601](https://en.wikipedia.org/wiki/ISO_8601) format.
          example: '2025-10-12T07:00:01.860Z'
        updated_at:
          type: string
          format: date-time
          description: >-
            Credit last edition date. UTC date time string in the [ISO
            8601](https://en.wikipedia.org/wiki/ISO_8601) format.
          example: '2025-10-13T10:00:01.860Z'
      required:
        - product_id
        - customer_id
        - name
        - current_balance
        - low_count_threshold
        - last_refreshed_at
        - auto_topup
        - created_at
        - updated_at
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````