Amili Docs
Home
Products
Products
  • Debt.collection
  • Account Receivable
  • Distribution
  • Pay
Go to amili.no
Home
Products
Products
  • Debt.collection
  • Account Receivable
  • Distribution
  • Pay
Go to amili.no
  1. Invoice
  • Home
    • Welcome to Amili Docs
    • Responsible disclosure
    • Become a partner
  • Debt Collection
    • About the AutoCollect API
    • Getting started with the AutoCollect API
    • Webhooks
    • Example Workflow
    • Batches
      • GetBatchById
      • GetBatchesByOrganization
      • GetBatchById - Legacy (To be removed)
    • Collections
      • GetCasesByOrganization
      • AcceptDebtCollectionList
      • RejectDebtCollectionList
      • PauseCase
      • WithdrawCase
      • ResumeCase
      • AcceptEvictionRequest
      • RejectEvictionRequest
      • AcceptEvictionConfirmation
      • RejectEvictionConfirmation
    • Correction
      • CreateCorrections
    • Invoice
      • CreateInvoices
      • GetInvoicesByOrganization
      • GetInvoiceById
    • Payment
      • CreatePayments
    • Settlement
      • GetSettlements
      • GetSettlement on Id
    • AutoCollect Legacy API
      • Attachment
        • /webapi/api/Attachment
      • Batch
        • /webapi/api/Batch
        • /webapi/api/Batch
      • Ping
        • /webapi/api/Ping
    • ErrorHandling
      • How to
      • Codes
        • DUPLICATE_UNIQUE_SOURCE_PAYMENT_ID
  • Accounts Receivable
    • Actions
      • POST (create) an action
      • POST (create) a reports action/generate a report
    • ArItems
      • GET a list of AR items
      • PUT (update) ar item details
      • GET one AR item
    • AutoPostings
      • POST (create) one or more auto postings
    • Batches
      • GET one batch
    • ClientConfigs
      • GET a list of client config values
      • GET values for one client config key
    • Codes
      • GET ARM system code values
    • Customers
      • POST (create) one customer
      • PUT (update) one customer
      • GET a list of customers
      • GET one customer
      • DELETE a customer
      • POST (create) a batch of customers
      • PUT (update) a batch of customers
    • DocumentBundles
      • GET a list of document bundles
      • GET one document bundle
    • Documents
      • POST (create) one document
      • GET a list of documents
      • GET one document
      • POST (create) a batch of documents
    • Files
      • GET one or more OS files
      • POST (upload) one or more OS files
      • GET one OS file
    • GlItems
      • Get one GL item
      • GET a list of GL items
    • GlMovements
      • Get movement/balance for the latest closed GL year/period
      • GET a list of GL movements/balances
    • Insights
      • GET a list of ADB intervals
    • LogItems
      • GET one log item
      • GET a list of log items
    • PaymentReservations
      • POST (create) a new payment reservation
    • Health
      • Check API health
  • Pay
    • AmiliPay API Introduction
    • Industry Categories Reference
    • Webhooks Reference
    • Merchant
      • List all customers
      • Create customer
      • Retrieve customer
      • Update customer
      • Create customer token
      • Retrieve pricing for a merchant
      • Update pricing for a merchant
      • List a customer's accepted agreements
    • User
      • List all users
      • Create user
      • Retrieve user
      • Update user
      • Delete user
    • Onboarding
      • Create onboarding application
      • Retrieve onboarding application
      • Update onboarding application
      • Delete onboarding application
      • Start processing onboarding
      • Delete onboarding shareholder
      • Create onboarding document
      • Retrieve onboarding document
      • Delete onboarding document
      • Retrieve available account agreements
      • Create onboarding agreement
      • Mark selected agreement as an accepted by the account
      • Retrieve a single agreement
      • Update onboarding agreement
      • Deactivate agreement
    • Invoice
      • List all invoices
        GET
      • Create invoice
        POST
      • Retrieve invoice
        GET
      • Update invoice
        PUT
      • Delete invoice
        DELETE
      • Refund invoice
        POST
    • Transactions
      • Get invoice transactions
    • Payout
      • List all payouts
      • Retrieve payout
      • Retrieve payout details
    • Product lines classification
      • Upload a CSV file
      • Manually get processed CSV file path
      • Download a previously uploaded CSV file
  1. Invoice

Create invoice

POST
/v1/invoices
Creates a new invoice. A merchant token creates the invoice under its own account by default; a partner token must supply account_id to target one of its direct-child merchants. Supply the customer, invoice identifier, amount in cents, and due date. Optional fields let you attach an invoice URL, PDF content, payment window redirect URLs, notification settings, language, and recurring payment support.

Request

Authorization
API Key
Add parameter in header
X-API-KEY
Example:
X-API-KEY: ********************
or
API Key
Add parameter in header
Authorization
Example:
Authorization: ********************
or
Body Params application/json

Examples

Responses

🟢201
application/json
Created
Bodyapplication/json

🟠400
🟠401
🟠404
🟠409
Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/v1/invoices' \
--header 'X-API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "invoice_id": "10000",
    "customer_id": "51220",
    "customer_reference": "PO-88231",
    "amount": 12500,
    "due_date": "2022-10-09",
    "last_payment_date": "2022-12-30",
    "name": "Jim Smith",
    "email": "jimsmith@example.com",
    "phone": "+37263256604",
    "currency": "NOK",
    "notify_customer": true,
    "invoice_url": "https://www.example.com",
    "pdf_content": "base64 encoded content of pdf",
    "pdf_url": "https://url-to-pdf",
    "redirect_url": "https://www.customershop.com/controlpanel",
    "cancel_url": "https://google.com",
    "is_recurring": false,
    "language": "no"
}'
Response Response Example
201 - response
{
    "data": {
        "unique_id": "XdY5BQoZwwDeROmWL7NUfLa3B5XHcQr1vZf0uyr42mkB6wVzF1",
        "account_id": 1,
        "invoice_id": "10000",
        "amount": 2500,
        "customer_id": "51220",
        "customer_reference": "PO-88231",
        "name": "Jim Smith",
        "email": "jimsmith@example.com",
        "phone": "+37263256604",
        "currency": "NOK",
        "notify_customer": true,
        "reminded": false,
        "payment_method": "",
        "language": "no",
        "redirect_url": "https://www.customershop.com/controlpanel",
        "cancel_url": "https://google.com",
        "due_date": "2021-04-09T00:00:00",
        "last_payment_date": "2022-04-24T00:00:00",
        "paid_at": null,
        "created_at": "2021-03-29T09:32:25",
        "updated_at": "2021-03-29T09:32:25",
        "deleted_at": null,
        "deactivated_at": null,
        "refunded_at": null,
        "is_recurring": false,
        "payment_url": "https://pay.amili.no/pay-invoice/XdY5BQoZwwDeROmWL7NUfLa3B5XHcQr1vZf0uyr42mkB6wVzF1"
    }
}
Modified at 2026-09-25 07:15:05
Previous
List all invoices
Next
Retrieve invoice
Built with