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

# Get billing

> **Scope:** none. Every app can call it.

Your app's subscription on the store (`null` when your app has no
plans) and its usage wallet. Takes no query parameters.

Works while the subscription is `suspended`, when the rest of the API
answers `402`, so your app can see why.




## OpenAPI

````yaml /openapi.json get /billing
openapi: 3.1.0
info:
  title: EasyOrders Admin API
  version: v1
  summary: Read and write a merchant's store data from your app.
  description: |
    The EasyOrders Admin API lets an installed app work with one merchant's
    store: its orders, shipping settings and shipping areas, within the
    scopes the merchant approved.

    - Every request needs an access token (`Authorization: Bearer eo_at_...`)
      from the OAuth flow. A token works on one store only.
    - Request and response bodies are JSON. Unknown fields and query
      parameters are refused.
    - Errors share one shape: `{"error": {"code", "message", "details"}}`.
    - `v1` is stable: new fields and endpoints are added to it; a breaking
      change ships as a new version.
  contact:
    name: EasyOrders developers
    url: https://easyorders.eg
servers:
  - url: https://api.easy-orders.net/api/partners-apps/v1
    description: Production
security:
  - accessToken: []
tags:
  - name: Article categories
    description: >-
      The categories of the store's blog, which articles name in their
      `category_ids`.
  - name: Articles
    description: The articles of the store's blog, with HTML content, tags and categories.
  - name: Billing
    description: >-
      Your app's plan subscription and usage wallet on the store, and debiting
      the wallet by usage.
  - name: Categories
    description: The store's product categories and subcategories.
  - name: Checkout fields
    description: >-
      The fields of the store's checkout form, their labels, order, and whether
      they show and are required.
  - name: Coupons
    description: >-
      The store's coupons, by code or automatic, and the products, variants and
      categories they apply to.
  - name: Labels
    description: >-
      Your app's short colored words on orders and products, shown in the
      merchant's orders and products tables.
  - name: Missed orders
    description: >-
      Checkouts the shopper started and did not finish, to follow up and
      recover.
  - name: Orders
    description: The store's orders, their status, payment status and notes.
  - name: Pages
    description: >-
      The store's pages, such as About us or the return policy, with HTML
      content.
  - name: Products
    description: The store's products, their options, variants and stock.
  - name: Reviews
    description: >-
      The reviews of the store's products, and which of them the product page
      shows.
  - name: Shipping
    description: The store's shipping settings and shipping areas (governorates).
  - name: Store
    description: >-
      The store the access token belongs to, its addresses, currency, language
      and plan.
paths:
  /billing:
    get:
      tags:
        - Billing
      summary: Get billing
      description: |
        **Scope:** none. Every app can call it.

        Your app's subscription on the store (`null` when your app has no
        plans) and its usage wallet. Takes no query parameters.

        Works while the subscription is `suspended`, when the rest of the API
        answers `402`, so your app can see why.
      operationId: getBilling
      responses:
        '200':
          description: Your app's billing on the store.
          content:
            application/json:
              schema:
                type: object
                required:
                  - billing
                properties:
                  billing:
                    $ref: '#/components/schemas/Billing'
              example:
                billing:
                  subscription:
                    plan_id: plan_pro
                    plan_name: Pro
                    price: '19.00'
                    status: active
                    trial_ends_at: null
                    current_period_start: '2026-11-20T10:00:00Z'
                    current_period_end: '2026-12-20T10:00:00Z'
                    pending_plan_id: null
                    pending_plan_price: null
                    price_change: null
                  wallet:
                    enabled: true
                    balance: '19.95'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/RateLimited'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl "https://api.easy-orders.net/api/partners-apps/v1/billing" \
              -H "Authorization: Bearer $EASYORDERS_ACCESS_TOKEN"
        - lang: typescript
          label: TypeScript
          source: >-
            const response = await
            fetch('https://api.easy-orders.net/api/partners-apps/v1/billing', {
              method: 'GET',
              headers: {
                Authorization: `Bearer ${process.env.EASYORDERS_ACCESS_TOKEN}`,
              },
            })


            const json = await response.json()

            if (!response.ok) {
              throw new Error(`${json.error.code}: ${json.error.message}`)
            }

            const { billing } = json
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, err := http.NewRequest(\"GET\", \"https://api.easy-orders.net/api/partners-apps/v1/billing\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"EASYORDERS_ACCESS_TOKEN\"))\n\n\tres, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer res.Body.Close()\n\n\tvar answer map[string]any\n\tif err := json.NewDecoder(res.Body).Decode(&answer); err != nil {\n\t\tpanic(err)\n\t}\n\tif res.StatusCode >= 300 {\n\t\tpanic(fmt.Sprint(res.Status, answer[\"error\"]))\n\t}\n\tfmt.Println(answer[\"billing\"])\n}"
        - lang: php
          label: PHP
          source: >-
            <?php


            $ch =
            curl_init('https://api.easy-orders.net/api/partners-apps/v1/billing');

            curl_setopt_array($ch, [
                CURLOPT_CUSTOMREQUEST => 'GET',
                CURLOPT_RETURNTRANSFER => true,
                CURLOPT_HTTPHEADER => [
                    'Authorization: Bearer ' . getenv('EASYORDERS_ACCESS_TOKEN'),
                ],
            ]);


            $answer = json_decode(curl_exec($ch), true);

            $status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

            curl_close($ch);


            if ($status >= 300) {
                throw new RuntimeException($answer['error']['code'] . ': ' . $answer['error']['message']);
            }

            $billing = $answer['billing'];
        - lang: python
          label: Python
          source: |-
            import os

            import requests

            response = requests.get(
                "https://api.easy-orders.net/api/partners-apps/v1/billing",
                headers={
                    "Authorization": f"Bearer {os.environ['EASYORDERS_ACCESS_TOKEN']}",
                },
                timeout=30,
            )
            answer = response.json()
            if not response.ok:
                raise RuntimeError(f"{answer['error']['code']}: {answer['error']['message']}")
            billing = answer["billing"]
components:
  schemas:
    Billing:
      type: object
      required:
        - subscription
        - wallet
      properties:
        subscription:
          oneOf:
            - $ref: '#/components/schemas/BillingSubscription'
            - type: 'null'
          description: '`null` when your app has no plans (a free app).'
        wallet:
          $ref: '#/components/schemas/BillingWallet'
    BillingSubscription:
      type: object
      description: >-
        Your app's plan on the store. Amounts are US dollar strings; times are
        UTC.
      properties:
        plan_id:
          type: string
          description: The plan's ID, as your app's billing settings name it.
        plan_name:
          type: string
        price:
          type: string
          description: >-
            What the merchant agreed to pay a month, e.g. `"19.00"`. Renewals
            charge it until a price change applies.
        status:
          type: string
          enum:
            - trialing
            - active
            - suspended
          description: |
            `trialing`: the free trial, the first charge comes at its end.
            `active`: the current month is paid, or the plan is free.
            `suspended`: a renewal found too few credits; the rest of the API
            answers `402` until the merchant's credits cover it.
        trial_ends_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Set while `trialing`.
        current_period_start:
          type:
            - string
            - 'null'
          format: date-time
          description: The start of the paid month; `null` while `trialing`.
        current_period_end:
          type:
            - string
            - 'null'
          format: date-time
          description: The next renewal; `null` while `trialing`.
        pending_plan_id:
          type:
            - string
            - 'null'
          description: A cheaper plan the merchant picked, which the next renewal moves to.
        pending_plan_price:
          type:
            - string
            - 'null'
          description: >-
            The pending plan's price when the merchant picked it; the renewal
            charges no more.
        price_change:
          oneOf:
            - $ref: '#/components/schemas/BillingPriceChange'
            - type: 'null'
          description: >-
            A higher price of the plan that your app set; `null` when there is
            none, and while a cheaper plan is pending.
    BillingWallet:
      type: object
      properties:
        enabled:
          type: boolean
          description: Your app has a usage wallet that the merchant can top up.
        balance:
          type: string
          description: US dollars, e.g. `"19.95"`; `"0.00"` when never topped up.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: A stable, snake_case code. Branch on it, not on the message.
            message:
              type: string
              description: A human-readable explanation. It may change.
            details:
              description: More about the error, shaped per code.
    FieldError:
      type: object
      required:
        - field
        - rule
      properties:
        field:
          type: string
          description: The JSON path of the input, e.g. `items[0].quantity`.
        rule:
          type: string
          description: The rule that failed, e.g. `required`, `between` or `in`.
        param:
          type: string
          description: The rule's parameter, e.g. `1,10000` for `between`.
    BillingPriceChange:
      type: object
      description: >-
        Until the merchant accepts it, renewals charge the old price. If they
        neither accept it nor remove the app by `deadline`, the app is removed
        then.
      properties:
        new_price:
          type: string
        deadline:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the app is removed without an answer; `null` before the
            merchant is told, and once they accepted.
        accepted_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Set once the merchant accepted; `new_price` applies from the next
            renewal.
  responses:
    Unauthenticated:
      description: The access token is missing, invalid or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthenticated
              message: Missing or invalid access token
    ValidationFailed:
      description: The request broke one or more rules; `details.fields` lists every one.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  error:
                    type: object
                    properties:
                      details:
                        type: object
                        properties:
                          fields:
                            type: array
                            items:
                              $ref: '#/components/schemas/FieldError'
          example:
            error:
              code: validation_failed
              message: Validation failed
              details:
                fields:
                  - field: items[0].quantity
                    rule: between
                    param: 1,10000
    RateLimited:
      description: More than 600 requests in a minute from your app on this store.
      headers:
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: too_many_requests
              message: Rate limit exceeded
  headers:
    Retry-After:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  securitySchemes:
    accessToken:
      type: http
      scheme: bearer
      description: >
        An access token from the OAuth flow (`eo_at_...`). It lasts one hour;

        refresh it with the refresh token. See
        [Authentication](/authentication).

````

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