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

# Place a wallet-paid order

> Place a headless, wallet-paid order. The server forces `pay_with_credit=1` and `no_redirect=1` internally, so the order is debited from your wallet balance with no gateway redirect.

`email`, `fname`, and `lname` are derived from the authenticated identity. You can omit them, or pass them explicitly to override.

Permission: `account:api_ordering:write` (admin-grant-only — off by default for every account). Authenticate with the `api-token` header. The wallet balance must cover the order total at the moment the call lands.



## OpenAPI

````yaml /openapi-account.json post /v4/account/orders/create
openapi: 3.0.3
info:
  title: ProxyScrape Account API
  description: Account API — authenticate with the api-token header.
  version: 1.0.0
servers:
  - url: https://api.proxyscrape.com
    description: ProxyScrape API
security:
  - apiToken: []
tags:
  - name: API key management
    description: Create, list, update, regenerate, and revoke API keys
  - name: Subaccounts
    description: List subaccounts and manage preferences
  - name: Datacenter
    description: 'Datacenter shared and dedicated: overview, proxy list, usage, whitelist'
  - name: Residential
    description: 'Residential (bandwidth): overview, subusers, usage'
  - name: Residential unlimited
    description: 'Residential unlimited: overview, statistics, password'
  - name: SERP API
    description: 'SERP API: overview, subusers, search'
  - name: API ordering
    description: >-
      Place wallet-paid orders and read the wallet balance via the headless API
      ordering surface.
paths:
  /v4/account/orders/create:
    post:
      tags:
        - API ordering
      summary: Place a wallet-paid order
      description: >-
        Place a headless, wallet-paid order. The server forces
        `pay_with_credit=1` and `no_redirect=1` internally, so the order is
        debited from your wallet balance with no gateway redirect.


        `email`, `fname`, and `lname` are derived from the authenticated
        identity. You can omit them, or pass them explicitly to override.


        Permission: `account:api_ordering:write` (admin-grant-only — off by
        default for every account). Authenticate with the `api-token` header.
        The wallet balance must cover the order total at the moment the call
        lands.
      operationId: createApiOrder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - new_datacenter_shared
                    - new_residential
                    - new_residential_unlimited
                    - new_serp_api
                    - update_datacenter_shared
                    - update_datacenter_dedicated
                    - update_residential
                    - update_residential_unlimited
                    - update_serp_api
                  description: >-
                    Product to order. `new_*` creates a new subaccount;
                    `update_*` upgrades an existing one in place (more
                    proxies/tokens/bandwidth or extended duration) and requires
                    `account_id`. Each `update_*` accepts the same
                    product-specific fields as its matching `new_*` — see the
                    examples below.
                account_id:
                  type: string
                  description: >-
                    Required for `update_*` types: the `AccountID` of the
                    subaccount to upgrade (from `/v4/account/subaccounts`). Must
                    be a subaccount you own. Ignored for `new_*` types.
                  example: fe7941e6-1eed-4d95-881a-3159901897d3
                dry_run:
                  type: boolean
                  description: >-
                    When `true`, returns a price quote without creating an order
                    or debiting the wallet. Works for both `new_*` and
                    `update_*`, and on a zero wallet balance.
                  example: false
                country:
                  type: string
                  description: >-
                    Billing country (full name, e.g. "Belgium"). Determines VAT.
                    Required for `new_*` orders; optional for `update_*` (the
                    subaccount's existing country is used).
                  example: Belgium
                coupon_code:
                  type: string
                  description: >-
                    Optional coupon. Discount applies before any per-account
                    API-ordering percentage (coupon first, then percentage on
                    the post-coupon price). Coupons cannot be applied to wallet
                    top-ups.
                  example: WELCOME10
                fname:
                  type: string
                  description: Override the first name from the authenticated account.
                lname:
                  type: string
                  description: Override the last name from the authenticated account.
              additionalProperties: true
            examples:
              datacenter_shared:
                summary: Premium / datacenter shared
                value:
                  type: new_datacenter_shared
                  country: Belgium
                  is_subscription: true
                  days: 30
                  proxies[mixed]: 1000
                  bandwidth: 0
              residential:
                summary: Residential (bandwidth pack)
                value:
                  type: new_residential
                  country: Belgium
                  bandwidth: 10
                  duration: 30d
              residential_unlimited:
                summary: Residential unlimited
                value:
                  type: new_residential_unlimited
                  country: Belgium
                  location: <server-location-id>
                  speed: 200
                  days: 30
              serp_api:
                summary: SERP API token bundle
                value:
                  type: new_serp_api
                  country: Belgium
                  tokens: 100000
                  duration: 30d
              upgrade_datacenter_shared:
                summary: Upgrade an existing subaccount (1,000 → 2,000 proxies)
                value:
                  type: update_datacenter_shared
                  account_id: fe7941e6-1eed-4d95-881a-3159901897d3
                  days: 1
                  proxies[mixed]: 2000
                  bandwidth: 250
                  is_subscription: false
              price_quote_dry_run:
                summary: Price quote (dry run) — no charge, no order
                value:
                  type: update_datacenter_shared
                  account_id: fe7941e6-1eed-4d95-881a-3159901897d3
                  days: 1
                  proxies[mixed]: 2000
                  bandwidth: 250
                  is_subscription: false
                  dry_run: true
      responses:
        '200':
          description: >-
            For a real order: created and paid from the wallet — `data` is the
            bare order ID string. For `dry_run: true`: `data` is a price quote
            and no order is created or charged.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    oneOf:
                      - type: string
                        description: Order ID (returned for wallet-credit orders).
                        example: 0bc1a40f-2a17-4c84-9b2b-f4b9d3e0b3a1
                      - type: object
                        properties:
                          order_id:
                            type: string
                            format: uuid
                          order_url:
                            type: string
                            nullable: true
                      - type: object
                        description: 'Price quote, returned when `dry_run: true`.'
                        properties:
                          title:
                            type: string
                            example: Update ProxyScrape premium
                          price:
                            type: string
                            description: >-
                              Amount that would be debited from the wallet
                              (pre-VAT; for upgrades, already net of credit for
                              unused time on the current plan).
                            example: '13.05'
                          original_price:
                            type: string
                            description: Price before any coupon / per-account discount.
                            example: '26.10'
                          extra_days:
                            type: number
                            example: 1
        '400':
          description: >-
            Order rejected. Causes include bad pricing, invalid params,
            insufficient wallet, top-up + coupon, or — for `update_*` types — a
            missing `account_id` (`"account_id is required for update_* order
            types."`).
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: >-
                      account_id is required for update_* order types. To create
                      a new subaccount, use the matching new_* type.
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: >-
                      Could not determine account email from authenticated
                      identity.
        '403':
          description: >-
            Either API ordering isn't enabled for this account (request the
            `account:api_ordering:write` grant from support), or an `update_*`
            request named an `account_id` that doesn't belong to the
            authenticated account.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: >-
                      The account_id does not belong to the authenticated
                      account.
      security:
        - apiToken: []
components:
  securitySchemes:
    apiToken:
      type: apiKey
      in: header
      name: api-token
      description: >-
        API key. Create and manage keys at /v4/account/api-keys or in the
        dashboard.

````