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

# Get auto-recharge config for a customer

> Returns the stored auto-recharge configuration (and display block) for the given customer, or a null config when none is set.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/sdk/auto-recharge
openapi: 3.0.0
info:
  contact: {}
  description: The SolvaPay REST API specification
  title: SolvaPay REST API
  version: '1.0'
servers: []
security: []
tags: []
paths:
  /v1/sdk/auto-recharge:
    get:
      tags:
        - Auto Recharge
      summary: Get auto-recharge config for a customer
      description: >-
        Returns the stored auto-recharge configuration (and display block) for
        the given customer, or a null config when none is set.
      operationId: AutoRechargeSdkController_getAutoRecharge
      parameters:
        - in: query
          name: customerRef
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutoRechargeGetResponse'
          description: Current auto-recharge config, if present.
        '400':
          description: customerRef query parameter is required
      security:
        - SecretKey: []
components:
  schemas:
    AutoRechargeGetResponse:
      properties:
        config:
          allOf:
            - $ref: '#/components/schemas/AutoRechargeConfigDto'
          description: Current auto-recharge config, or null when not configured
          nullable: true
        display:
          $ref: '#/components/schemas/AutoRechargeDisplayDto'
      type: object
    AutoRechargeConfigDto:
      properties:
        enabled:
          description: Whether auto-recharge is enabled
          example: true
          type: boolean
        failureCount:
          description: Consecutive failure count
          example: 0
          type: number
        fundingSourceType:
          description: Funding source type
          enum:
            - saved_card
            - tokenized_card
          type: string
        inFlightPaymentIntentId:
          description: PaymentIntent ID of an in-flight recharge
          type: string
        lastChargeAt:
          description: Timestamp of the last successful charge
          type: string
        lockAcquiredAt:
          description: Timestamp the processing lock was acquired
          type: string
        maxMonthlySpendMinor:
          description: Optional monthly spend cap in topup.currency minor units
          example: 10000
          type: number
        monthlySpendMinor:
          description: Successful auto-recharge spend in the current UTC month
          example: 4500
          type: number
        monthlySpendPeriod:
          description: UTC YYYY-MM period key for monthlySpendMinor
          example: 2026-07
          type: string
        paymentMethodId:
          description: Saved payment method ID backing the recharge
          type: string
        status:
          description: Current config status
          enum:
            - active
            - disabled
            - failed
            - pending_setup
          type: string
        topup:
          $ref: '#/components/schemas/AutoRechargeTopupDto'
        trigger:
          $ref: '#/components/schemas/AutoRechargeTriggerDto'
        updatedAt:
          description: Last update timestamp
          type: string
      required:
        - enabled
        - trigger
        - topup
        - fundingSourceType
        - status
        - failureCount
        - monthlySpendMinor
        - updatedAt
      type: object
    AutoRechargeDisplayDto:
      properties:
        currency:
          description: Display currency code
          example: USD
          type: string
        exchangeRate:
          description: Exchange rate used for display conversion
          example: 1
          type: number
        formatted:
          $ref: '#/components/schemas/AutoRechargeDisplayFormattedDto'
        rateSource:
          description: Source of the exchange rate
          example: live
          type: string
        thresholdAmountMajor:
          description: Threshold amount in display-currency major units
          example: 5
          type: number
        topupAmountMajor:
          description: Top-up amount in display-currency major units
          example: 20
          type: number
      required:
        - thresholdAmountMajor
        - topupAmountMajor
        - currency
        - formatted
        - exchangeRate
        - rateSource
      type: object
    AutoRechargeTopupDto:
      properties:
        amountMinor:
          description: Top-up amount in currency minor units
          example: 2000
          type: number
        currency:
          description: ISO 4217 currency code
          example: USD
          type: string
        mode:
          description: Top-up mode
          enum:
            - fixed
          example: fixed
          type: string
      required:
        - mode
        - amountMinor
        - currency
      type: object
    AutoRechargeTriggerDto:
      properties:
        thresholdAmountMinor:
          description: Display-currency minor units for the balance threshold
          example: 500
          type: number
        type:
          description: Trigger kind
          enum:
            - balance
          example: balance
          type: string
      required:
        - type
        - thresholdAmountMinor
      type: object
    AutoRechargeDisplayFormattedDto:
      properties:
        threshold:
          description: Formatted threshold amount
          example: $5.00
          type: string
        topup:
          description: Formatted top-up amount
          example: $20.00
          type: string
      required:
        - threshold
        - topup
      type: object
  securitySchemes:
    SecretKey:
      bearerFormat: JWT
      description: >-
        Provider secret API key (sk_live_… / sk_test_…) supplied as a Bearer
        token.
      scheme: bearer
      type: http

````