EntityInvoice

Get

GET

Path parameters

entityIdstringRequired
invoiceIdstringRequired

ID of the invoice to retrieve. This can be the full invoice ID (in_11aa2b77-6391-49e4-8c3f-b198009202c1) or the first 8 characters of the ID (11aa2b77).

Query parameters

includeFeesbooleanOptional
Deprecated
DEPRECATED. Fees are now included by default in the response.

Response

This endpoint returns an object
id
string
status
enum
paymentDestinationConfirmed
boolean
True if the payment destination has been confirmed by the vendor. False if the payment destination has been set (for example, a check to an address) but has not been confirmed by the vendor.
hasDocuments
boolean
True if the invoice has documents attached.
hasSourceEmail
boolean
True if the invoice was created by an incoming email.
approvers
list of objects
approvalPolicy
list of objects
metadata
map from strings to strings
Metadata associated with this invoice.
createdAt
datetime
updatedAt
datetime
amount
doubleOptional
Total amount of invoice in major units
currency
enumOptional
Currency code for the amount. Defaults to USD.
invoiceDate
datetimeOptional
Date the invoice was issued.
deductionDate
datetimeOptional
Date when funds will be deducted from payer's account.
settlementDate
datetimeOptional
Date of funds settlement.
dueDate
datetimeOptional
Due date of invoice.
invoiceNumber
stringOptional
noteToSelf
stringOptional
serviceStartDate
datetimeOptional
serviceEndDate
datetimeOptional
payerId
stringOptional
payer
objectOptional
paymentSource
unionOptional
paymentSourceId
stringOptional
vendorId
stringOptional
vendor
objectOptional
paymentDestination
unionOptional
paymentDestinationId
stringOptional
paymentDestinationOptions
unionOptional
comments
list of objectsOptional
lineItems
list of objectsOptional
foreignId
stringOptional
The ID used to identify this invoice in your system. This ID must be unique within each creatorEntity in your system, e.g. two invoices with the same creatorEntity may not have the same foreign ID.
creatorUser
objectOptional
Entity user who created this invoice.
failureType
enumOptional
If the invoice failed to be paid, this field will be populated with the type of failure.
Allowed values: SOURCE_PAYMENT_ERRORDESTINATION_PAYMENT_ERRORREJECTED_HIGH_RISKINSUFFICIENT_FUNDSPROCESSING_ERROR
processedAt
datetimeOptional
fees
objectOptional
Fees associated with this invoice.
GET
1curl -G https://api.mercoa.com/entity/:entityId/invoice/:invoiceId \
2 -H "Authorization: Bearer <token>" \
3 -d includeFees=true
200
Retrieved
1{
2 "id": "string",
3 "status": "DRAFT",
4 "paymentDestinationConfirmed": true,
5 "hasDocuments": true,
6 "hasSourceEmail": true,
7 "approvers": [
8 {
9 "approvalPolicyId": "string",
10 "approvalSlotId": "string",
11 "action": "NONE",
12 "eligibleRoles": [
13 "string"
14 ],
15 "eligibleUserIds": [
16 "string"
17 ],
18 "date": "2023-01-01T00:00:00Z",
19 "assignedUserId": "string"
20 }
21 ],
22 "approvalPolicy": [
23 {
24 "id": "string",
25 "trigger": [
26 {
27 "type": "amount",
28 "amount": 1,
29 "currency": "AED"
30 }
31 ],
32 "rule": {
33 "type": "approver",
34 "identifierList": {
35 "type": "rolesList",
36 "value": [
37 "string"
38 ]
39 },
40 "numApprovers": 0
41 },
42 "upstreamPolicyId": "string"
43 }
44 ],
45 "metadata": {
46 "string": "string"
47 },
48 "createdAt": "2023-01-01T00:00:00Z",
49 "updatedAt": "2023-01-01T00:00:00Z",
50 "amount": 1,
51 "currency": "AED",
52 "invoiceDate": "2023-01-01T00:00:00Z",
53 "deductionDate": "2023-01-01T00:00:00Z",
54 "settlementDate": "2023-01-01T00:00:00Z",
55 "dueDate": "2023-01-01T00:00:00Z",
56 "invoiceNumber": "string",
57 "noteToSelf": "string",
58 "serviceStartDate": "2023-01-01T00:00:00Z",
59 "serviceEndDate": "2023-01-01T00:00:00Z",
60 "payerId": "string",
61 "payer": {
62 "id": "string",
63 "name": "string",
64 "email": "string",
65 "isCustomer": true,
66 "accountType": "business",
67 "profile": {
68 "business": {
69 "legalBusinessName": "string",
70 "taxIDProvided": true,
71 "email": "string",
72 "businessType": "soleProprietorship",
73 "phone": {
74 "countryCode": "string",
75 "number": "string"
76 },
77 "doingBusinessAs": "string",
78 "website": "string",
79 "description": "string",
80 "address": {
81 "addressLine1": "string",
82 "city": "string",
83 "stateOrProvince": "string",
84 "postalCode": "string",
85 "addressLine2": "string",
86 "country": "string"
87 },
88 "ownersProvided": true
89 },
90 "individual": {
91 "name": {
92 "firstName": "string",
93 "lastName": "string",
94 "middleName": "string",
95 "suffix": "string"
96 },
97 "birthDateProvided": true,
98 "governmentIDProvided": true,
99 "email": "string",
100 "phone": {
101 "countryCode": "string",
102 "number": "string"
103 },
104 "address": {
105 "addressLine1": "string",
106 "city": "string",
107 "stateOrProvince": "string",
108 "postalCode": "string",
109 "addressLine2": "string",
110 "country": "string"
111 }
112 }
113 },
114 "status": "unverified",
115 "acceptedTos": true,
116 "isPayor": true,
117 "isPayee": true,
118 "createdAt": "2023-01-01T00:00:00Z",
119 "updatedAt": "2023-01-01T00:00:00Z",
120 "foreignId": "string",
121 "emailTo": "string",
122 "emailToAlias": [
123 "string"
124 ]
125 },
126 "paymentSource": {
127 "type": "bankAccount",
128 "accountName": "string",
129 "accountNumber": "string",
130 "accountType": "CHECKING",
131 "bankName": "string",
132 "createdAt": "2023-01-01T00:00:00Z",
133 "id": "string",
134 "isDefaultDestination": true,
135 "isDefaultSource": true,
136 "routingNumber": "string",
137 "status": "NEW",
138 "supportedCurrencies": [
139 "AED"
140 ],
141 "updatedAt": "2023-01-01T00:00:00Z",
142 "checkOptions": {
143 "signatoryName": "string",
144 "enabled": true,
145 "initialCheckNumber": 0,
146 "routingNumberOverride": "string",
147 "accountNumberOverride": "string",
148 "signatureImage": "string",
149 "useSignatureImage": true
150 }
151 },
152 "paymentSourceId": "string",
153 "vendorId": "string",
154 "vendor": {
155 "id": "string",
156 "name": "string",
157 "email": "string",
158 "isCustomer": true,
159 "accountType": "business",
160 "profile": {
161 "business": {
162 "legalBusinessName": "string",
163 "taxIDProvided": true,
164 "email": "string",
165 "businessType": "soleProprietorship",
166 "phone": {
167 "countryCode": "string",
168 "number": "string"
169 },
170 "doingBusinessAs": "string",
171 "website": "string",
172 "description": "string",
173 "address": {
174 "addressLine1": "string",
175 "city": "string",
176 "stateOrProvince": "string",
177 "postalCode": "string",
178 "addressLine2": "string",
179 "country": "string"
180 },
181 "ownersProvided": true
182 },
183 "individual": {
184 "name": {
185 "firstName": "string",
186 "lastName": "string",
187 "middleName": "string",
188 "suffix": "string"
189 },
190 "birthDateProvided": true,
191 "governmentIDProvided": true,
192 "email": "string",
193 "phone": {
194 "countryCode": "string",
195 "number": "string"
196 },
197 "address": {
198 "addressLine1": "string",
199 "city": "string",
200 "stateOrProvince": "string",
201 "postalCode": "string",
202 "addressLine2": "string",
203 "country": "string"
204 }
205 }
206 },
207 "status": "unverified",
208 "acceptedTos": true,
209 "isPayor": true,
210 "isPayee": true,
211 "createdAt": "2023-01-01T00:00:00Z",
212 "updatedAt": "2023-01-01T00:00:00Z",
213 "foreignId": "string",
214 "emailTo": "string",
215 "emailToAlias": [
216 "string"
217 ]
218 },
219 "paymentDestination": {
220 "type": "bankAccount",
221 "accountName": "string",
222 "accountNumber": "string",
223 "accountType": "CHECKING",
224 "bankName": "string",
225 "createdAt": "2023-01-01T00:00:00Z",
226 "id": "string",
227 "isDefaultDestination": true,
228 "isDefaultSource": true,
229 "routingNumber": "string",
230 "status": "NEW",
231 "supportedCurrencies": [
232 "AED"
233 ],
234 "updatedAt": "2023-01-01T00:00:00Z",
235 "checkOptions": {
236 "signatoryName": "string",
237 "enabled": true,
238 "initialCheckNumber": 0,
239 "routingNumberOverride": "string",
240 "accountNumberOverride": "string",
241 "signatureImage": "string",
242 "useSignatureImage": true
243 }
244 },
245 "paymentDestinationId": "string",
246 "paymentDestinationOptions": {
247 "type": "check",
248 "delivery": "PRINT"
249 },
250 "comments": [
251 {
252 "id": "string",
253 "text": "string",
254 "createdAt": "2023-01-01T00:00:00Z",
255 "updatedAt": "2023-01-01T00:00:00Z",
256 "user": {
257 "id": "string",
258 "roles": [
259 "string"
260 ],
261 "createdAt": "2023-01-01T00:00:00Z",
262 "updatedAt": "2023-01-01T00:00:00Z",
263 "foreignId": "string",
264 "email": "string",
265 "name": "string"
266 },
267 "associatedApprovalAction": {
268 "userId": "string",
269 "action": "NONE"
270 }
271 }
272 ],
273 "lineItems": [
274 {
275 "id": "string",
276 "currency": "AED",
277 "createdAt": "2023-01-01T00:00:00Z",
278 "updatedAt": "2023-01-01T00:00:00Z",
279 "amount": 1,
280 "description": "string",
281 "name": "string",
282 "quantity": 0,
283 "unitPrice": 1,
284 "serviceStartDate": "2023-01-01T00:00:00Z",
285 "serviceEndDate": "2023-01-01T00:00:00Z",
286 "metadata": {
287 "string": "string"
288 },
289 "glAccountId": "string"
290 }
291 ],
292 "foreignId": "string",
293 "creatorUser": {
294 "id": "string",
295 "roles": [
296 "string"
297 ],
298 "createdAt": "2023-01-01T00:00:00Z",
299 "updatedAt": "2023-01-01T00:00:00Z",
300 "foreignId": "string",
301 "email": "string",
302 "name": "string"
303 },
304 "failureType": "SOURCE_PAYMENT_ERROR",
305 "processedAt": "2023-01-01T00:00:00Z",
306 "fees": {
307 "sourcePaymentMethodFee": 1,
308 "sourcePlatformMarkupFee": 1,
309 "destinationPaymentMethodFee": 1,
310 "destinationPlatformMarkupFee": 1
311 }
312}