Skip to main content
POST
/
v1
/
invoices
cURL
curl --request POST \
  --url https://api.nomod.com/v1/invoices \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "currency": "<string>",
  "items": [
    {
      "name": "<string>",
      "amount": "<string>",
      "quantity": 500
    }
  ],
  "discount_percentage": 0,
  "customer": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "invoice_number": "<string>",
  "title": "<string>",
  "note": "<string>",
  "shipping_address_required": false,
  "due_date": "2023-12-25",
  "starts_at": "2023-12-25",
  "custom_fields": [
    {
      "name": "<string>"
    }
  ],
  "allow_tabby": true,
  "allow_tamara": true,
  "allow_service_fee": true,
  "success_url": "<string>",
  "failure_url": "<string>"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "reference_id": "<string>",
  "created": "2023-11-07T05:31:56Z",
  "title": "<string>",
  "code": "<string>",
  "url": "<string>",
  "amount": "<string>",
  "currency": "<string>",
  "status": "paid",
  "discount": "<string>",
  "service_fee": "<string>",
  "tax": "<string>",
  "shipping_address_required": true,
  "items": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amount": "<string>",
      "name": "<string>",
      "total_amount": "<string>",
      "quantity": 2147483647,
      "sku": "<string>"
    }
  ],
  "note": "<string>",
  "expiry": "2023-11-07T05:31:56Z",
  "discount_percentage": "<string>",
  "service_fee_percentage": "<string>",
  "tip_percentage": "<string>",
  "user": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "first_name": "<string>",
    "last_name": "<string>"
  },
  "tip": "<string>",
  "invoice_number": "<string>",
  "service_date": "2023-11-07T05:31:56Z",
  "due_date": "2023-11-07T05:31:56Z",
  "interval_count": 123,
  "starts_at": "2023-11-07T05:31:56Z",
  "ends_at": "2023-11-07T05:31:56Z",
  "due_days": 123,
  "custom_fields": [],
  "source": "nomod_hosted",
  "success_url": "<string>",
  "failure_url": "<string>",
  "payment_capture_source": "<string>",
  "files": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "title": "<string>",
      "content_type": "<string>",
      "file": "<string>"
    }
  ],
  "reminders": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "days": 123,
      "title": "<string>",
      "invoice": 123,
      "run_at": "2023-11-07T05:31:56Z"
    }
  ],
  "events": [
    {
      "created": "2023-11-07T05:31:56Z",
      "type": "created",
      "message": "<string>",
      "user": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "first_name": "<string>",
        "last_name": "<string>"
      }
    }
  ],
  "customer": {}
}

Authorizations

X-API-KEY
string
header
required

Your API key. This is required by all endpoints to access our API programatically. You can view your API Key by navigating to the app settings

Body

application/json
currency
string
required

ISO 4217 currency code for the invoice. Retrieve codes from the /currencies endpoint.

Maximum length: 3
items
object[]
required

List of items associated with this invoice, including name and amount.

customer
string<uuid>
required

Customer ID, Get the customer id from /customer api

due_date
string<date>
required

Invoice due date

discount_percentage
integer
default:0

Discount percentage.

Required range: 0 <= x <= 100
invoice_number
string

Invoice number

Maximum length: 30
title
string

Invoice title

Maximum length: 50
note
string | null

A note to describle what you're selling

Maximum length: 280
shipping_address_required
boolean
default:false

Whether shipping address is required.

starts_at
string<date>

Invoice start date

custom_fields
object[] | null

Custom fields to add. Maximum of 5 allowed

allow_tabby
boolean

Whether to enable Tabby payment method for the link. Default == true

allow_tamara
boolean

Whether to enable Tamara payment method for the link. Default == true

allow_service_fee
boolean

Whether to enable service fee for the link. Default == true

success_url
string<uri>

URL to redirect to upon successful transaction completion

failure_url
string<uri>

URL to redirect to if the transaction fails.

Response

id
string<uuid>
required
reference_id
string
required
created
string<date-time>
required
title
string
required
code
string
required
url
string<uri>
required

URL of the link or invoice,

amount
string<decimal>
required
currency
string
required
status
enum<string>
required
  • paid - paid
  • unpaid - unpaid
  • overdue - overdue
  • cancelled - cancelled
  • scheduled - scheduled
Available options:
paid,
unpaid,
overdue,
cancelled,
scheduled
discount
string<decimal>
required
tax
string<decimal>
required
shipping_address_required
boolean
required
items
object[]
required
note
string
required
expiry
string<date-time>
required
user
object
required
tip
string<decimal>
required
invoice_number
string
required
service_date
string<date-time>
required
due_date
string<date-time>
required
interval_count
integer
required
starts_at
string<date-time>
required
ends_at
string<date-time>
required
due_days
integer
required
source
enum<string>
required
  • nomod_hosted - Nomod Hosted
  • woocommerce - WooCommerce
  • shopify - Shopify
  • zapier - Zapier
  • nomod_api - API
  • store - Store
  • app - App
  • web - Web
Available options:
nomod_hosted,
woocommerce,
shopify,
zapier,
nomod_api,
store,
app,
web
files
object[]
required
reminders
object[]
required
events
object[]
required
customer
object
required
service_fee
string<decimal> | null
discount_percentage
string<decimal> | null
service_fee_percentage
string<decimal> | null
tip_percentage
string<decimal> | null
custom_fields
object[]
success_url
string<uri>

Redirects to the success URL after the invoice is completed.

failure_url
string<uri>

Redirects to the failure URL if the invoice payment fails.

payment_capture_source
string
I