Add Invoice
post
https://api.payant.ng/invoices
Add Invoice

Client Data

Parameters
Description
company_name
String
Client's company or full name
first_name required
String Client's first name
last_name required
String Client's last name
email required
String Client's email address
email_cc
String
Comma separated emails to copy for invoices and payment receipts
phone required
String Client's phone number
address
String Client's address

Items Object Data

Parameter
Description
item
required
String
Item's name
description required
String Item's description
unit_cost required
String Item's unit cost
quantity required
String Item's quantity
Heads up!
Please contact Payant Support for you to start tokenizing cards and accepting recurring payments.
Heads up!
Only one of client or client_id is required per invoice. The client parameter will allow you to add a new customer while invoicing on the fly in case you don't have a client_id. Client will not be added if already exist.

Request

1
curl https://api.payant.ng/invoices \
2
-H "Content-Type: application/json" \
3
-H "Authorization: Bearer SECRET_KEY" \
4
-d '{ "client": {
5
"first_name": "Albert",
6
"last_name": "Jane",
7
"email": "[email protected]ital.com",
8
"phone": "+2348012345678"
9
},
10
"due_date": "12/30/2016",
11
"fee_bearer": "client",
12
"items": [
13
"item": "Website Design",
14
"description": "5 Pages Website plus 1 Year Web Hosting",
15
"unit_cost": "50000.00",
16
"quantity": "1"
17
]
18
}' \
19
-X POST
Copied!

Response

1
{
2
"status": "success",
3
"message": "Invoice created successfully.",
4
"data": {
5
"id": 1,
6
"company_id": "1",
7
"client_id": "1",
8
"reference_code": "j9CbiTN0oJe4vWhglyS2",
9
"payment_id": null,
10
"fee_bearer": "client",
11
"mail_status": "unsent",
12
"status": "0",
13
"due_date": "1483056000",
14
"created_at": "2016-12-21 18:46:30",
15
"updated_at": "2016-12-21 18:46:30",
16
"deleted_at": null,
17
"client": {
18
"id": 1
19
"company_id": 1,
20
"name": "Albert Specialist Hospital",
21
"first_name": "Albert",
22
"last_name": "Jane",
23
"email": "[email protected]",
24
"phone": "+2348012345678",
25
"website": "http://www.alberthospital.com",
26
"address": "Wase II",
27
"type": "Customer",
28
"settlement_bank": "",
29
"account_name": "",
30
"account_number": "",
31
"status": "1",
32
"created_at": "2016-12-21 17:19:10",
33
"updated_at": "2016-12-21 17:19:10",
34
"deleted_at": null
35
},
36
"items": [
37
{
38
"id": "1",
39
"company_id": "1",
40
"client_id": "1",
41
"name": "Website Design",
42
"description": "5 Pages Website plus 1 Year Web Hosting",
43
"quantity": "1",
44
"unit_cost": "50000.00",
45
"status": "0",
46
"due_date": "1483056000",
47
"created_at": "2016-12-21 17:19:10",
48
"updated_at": "2016-12-21 17:19:10",
49
"deleted_at": null
50
}
51
]
52
}
53
}
Copied!
Last modified 2yr ago