# Create an add-funds order

Creates an order that adds funds to the payment account with a card payment. The account is credited the
order amount. When a card fee applies, the card is charged the order amount plus the fee. The card is
charged in the order currency, and the card issuer converts when the card is in another currency.
Open the Glomo checkout with the returned `checkout_url`, or with the order ID and the public key in
that URL. The body takes `amount`, `currency` and `request_id` and ignores other fields. The order
expires 3 months after it is created.
To get the result of the card payment, call Get an add-funds order from your server.

Endpoint: POST /payment-accounts/{payment_account_id}/orders
Version: 1.0.0
Security: JWT

## Security:

  - `JWT` (unknown)
    http bearer JWT

## Path parameters:

  - `payment_account_id` (string, required)
    The ID of a payment account you own. Starts with `pacct_`.

## Request fields (application/json):

  - `amount` (integer, required)
    The amount to add, as a JSON integer in minor units of `currency`. A string such as `"100000"` returns `400`.
    Example: 100000

  - `currency` (string, required)
    The balance to credit. Only `USD` is supported.
    Enum: "USD"

  - `request_id` (string)
    Your unique ID for this order. If you send the same `request_id` again on the same payment account, you get the original order back. Use a value that is unique to you, for example with your own prefix. A value that is already in use returns `400`.
    Example: acme-load-0001

## Response 201:

  - `201` (unknown)
    Order created. A repeated `request_id` on the same account also returns `201`, with the original order.

## Response 201 fields (application/json):

  - `id` (string)
    The unique identifier for the order.
    Example: paload_6ab59a06f9xuk

  - `customer_id` (string)
    The customer that owns the payment account.
    Example: cust_6ab599fdEvVur

  - `payment_account_id` (string)
    The payment account that the payment credits.
    Example: pacct_6ab59a10Hk3Zq

  - `status` (string)
    The status of the order.
- `active`
 - the order can be paid.
- `paid`
 - the card payment succeeded. Terminal.
- `partially_paid`
 - part of the amount is paid.
- `under_review`
 - Glomo is reviewing the order.
- `action_required`
 - Glomo needs more information before the order can be paid.
- `failed`
 - the order could not be accepted. Terminal.
- `cancelled`
 - the order was cancelled before it was paid. Terminal.
- `expired`
 - the order was not paid before
`expires_at`
.
    Enum: "active", "paid", "partially_paid", "under_review", "action_required", "failed", "cancelled", "expired"

  - `amount` (integer)
    The amount to add, in minor units of `currency`. `100000` is USD 1,000.00.
    Example: 100000

  - `currency` (string)
    Enum: "USD"

  - `remaining_amount` (integer)
    The amount still to be paid, in minor units.
    Example: 100000

  - `already_paid_amount` (integer)
    The amount already paid, in minor units.
    Example: 0

  - `request_id` (string | null)
    The `request_id` you sent, or `null`.
    Example: acme-load-0001

  - `checkout_url` (string)
    The URL that opens the Glomo checkout for this order. It carries the public key that the checkout needs. Use this URL, or the public key in it, to open the checkout.
    Example: https://api.glomopay.com/api/public/v1/checkout/redirect?resource_id=paload_6ab59a06f9xuk&public_key=live_6ab59a01EXAMPLE1

  - `notes` (object)
    Always an empty object on an add-funds order.
    Example: {}

  - `document_id` (string | null)
    Always `null` on an add-funds order.
    Example: null

  - `purpose_code` (string | null)
    Always `null` on an add-funds order.
    Example: null

  - `invoice_amount` (integer | null)
    Always `null` on an add-funds order.
    Example: null

  - `invoice_description` (string | null)
    Always `null` on an add-funds order.
    Example: null

  - `invoice_number` (string | null)
    Always `null` on an add-funds order.
    Example: null

  - `reference_number` (string | null)
    Always `null` on an add-funds order.
    Example: null

  - `expires_at` (string)
    When the order expires. An add-funds order expires 3 months after it is created.
    Example: 2027-01-15T09:15:42Z

  - `created_at` (string)
    Example: 2026-10-15T09:15:42Z

  - `updated_at` (string)
    Example: 2026-10-15T09:15:43Z

## Response 400:

  - `400` (unknown)
    The order was refused. Examples of `message`:
- `Payment account cannot accept money`
 - the account is not
`active`
.
- `Order already exists for this request_id`
 - the
`request_id`
 is already in use. Send a new one.
- A validation message -
`amount`
 or
`currency`
 is missing or not valid.

## Response 400 fields (application/json):

  - `error` (string, required)
    The HTTP reason phrase.
    Example: Bad Request

  - `message` (string, required)
    What went wrong. Show it in logs, not to the customer.
    Example: Payment account cannot send money

  - `code` (string)
    A stable code for the error. Present only on some errors, for example `INSUFFICIENT_BALANCE` on a payout and `order_amount_above_cap` on an order. Branch on `code` when it is present, and on the HTTP status when it is not.
    Example: INSUFFICIENT_BALANCE

## Response 404:

  - `404` (unknown)
    The payment account does not exist or you do not own it

## Response 404 fields (application/json):

  - `error` (string, required)
    The HTTP reason phrase.
    Example: Bad Request

  - `message` (string, required)
    What went wrong. Show it in logs, not to the customer.
    Example: Payment account cannot send money

  - `code` (string)
    A stable code for the error. Present only on some errors, for example `INSUFFICIENT_BALANCE` on a payout and `order_amount_above_cap` on an order. Branch on `code` when it is present, and on the HTTP status when it is not.
    Example: INSUFFICIENT_BALANCE

## Response 422:

  - `422` (unknown)
    The amount is above the order limit for the currency. `code` is one of:
- `order_amount_above_cap`
 - the amount is above the limit.
- `order_cap_unavailable`
 - no limit is set for the currency, so the order is refused.

## Response 422 fields (application/json):

  - `error` (string, required)
    The HTTP reason phrase.
    Example: Bad Request

  - `message` (string, required)
    What went wrong. Show it in logs, not to the customer.
    Example: Payment account cannot send money

  - `code` (string)
    A stable code for the error. Present only on some errors, for example `INSUFFICIENT_BALANCE` on a payout and `order_amount_above_cap` on an order. Branch on `code` when it is present, and on the HTTP status when it is not.
    Example: INSUFFICIENT_BALANCE

