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"
}
]
}
Fields | Type | Is Required | Description |
---|---|---|---|
invoice.*.external_id | string | Yes | Invoice external id |
invoice.*.due_date | date (Y-m-d) | Yes | The date that the invoice is due to be paid. |
invoice.*.invoice_date | date (Y-m-d) | Yes | The creation date of the invoice. |
invoice.*.payment_date | date (Y-m-d) | The date the invoice was paid. null for unpaid invoices. | |
invoice.*.amount | number | Yes | Amount of the invoice in cents |
invoice.*.description | string | ||
invoice.*.approved_by_payer | boolean | Has this invoice been approved as a correct and valid payable by the payor | |
invoice.*.payer_external_id | string | Yes | Payer external id |
invoice.*.payee_external_id | string | Payee external id Required when payee_uuid not present. | |
invoice.*.payee_uuid | string|uuid | GrailPay 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
Code | Message |
---|---|
401 | |
403 | |
422 |
Updated 2 months ago