Reports Payments

This endpoint can be used for generating payment-reports for a specified user / period

Reference

POST /reports/payments/


General search parameters

field type description/constraints Req
useCache boolean Use API caching module No
page int Show page x from resultset (default: 1) No
itemsPerPage int Number of items per page No
Minimum: 1 item
Maximum: 100 items (default: 25)
userId int The userId Yes
orderId int The orderId No
invoiceId string The invoiceId No
afasInvoiceId string The afas invoiceId No
status string Available options: No
- paid
- cancelled
- failed
- expired
dateStart datetime No
dateEnd datetime No


Fields

field type constraints
userId int The userId
amountNet float The payment amount in Euros
amountVat float The amount of Vat
amountGross float The total payment amount
status string The payment status.
Available options:
- cancelled
- expired
- failed
- paid
paymentId string The paymentId
orderId int The orderId
invoiceId string The invoiceId
afasInvoiceId string The afas invoiceId
paymentCreated datetime The date/time this payment has been created/started
datePaid datetime The date/time this payment has been fulfilled
dateCancelled datetime The cancellation date
dateExpired datetime The expiration date
dateFailed datetime The failure date
user object The user-object


Example

Request

POST /rest/v1/reports/payments HTTP/2
{
 "userId": 12311,
 "dateStart": "2019-01-01 00:00:00",
 "dateEnd": "2020-01-01 00:00:00",
 "useCache": false,
 "page": 1,
 "itemsPerPage": 10
}

Response

{
 "result": true,
 "fromCache": false,
 "totalItems": 1,
 "totalInSet": 1,
 "page": 1,
 "itemsPerPage": 10,
 "speed": 0.00021505355834960938,
 "data": [
   {
     "userId": 12311,
     "amountNet": 10,
     "amountVat": 2.1,
     "amountGross": 12.1,
     "status": "paid",
     "paymentId": "tr_WmQMBh9cmu",
     "orderId": 1435668,
     "invoiceId": "GG19010302",
     "afasInvoiceId": "",
     "paymentCreated": "2019-02-27 12:39:02",
     "datePaid": "2019-02-27 12:48:33",
     "dateCancelled": "0000-00-00 00:00:00",
     "dateExpired": "0000-00-00 00:00:00",
     "dateFailed": "0000-00-00 00:00:00",
     "user": {
       "userId": 12311,
       "clientId": 0,
       "externalUserId": 0,
       "companyName": "companyName",
       "firstName": "firstName",
       "lastName": "lastName",
       "gender": "M",
       "dateOfBirth": "",
       "address": "address",
       "houseNumber": "houseNumber",
       "postalCode": "postalCode",
       "city": "city",
       "county": "county",
       "country": "country",
       "email": "email",
       "website": "",
       "phone": "phone",
       "fax": "",
       "cellular": ""
     }
   }
 ]
}