Skip to main content
curl --request GET 'https://api.mayar.id/hl/v2/invoices/filter?email=budi.santoso@example.com&limit=10' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here'
{
    "statusCode": 200,
    "messages": "success",
    "data": [
        {
            "id": "6f8c19ff-5b97-4792-aa89-d2a12797b356",
            "amount": 80000,
            "category": null,
            "createdAt": 1768375011056,
            "description": "",
            "link": "a0me074770a",
            "type": "invoice",
            "status": "closed",
            "name": "INVOICE",
            "redirectUrl": null,
            "customerId": "21d84338-b46d-42d7-9b49-d402520407a5",
            "transactions": [
                {
                    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                    "status": "created",
                    "extraData": null
                }
            ],
            "customer": {
                "id": "21d84338-b46d-42d7-9b49-d402520407a5",
                "email": "budi.santoso@example.com",
                "mobile": "081234567890",
                "name": "Budi Santoso"
            }
        },
        {
            "id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
            "amount": 2070000,
            "category": null,
            "createdAt": 1768288611056,
            "description": "",
            "link": "wpib3ybq3ym",
            "type": "invoice",
            "status": "closed",
            "name": "INVOICE",
            "redirectUrl": null,
            "customerId": "21d84338-b46d-42d7-9b49-d402520407a5",
            "transactions": [
                {
                    "id": "d4e5f6a7-b8c9-0123-defa-456789012345",
                    "status": "created",
                    "extraData": null
                }
            ],
            "customer": {
                "id": "21d84338-b46d-42d7-9b49-d402520407a5",
                "email": "budi.santoso@example.com",
                "mobile": "081234567890",
                "name": "Budi Santoso"
            }
        }
    ],
    "hasMore": true,
    "nextStartingAfter": "1768288611056"
}
Endpoint:
https://api.mayar.id/hl/v2/invoices/filter?email=budi.santoso@example.com&limit=10

Authorization

Authorization
string
required
Example:Authorization | Bearer Paste-Your-API-Key-Here

Query Parameters

email
string
required
Customer email used to filter invoices. Required. When no customer matches the email, the endpoint returns 404 Customer Not Found.
limit
integer
default:"10"
Number of items to return per page. Defaults to 10, with a maximum of 50.
startingAfter
string
Cursor for forward pagination. Pass the nextStartingAfter value from the previous response (a Unix timestamp in milliseconds, as a string) to fetch the next page.
status
string
Filter invoices by status (e.g. active, paid, closed).
Filter invoices by keyword.

Response

Successful Response

Main Structure (Root)

statusCode
integer
Status code form API.
messages
string
Status message that describes the status code.
data
array of object
List of invoices displayed.
hasMore
boolean
Information on whether there is additional data to be retrieved (true/false).
nextStartingAfter
string | null
Cursor to pass as startingAfter to fetch the next page. null when there is no further data.

data Structure (Array Of Object)

id
string<uuid>
Unique invoice ID.
amount
integer
Invoice price or nominal value.
category
string | null
Product category, can be null if there is no category.
createdAt
number | timestamp
Invoice creation time in epoch milliseconds format.
description
string
Invoice description.
Invoice slug/short URL.
type
string
Product type (always invoice for this endpoint).
status
string
Invoice status (e.g. paid, closed, active).
name
string
Invoice name.
redirectUrl
string | null
Redirect destination URL, can be null.
customerId
string<uuid>
The customer ID associated with this invoice.
transactions
array of object
List of invoice related transactions.
customer
object
Details of the customer associated with this invoice.

transactions Structure (Array Of Object)

id
string <uuid>
Unique transaction ID.
status
string
Transaction status (example: created, paid).
extraData
object | null
Additional custom data attached to the transaction, can be null.

customer Structure (Object)

id
string <uuid>
Unique customer ID.
email
string
Customer’s email address.
mobile
string
Customer’s mobile phone number.
name
string
Customer’s name.

Errors

404 Not Found
object
Returned when no customer matches the provided email: { "statusCode": 404, "messages": "Customer Not Found" }.