Documentation
Log In
Documentation

Create Invoices

This API creates an invoice for a specific user.

📘

Authentication Route

This route is secured with processor and vendor token authentication.

Endpoint

   /3p/api/v1/users/{user_uuid}/invoices

 

Request Payload

{
    "invoices": [
        {
            "external_id": "19c64a3d-71cb-4400-8225-iuqwyeuibg",
            "due_date": "2024-04-28",
            "invoice_date": "2024-04-12",
            "payment_date": "2024-04-26",
            "amount": 10000,
            "description": "Services provided in April",
            "approved_by_payer": true,
            "payer_external_id": "invoice_user_25478",
            "payee_external_id": "invoice_user_32579",
            "payee_uuid": "cc8859fd-ad44-4fd8-bfc4-23925b04ba9d"
        },
        {
            "external_id": "539150f9-baf5-4727-ae16-62c716d5837c",
            "due_date": "2024-02-18",
            "invoice_date": "2024-01-24",
            "payment_date": "2024-02-15",
            "amount": 15000,
            "description": "payment transaction at Pollich",
            "approved_by_payer": true,
            "payer_external_id": "invoice_user_25478",
            "payee_external_id": "invoice_user_41025",
            "payee_uuid": "20c64a3e-71cb-4400-8225-6d19918aa190"
        }
    ]
}
FieldsTypeIs RequiredDescription
invoice.*.external_idstringYesInvoice external id
invoice.*.due_datedate (Y-m-d)YesThe date that the invoice is due to be paid.
invoice.*.invoice_datedate (Y-m-d)YesThe creation date of the invoice.
invoice.*.payment_datedate (Y-m-d)The date the invoice was paid. null for unpaid invoices.
invoice.*.amountnumberYesAmount of the invoice in cents
invoice.*.descriptionstring
invoice.*.approved_by_payerbooleanHas this invoice been approved as a correct and valid payable by the payor
invoice.*.payer_external_idstringYesPayer external id
invoice.*.payee_external_idstringPayee external id

Required when payee_uuid not present.
invoice.*.payee_uuidstring|uuidGrailPay Payee UUID

Required when payee_external_id not present.

Response Object

{
    "status": true,
    "message": "",
    "data": [
        {
            "external_id": "19c64a3d-71cb-4400-8225-iuqwyeuibg",
            "uuid": "d5059656-7032-412d-849a-e2dfb79b8be6"
        },
        {
            "external_id": "539150f9-baf5-4727-ae16-62c716d5837c",
            "uuid": "c4fbcb01-c974-4068-9dd7-fbcf0e358fff"
        }
    ],
    "errors": []
}

Errors & Warnings

CodeMessage
401
403
422