E-invoices
/ api/ invoicesCreate invoice
Create an invoice for your business.
mid + terminal-idTry it in Sandbox Request body
| Field | Type | Description |
|---|---|---|
invoice_Optional | string | Invoice number. If not provided, one is generated automatically. |
customer_Required | string | Customer mobile number. |
customer_Required | string | Customer email address. |
customer_Required | string | Customer name. |
business_Required | string | Business name. |
business_Required | string | Business address. |
taxable_Required | string | Tax registration number, e.g. TRN in the UAE or GSTIN in India. |
invoice_Optional | string | Invoice date shown on the invoice, in ISO 8601 format. If not provided, today's date is used. |
payment_Required | string | Payment mode of the invoice. |
receivedOptional | string | The advance amount received from the customer. |
currency_Required | string | The three-letter ISO currency code. |
itemsRequired | array of objects | Items or products on the invoice. |
items[].Required | string | Item or product name. |
items[].Required | string | Quantity of the item. |
items[].Required | string | Item or product unit. |
items[].Required | string | Item or product price. |
items[].Required | string | Discount on the item or product. |
items[].Required | string | Whether the price already includes tax. |
items[].Required | string | Tax percentage on the item or product. |
emailOptional | object | Sends the invoice to the customer by email. |
email.Required | string | Email subject. |
email.Required | string | Email body. |
email.Optional | object | — |
email.Required | array of any | Recipient email addresses. |
email.Optional | array of any | CC recipient email addresses. |
email.Optional | array of any | BCC recipient email addresses. |
smsOptional | object | Sends the invoice to the customer's mobile number by SMS. |
sms.Required | boolean | Include the invoice link in the SMS. |
sms.Required | string | SMS message body. |
Headers
| Field | Type | Description |
|---|---|---|
midRequired | string | Your MID, starts with ul-mid. |
terminal-idRequired | string | Your terminal id, starts with ul-tid. |
Responses
| Status | Description |
|---|---|
| 200 OK | Success |
| 400 Bad request | Bad Request |
| 401 Unauthorized | Unauthorized |
| 403 Forbidden | Forbidden: the merchant account is inactive, suspended from collecting payments, or KYC isn't approved. |
Response fields 200
| Field | Type | Description |
|---|---|---|
statusOptional | boolean | Status of API request. |
linkOptional | string | Invoice link. |
file_Optional | string | Invoice file name. |
payment_Optional | string | Payment link for QR Code or link. |
https://sandbox.geturbanledger.com/api/invoicescurl -X POST "https://sandbox.geturbanledger.com/api/invoices" \
-H "Content-Type: application/json" \
-H "mid: sb-ul-mid-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
-H "terminal-id: ul-tid-xxxxxxxxxxxxxxxxxxxxxxxx" \
-d '{
"invoice_no": "UL1660650550504",
"customer_number": "971501234567",
"customer_email": "aisha.rahman@example.com",
"customer_name": "Aisha Rahman",
"business_name": "Example Trading LLC",
"business_address": "Office 1204, Bay Square, Business Bay, Dubai, UAE",
"taxable_number": "1004c******",
"invoice_date": "2022-08-16 00:00:00.000",
"payment_mode": "QRCODE",
"received": 100,
"currency_code": "AED",
"items": [
{
"name": "Brand strategy workshop",
"quantity": "2",
"unit": "Session",
"price": "1500",
"discount": "0",
"with_tax": "false",
"tax": "5"
}
],
"email": {
"subject": "Invoice INV-10482 from Example Trading LLC",
"message": "Please find attached your invoice.",
"recipients": {
"to": [
"aisha.rahman@example.com"
],
"cc": [
"finance@example.com"
],
"bcc": [
"accounts@example.com"
]
}
},
"sms": {
"invoice_url": true,
"message": "Your invoice from Example Trading LLC is ready."
}
}'{
"status": true,
"link": "https://api.geturbanledger.com/api/image/show/UL1*********_*****_*****_28_10_2022.pdf",
"file_name": "UL1*********_*****_*****_28_10_2022.pdf",
"payment_link": "https://api.geturbanledger.com/api/payment/request/qr/635b******************"
}