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

# Obtenir le crédit prépayé

> Returns the prepaid credit you have left and your recent top-ups. Allo pays what you buy through the Partner API from this credit first, then charges your card on file for the rest. Without enough credit and without a card, a request that charges fails with `402 PARTNER_CREDIT_INSUFFICIENT` and nothing is created. Requires the `PARTNER` scope and a Discounted licence (reseller) partner contract.

<Note>
  **Scope requis :** `PARTNER`
</Note>

Renvoie le crédit prépayé qu'il vous reste et vos derniers rechargements. Allo paie chaque montant partenaire sur ce crédit en priorité.

## Comment les montants partenaires sont payés

Tout ce que vous achetez pour vos comptes se paie de la même façon : nouveaux comptes, renouvellements, numéros supplémentaires, sièges des membres et eSIM.

1. Allo prélève d'abord votre crédit prépayé.
2. Si le crédit ne couvre pas tout le montant, Allo débite le reste sur la carte de votre compte de facturation.
3. Si le crédit ne couvre pas le montant et qu'aucune carte n'est enregistrée, la requête échoue avec `402 PARTNER_CREDIT_INSUFFICIENT`. Rien n'est créé ni débité.

Quand vous réglez une facture de crédit prépayé, son montant hors taxes s'ajoute à votre solde. Pour recharger votre crédit, écrivez à [partnership@themobilefirst.co](mailto:partnership@themobilefirst.co).

## Réponse

* `balance_cents` est le crédit restant, dans la plus petite unité de `currency` (centimes pour EUR et USD). Il vaut `0` avant votre premier rechargement.
* `currency` est en minuscules, par exemple `eur`. Il est absent avant votre premier rechargement.
* `prepaid` vaut `true` dès qu'au moins un rechargement a été ajouté à votre crédit.
* `last_top_up` est votre dernier rechargement : `amount_cents`, `currency` et `at`. Il est absent si vous n'en avez aucun.
* `top_ups` liste vos 20 derniers rechargements, du plus récent au plus ancien. Chacun porte `amount_cents` (hors taxes), `currency`, `invoice_id` et `at`.

Seuls les partenaires Licence à prix réduit (revendeurs) peuvent lire ce crédit. Tout autre partenaire reçoit `PARTNER_CONTRACT_CANNOT_PROVISION`, et un compte qui n'est pas un partenaire activé reçoit `PARTNER_ACCESS_REQUIRED`.


## OpenAPI

````yaml GET /v2/api/partner/credit
openapi: 3.0.3
info:
  title: Allo API
  description: >-
    Allo API provides programmatic access to your Allo account, allowing you to
    manage webhooks, retrieve calls and contacts, and send SMS messages.


    All requests to `/v1/api/**` endpoints automatically go through quota
    checking and scope validation.
  version: 1.0.0
  contact:
    name: Allo Support
servers:
  - url: https://api.withallo.com
    description: Production server
security: []
tags:
  - name: Summary Templates
    description: >-
      Manage call summary templates that control how AI-generated call summaries
      are structured for your team.
  - name: Webhooks
    description: >-
      Manage webhook endpoints to receive real-time notifications about events
      in your Allo account. Each endpoint subscribes to one or more event topics
      and is verified with a signing secret.
  - name: Calls
    description: >-
      Retrieve and search call records with filtering and pagination. Filter
      calls by your Allo phone number.
  - name: Contacts
    description: >-
      Search and retrieve contact information with sorting and pagination.
      Includes engagement level tracking.
  - name: SMS
    description: Send SMS messages to phone numbers using your Allo numbers.
  - name: Phone Numbers
    description: Retrieve information about your Allo phone numbers.
  - name: Analytics
    description: Pre-computed call metrics, team performance, and outbound dial funnel
  - name: CRM
    description: Manage people, companies, and deals in your CRM.
  - name: Notes
    description: >-
      Internal team notes on conversations and CRM people, with @mention
      support. Notes are never visible to the contact.
  - name: Threads
    description: >-
      Team discussion threads attached to a conversation item (call, SMS, or
      conversation note). One thread per item.
  - name: AI Receptionist
    description: >-
      Read and write the AI receptionist configuration of a phone line: business
      details, voice, prompt, capabilities, business hours, transfer rules,
      scheduling calendars and knowledge sources.
paths:
  /v2/api/partner/credit:
    get:
      tags:
        - Partner
      summary: Get prepaid credit
      description: >-
        Returns the prepaid credit you have left and your recent top-ups. Allo
        pays what you buy through the Partner API from this credit first, then
        charges your card on file for the rest. Without enough credit and
        without a card, a request that charges fails with `402
        PARTNER_CREDIT_INSUFFICIENT` and nothing is created. Requires the
        `PARTNER` scope and a Discounted licence (reseller) partner contract.
      operationId: getPartnerCredit
      responses:
        '200':
          description: Your prepaid credit
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      balance_cents:
                        type: integer
                        format: int64
                        description: >-
                          Credit left, in the smallest unit of `currency`. `0`
                          before your first top-up.
                        example: 120000
                      currency:
                        type: string
                        description: >-
                          Lowercase ISO 4217 code of your billing account.
                          Omitted before your first top-up.
                        example: eur
                      prepaid:
                        type: boolean
                        description: >-
                          `true` once at least one top-up was added to your
                          credit.
                        example: true
                      last_top_up:
                        type: object
                        description: Your most recent top-up. Omitted when there is none.
                        properties:
                          amount_cents:
                            type: integer
                            format: int64
                            example: 150000
                          currency:
                            type: string
                            example: eur
                          at:
                            type: string
                            format: date-time
                            example: '2026-10-01T09:12:44Z'
                      top_ups:
                        type: array
                        description: Your 20 most recent top-ups, newest first.
                        items:
                          type: object
                          properties:
                            amount_cents:
                              type: integer
                              format: int64
                              description: Amount added to your credit, excluding tax.
                              example: 150000
                            currency:
                              type: string
                              example: eur
                            invoice_id:
                              type: string
                              description: The invoice the top-up was paid with.
                              example: in_1Q2w3E4r5T6y7U8i
                            at:
                              type: string
                              format: date-time
                              example: '2026-10-01T09:12:44Z'
              example:
                data:
                  balance_cents: 120000
                  currency: eur
                  prepaid: true
                  last_top_up:
                    amount_cents: 150000
                    currency: eur
                    at: '2026-10-01T09:12:44Z'
                  top_ups:
                    - amount_cents: 150000
                      currency: eur
                      invoice_id: in_1Q2w3E4r5T6y7U8i
                      at: '2026-10-01T09:12:44Z'
        '401':
          $ref: '#/components/responses/ApiUnauthorized'
        '403':
          description: >-
            The API key lacks the PARTNER scope, your account is not an enabled
            partner (PARTNER_ACCESS_REQUIRED), or your partner contract cannot
            create accounts (PARTNER_CONTRACT_CANNOT_PROVISION).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
        '429':
          $ref: '#/components/responses/ApiRateLimited'
      security:
        - ApiKeyAuth: []
components:
  responses:
    ApiUnauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiRateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  schemas:
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            request_id:
              type: string
            retry_after_seconds:
              type: integer
              nullable: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.