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

# List auto recharge preferences

> Returns the payment auto recharge preferences.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/account-billing/payment.yml get /payments/auto_recharge_prefs
openapi: 3.1.0
info:
  title: Telnyx Payment APIs
  version: 2.0.0
  description: API for Payment APIs.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /payments/auto_recharge_prefs:
    get:
      tags:
        - AutoRechargePreferences
      summary: List auto recharge preferences
      description: Returns the payment auto recharge preferences.
      operationId: GetAutoRechargePrefs
      responses:
        '200':
          $ref: '#/components/responses/AutoRechargePrefResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Resource not found
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            const autoRechargePrefs = await
            client.payment.autoRechargePrefs.list();


            console.log(autoRechargePrefs.data);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            auto_recharge_prefs = client.payment.auto_recharge_prefs.list()
            print(auto_recharge_prefs.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tautoRechargePrefs, err := client.Payment.AutoRechargePrefs.List(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", autoRechargePrefs.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.payment.autorechargeprefs.AutoRechargePrefListParams;

            import
            com.telnyx.sdk.models.payment.autorechargeprefs.AutoRechargePrefListResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    AutoRechargePrefListResponse autoRechargePrefs = client.payment().autoRechargePrefs().list();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            auto_recharge_prefs = telnyx.payment.auto_recharge_prefs.list

            puts(auto_recharge_prefs)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $autoRechargePrefs = $client->payment->autoRechargePrefs->list();

              var_dump($autoRechargePrefs);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx payment:auto-recharge-prefs list \
              --api-key 'My API Key'
components:
  responses:
    AutoRechargePrefResponse:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/AutoRechargePref'
  schemas:
    AutoRechargePref:
      type: object
      properties:
        id:
          type: string
          example: '1524126400473204723'
          description: The unique identifier for the auto recharge preference.
        record_type:
          type: string
          example: auto_recharge_pref
          description: The record type.
        threshold_amount:
          type: string
          example: '104.00'
          description: The threshold amount at which the account will be recharged.
          x-format: decimal
        recharge_amount:
          type: string
          example: '104.00'
          description: >-
            The amount to recharge the account, the actual recharge amount will
            be the amount necessary to reach the threshold amount plus the
            recharge amount.
          x-format: decimal
        enabled:
          type: boolean
          example: true
          description: Whether auto recharge is enabled.
        invoice_enabled:
          type: boolean
          example: true
        preference:
          type: string
          enum:
            - credit_paypal
            - ach
          example: credit_paypal
          description: The payment preference for auto recharge.
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````